Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] sale_exception: Migration to 18.0 #3359

Open
wants to merge 82 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
6204462
[ADD] sale_exception
atchuthan Mar 16, 2016
ef0f51a
[FIX] sale_exception: README
pedrobaeza Apr 12, 2016
87ce6f7
[FIX] sale_exception: configuration menu
atchuthan May 12, 2016
28c4c92
[IMP] Rename `action_cancel` to `action_draft` to reset the flag
atchuthan Oct 7, 2016
b13db0f
[FIX] sale_exception: count stock from selected warehouse
TheCloneMaster Nov 22, 2016
9436654
sale_*: Fix parent menu
pedrobaeza Dec 29, 2016
0a9a5c5
[FIX] add dependency to server-tools/base_exception
mourad-ehm Mar 9, 2017
b6c2525
[FIX] sale_exception misc
mourad-ehm Mar 13, 2017
f3b1b8a
[FIX] sale_exception constraint
yvaucher May 30, 2017
97ba505
[11.0][MIG] sale_exception
simahawk Nov 28, 2017
88a08b8
sale_exception: recover translations from v10
simahawk Jan 12, 2018
d4de04a
[FIX] sale_exception: Menu location (#719)
ivantodorovich Oct 25, 2018
98f3cb6
Sale Exception to v12
ljimenezsidoo Mar 14, 2019
f58857a
[MIG] sale_exception: Migration to 12.0
sebalix Apr 25, 2019
dbb68a1
[IMP] sale_exception: format XML file 'views/sale_view.xml'
sebalix May 10, 2019
6a7c964
Adapt sale_exception to base_exception simplification
florian-dacosta May 28, 2019
25d8558
Add test and fix apple and orange mixing error between sale order and…
florian-dacosta Jun 12, 2019
8ada3a2
sale_exception: Remove side effect from api.constrains
guewen Aug 13, 2019
e5458f2
[FIX] sale_exception: remove obsolete base_sale_multi_channel referen…
zeroheure Oct 12, 2019
8231d80
[IMP] sale exception (#878)
ivantodorovich Oct 14, 2019
c53e8e1
[FIX] sale_exception: Disable failing test
pedrobaeza Oct 24, 2019
beef8f5
[FIX] sale_exception: Avoid W0101 pylint error
pedrobaeza Oct 24, 2019
c374353
[FIX] sale_exception: Disable test via __init__
pedrobaeza Oct 24, 2019
6ca0ffa
[MIG] sale_exception: Migration to 13.0
jaredkipe Jan 20, 2020
745816c
sale_exception: apply pre-commit
guewen Jul 14, 2020
d6cd40e
sale_exception: fix test class
simahawk Dec 15, 2020
2146c50
sale_exception: drop backward compat code
simahawk Dec 15, 2020
6d0dc08
sale_exception: fix warning
simahawk Dec 15, 2020
087e461
[UPD] Update sale_exception.pot
oca-travis Dec 16, 2020
b4448a1
[UPD] README.rst
OCA-git-bot Dec 16, 2020
9c9dbcc
sale_exception: keep detail of exceptions on lines
guewen Jul 14, 2020
dbee59e
sale_exception: restore multi record tests, fix base class
simahawk Dec 16, 2020
b95e3c6
[UPD] Update sale_exception.pot
oca-travis Dec 16, 2020
8af39b1
sale_exception 13.0.1.1.0
OCA-git-bot Dec 16, 2020
dfbda06
Update translation files
oca-transbot Dec 16, 2020
bbabd58
[MIG] sale_exception: Migration to 14.0
sebastienbeau Dec 21, 2020
382b6fa
fix sale_exception datas
damdam-s Apr 30, 2021
5c26483
[UPD] Update sale_exception.pot
oca-travis May 20, 2021
6e693b3
[UPD] README.rst
OCA-git-bot May 20, 2021
12813eb
sale_exception 14.0.1.0.1
OCA-git-bot May 20, 2021
829aad7
Translated using Weblate (Spanish)
ValentinVinagre May 25, 2021
fd5a9c2
Translated using Weblate (German)
marylla Jul 9, 2021
4d8358e
[13.0][FIX] sale_exception ignore after confirm
TDu Apr 12, 2021
f8f0a0d
[IMP] sale_exception: Add Customer sale warning + product warning exc…
victoralmau Aug 9, 2021
2712bb9
[UPD] Update sale_exception.pot
oca-travis Dec 2, 2021
8bffbc6
[UPD] README.rst
OCA-git-bot Dec 2, 2021
8f58dd8
sale_exception 14.0.1.1.0
OCA-git-bot Dec 2, 2021
1babb8a
Update translation files
oca-transbot Dec 2, 2021
71c1261
[MIG] sale_exception: Migration to 15.0
damdam-s Mar 23, 2022
ed47aac
[UPD] Update sale_exception.pot
Sep 21, 2022
523c6c4
[UPD] README.rst
OCA-git-bot Sep 21, 2022
911ddbd
[MIG] sale_exception: Migration to 16.0
matiasperalta1 Nov 17, 2022
167a96d
[16.0][MIG] - finalize sale_exception migration
sbejaoui Jan 25, 2023
d3e8103
[FIX] - sale_exception: fix unit tests
sbejaoui Jan 25, 2023
7076086
[UPD] Update sale_exception.pot
Feb 9, 2023
55bef97
[UPD] README.rst
OCA-git-bot Feb 9, 2023
0a9fcd5
sale_exception 16.0.1.0.1
OCA-git-bot Feb 9, 2023
7c723aa
Update translation files
weblate Feb 9, 2023
06c0b38
Translated using Weblate (Croatian)
badbole Feb 15, 2023
7e5d51a
Translated using Weblate (Spanish)
Mar 9, 2023
75122bf
Translated using Weblate (Italian)
mymage Mar 23, 2023
251eac8
Translated using Weblate (Slovenian)
sysadminmatmoz Apr 11, 2023
6a00adf
Translated using Weblate (French)
rousseldenis Apr 19, 2023
ed4cf70
Translated using Weblate (French)
glitchov Apr 19, 2023
095638a
[16.0][IMP] sale_exception: Improved wizard view and don't ignore exc…
aliciagaarzo Feb 16, 2023
ffabe25
[FIX] sale_exception : so line decoration-danger condition
glitchov May 3, 2023
bb6e626
sale_exception 16.0.1.1.0
OCA-git-bot May 4, 2023
446ee10
[UPD] Update sale_exception.pot
May 9, 2023
c6f039e
sale_exception 16.0.1.2.0
OCA-git-bot May 9, 2023
2beec8e
Update translation files
weblate May 9, 2023
136e502
Translated using Weblate (French)
glitchov May 12, 2023
f1f6f7f
Translated using Weblate (Spanish)
Ivorra78 Jul 25, 2023
6877698
[UPD] README.rst
OCA-git-bot Sep 3, 2023
7ede7b0
Translated using Weblate (Spanish)
kikopeiro Nov 29, 2023
633cd25
[IMP] sale_exception: pre-commit auto fixes
nguyenminhchien Apr 11, 2024
c9eb363
[MIG] sale_exception: Migration to 17.0
nguyenminhchien Feb 2, 2024
063acb1
[UPD] Update sale_exception.pot
Apr 28, 2024
c03a29c
[BOT] post-merge updates
OCA-git-bot Apr 28, 2024
4613e37
Translated using Weblate (Italian)
mymage Apr 29, 2024
b4fa521
Translated using Weblate (Swedish)
jakobkrabbe Jun 12, 2024
aecf8c3
Translated using Weblate (Italian)
mymage Jul 23, 2024
488de35
[MIG] sale_exception: Migration to 18.0
matiasperalta1 Oct 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 132 additions & 0 deletions sale_exception/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
==============
Sale Exception
==============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:02cf45502a42ed74a7de2eeb75f68950616d8d807656bff404181daeb39b6558
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/18.0/sale_exception
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_exception
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows you attach several customizable exceptions to your
sale order in a way that you can filter orders by exceptions type and
fix them.

This is especially useful in an scenario for mass sales order import
because it's likely some orders have errors when you import them (like
product not found in Odoo, wrong line format etc.)

**Table of contents**

.. contents::
:local:

Configuration
=============

If you are going to use Customer sale warning and Product warning, for
setting corresponding information, you need to:

1. Go to *Settings > User & Companies > Users*.
2. Edit your user.
3. Check "A warning can be set on a product or a customer (Sale)" group.
4. Install sale_management addon.

Usage
=====

Not Enough Virtual Stock: #. Go to *Sales > Products > Products*. #.
Create new storable product without stock available. #. Go to *Sales >
Orders > Quotations* #. Create new quotation. #. Add product without
stock available. #. An exception will be displayed.

No ZIP code on destination: #. Go to *Contacts*. #. Edit or create new
contact. #. Set empty zip code. #. Go to *Sales > Orders > Quotations*
#. Create new quotation. #. Set delivery address with no zip code. #. An
exception will be displayed.

Product warning: #. Go to *Sales > Products > Products*. #. Edit or
create new product. #. Go to *Sales* tab. #. Set your desired warning
option under the *Warning when Selling this Product* group. #. Set some
warning message. #. Go to *Sales > Orders > Quotations* #. Create new
quotation. #. Add product with warning message. #. An exception will be
displayed.

Partner warning: #. Go to *Contacts*. #. Edit or create new contact. #.
Go to *Internal notes* tab. #. Set warning option according to *Warning
on the Sales Order* group. #. Set some warning message. #. Go to *Sales
> Orders > Quotations* #. Create new quotation. #. Set partner with
warning message. #. An exception will be displayed.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_exception%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Akretion
* Sodexis
* Camptocamp

Contributors
------------

- Raphaël Valyi <[email protected]>
- Renato Lima <[email protected]>
- Sébastien BEAU <[email protected]>
- Guewen Baconnier <[email protected]>
- Yannick Vaucher <[email protected]>
- Simone Orsi <[email protected]>
- SodexisTeam <[email protected]>
- Mourad EL HADJ MIMOUNE <[email protected]>
- Raphaël Reverdy <[email protected]>
- Florian da Costa <[email protected]>
- Iván Todorovich <[email protected]>
- Nguyen Minh Chien <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/18.0/sale_exception>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions sale_exception/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from . import models
from . import wizard
24 changes: 24 additions & 0 deletions sale_exception/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2011 Akretion, Sodexis
# Copyright 2018 Akretion
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Sale Exception",
"summary": "Custom exceptions on sale order",
"version": "18.0.1.0.0",
"category": "Generic Modules/Sale",
"author": "Akretion, "
"Sodexis, "
"Camptocamp, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"depends": ["sale", "base_exception"],
"license": "AGPL-3",
"data": [
"security/ir.model.access.csv",
"data/sale_exception_data.xml",
"wizard/sale_exception_confirm_view.xml",
"views/sale_view.xml",
],
"demo": ["demo/sale_exception_demo.xml"],
}
48 changes: 48 additions & 0 deletions sale_exception/data/sale_exception_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record forcecreate="True" id="ir_cron_test_orders" model="ir.cron">
<field name="name">Test Draft Orders</field>
<field name="active" eval="False" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number">20</field>
<field name="interval_type">minutes</field>
<field name="model_id" ref="sale.model_sale_order" />
<field name="state">code</field>
<field name="code">model.test_all_draft_orders()</field>
</record>
<record id="excep_no_zip" model="exception.rule">
<field name="name">No ZIP code on destination</field>
<field name="description">No ZIP code on destination</field>
<field name="sequence">50</field>
<field name="model">sale.order</field>
<field name="code">failed=not self.partner_shipping_id.zip</field>
<field name="active" eval="False" />
</record>
<record id="excep_no_stock" model="exception.rule">
<field name="name">Not Enough Virtual Stock</field>
<field name="description">Not Enough Virtual Stock</field>
<field name="sequence">50</field>
<field name="model">sale.order.line</field>
<field
name="code"
>failed=self.product_id and self.product_id.type == 'product' and self.virtual_available_at_date &lt; self.product_uom_qty</field>
<field name="active" eval="False" />
</record>
<record id="exception_partner_sale_warning" model="exception.rule">
<field name="name">Customer sale warning</field>
<field name="description">The customer has a sale warning in his form</field>
<field name="sequence">40</field>
<field name="model">sale.order</field>
<field name="code">failed=self.partner_id.sale_warn == "warning"</field>
<field name="active" eval="False" />
</record>
<record id="exception_product_sale_warning" model="exception.rule">
<field name="name">Product warning</field>
<field name="description">The product has a warning in his form</field>
<field name="sequence">40</field>
<field name="model">sale.order.line</field>
<field name="code">failed=self.product_id.sale_line_warn == "warning"</field>
<field name="active" eval="False" />
</record>
</odoo>
33 changes: 33 additions & 0 deletions sale_exception/demo/sale_exception_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="excep_no_sol" model="exception.rule">
<field name="name">No order lines</field>
<field
name="description"
>At least one order line should be present in the sale</field>
<field name="sequence">50</field>
<field name="model">sale.order</field>
<field name="exception_type">by_domain</field>
<field name="domain">[('order_line', '=', False)]</field>
<field name="active" eval="False" />
</record>
<record id="excep_no_free" model="exception.rule">
<field name="name">No free order</field>
<field name="description">The total can't be 0</field>
<field name="sequence">50</field>
<field name="model">sale.order</field>
<field name="exception_type">by_domain</field>
<field name="domain">[('amount_total', '=', 0)]</field>
<field name="active" eval="False" />
</record>
<record id="excep_no_dumping" model="exception.rule">
<field name="name">No dumping</field>
<field name="description">A product is sold cheaper than his cost.</field>
<field name="sequence">50</field>
<field name="model">sale.order.line</field>
<field
name="code"
>failed = obj.product_id.standard_price != 0 and obj.product_id.standard_price &gt; obj.price_unit</field>
<field name="active" eval="False" />
</record>
</odoo>
Loading
Loading