-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[19.0][MIG] sale_invoice_policy: Migration to 19.0 #4071
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
Open
therbin200
wants to merge
62
commits into
OCA:19.0
Choose a base branch
from
apikcloud:19.0-mig-sale_invoice_policy
base: 19.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
ee81a1f
[10.0][ADD] sale_invoice_policy
rousseldenis 1097143
[IMP] Add search method, secures _get_to_invoice_qty,compute_invoice_…
rousseldenis 972cbeb
[IMP] sale_invoice_policy: Implement inverse
rousseldenis e17ba15
[IMP] sale_invoice_policy: Let the availability of choosing no policy…
rousseldenis d749128
[IMP] sale_invoice_policy: Add config for default_policy and if polic…
rousseldenis 7bfb0af
[FIX] Fix perf issue during compute invoice status (of sale.order.line)
acsonefho b785934
[UPD] Update sale_invoice_policy.pot
oca-travis f893e31
[ADD] icon.png
OCA-git-bot 983ff63
[MIG]sale_invoice_policy to v12
AaronHForgeFlow e3ae565
[UPD] Update sale_invoice_policy.pot
oca-travis 0f829c7
Update translation files
oca-transbot d52bc78
Added translation using Weblate (Catalan)
georginaf 1656110
Translated using Weblate (Catalan)
georginaf d88d414
Update translation files
oca-transbot 81647ac
Added translation using Weblate (Portuguese)
pedrocs-exo 217cf3e
Translated using Weblate (Portuguese)
pedrocs-exo 776a83d
[FIX] pep8 and pylint
renatonlima beaea0e
Translated using Weblate (French)
SandieFavre b7cc52a
Translated using Weblate (French)
quentinDupont 71f79d7
[IMP] sale_invoice_policy: black, isort, prettier
alexeirivera87 4923f3d
[MIG] sale_invoice_policy: Migration to 13.0
alexeirivera87 e5d0426
[UPD] Update sale_invoice_policy.pot
oca-travis daa70fe
[UPD] README.rst
OCA-git-bot 8ffb616
sale_invoice_policy 13.0.1.0.1
OCA-git-bot 5468500
Added translation using Weblate (Spanish (Mexico))
alan196 10e1ebc
Translated using Weblate (Spanish (Mexico))
alan196 b38f0cd
[IMP] sale_invoice_policy: black, isort, prettier
yankinmax d19f2d0
[FIX] sale_invoice_policy: linter issues
yankinmax 23a81cd
[15.0][MIG] sale_invoice_policy: Migration to 15.0
yankinmax 13e6b33
[UPD] Update sale_invoice_policy.pot
7c165a6
[IMP] sale_invoice_policy: Don't repeat selection values
pedrobaeza 0e3c3c8
sale_invoice_policy 15.0.1.0.1
OCA-git-bot 503477e
[MIG] sale_invoice_policy: Migration to 16.0
ljsalvatierra-factorlibre 28a741c
[UPD] Update sale_invoice_policy.pot
1ddf4fa
[UPD] README.rst
OCA-git-bot 7e54400
[FIX] sale_invoice_policy: Wrong inheritance field with precompute at…
sergio-teruel b1a215b
[UPD] README.rst
OCA-git-bot 5e315b2
Update translation files
weblate 3b246e4
[UPD] sale_invoice_policy: Don't install it anymore
rousseldenis 8379417
Added translation using Weblate (Italian)
mymage c8e9a09
Translated using Weblate (Italian)
mymage 82e73d6
[16.0][FIX] sale_invoice_policy: compute qty to invoice
bc85f93
[UPD] Update sale_invoice_policy.pot
b116c81
[BOT] post-merge updates
OCA-git-bot 8019ff2
Update translation files
weblate 38ba67a
[FIX] sale_invoice_policy: Don't use the 'required' parameter
rousseldenis 241387c
[IMP] sale_invoice_policy: Don't reuse fields in depends
rousseldenis d794e28
[IMP] sale_invoice_policy: Don't rely on required option to compute t…
rousseldenis 48504b4
[IMP] sale_invoice_policy: Don't rewrite Odoo core compute method
rousseldenis 2d040a1
[IMP] sale_invoice_policy: save products invoice policy values in a s…
rousseldenis b58f551
[IMP] sale_invoice_policy: Add the default behavior as sale invoice p…
rousseldenis 21b41a6
[IMP] sale_invoice_policy: Use protecting() instead of deprecated nor…
rousseldenis a578b59
[IMP] sale_invoice_policy: Improve README
rousseldenis 807b2c0
[IMP] sale_invoice_policy: pre-commit auto fixes
marielejeune 8bcfdb5
[MIG] sale_invoice_policy: Migration to 18.0
marielejeune 195457f
[UPD] Update sale_invoice_policy.pot
fc74511
[BOT] post-merge updates
OCA-git-bot dcadc42
[IMP] sale_invoice_policy: automatic invoice
jbaudoux afedef7
[FIX] sale_invoice_policy: external dependency
jbaudoux 2e5b7d3
[BOT] post-merge updates
OCA-git-bot fe645ea
[MIG] sale_invoice_policy: Migration to 19.0
therbin200 e05a008
[DON'T MERGE] test-requirements.txt
therbin200 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # generated from manifests external_dependencies | ||
| openupgradelib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,138 @@ | ||
| .. image:: https://odoo-community.org/readme-banner-image | ||
| :target: https://odoo-community.org/get-involved?utm_source=readme | ||
| :alt: Odoo Community Association | ||
|
|
||
| =================== | ||
| Sale invoice Policy | ||
| =================== | ||
|
|
||
| .. | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! This file is generated by oca-gen-addon-readme !! | ||
| !! changes will be overwritten. !! | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! source digest: sha256:92833c38d476bc1f03727290a81ccb0609e0955b1a905f3f68ce3a96a910858f | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
|
||
| .. |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/license-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/19.0/sale_invoice_policy | ||
| :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-19-0/sale-workflow-19-0-sale_invoice_policy | ||
| :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=19.0 | ||
| :alt: Try me on Runboat | ||
|
|
||
| |badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
|
||
| This module adds an invoicing policy on sale order level in order to | ||
| apply that invoicing policy on the whole sale order. | ||
|
|
||
| That invoicing policy can take three values: | ||
|
|
||
| - Products Invoicing Policy: The sale order will follow the standard | ||
| behavior and apply the policy depending on products configurations. | ||
| - Ordered Quantities: The sale order will invoice the ordered | ||
| quantities. | ||
| - Delivered Quantities: The sale order will invoice the delivered | ||
| quantities. | ||
|
|
||
| Following the chosen policy, the quantity to invoice and the amount to | ||
| invoice on each line will be computed accordingly. | ||
|
|
||
| You will be able also to define a default invoicing policy (globally per | ||
| company) that can be different than the default invoicing policy for new | ||
| products. | ||
|
|
||
| **Table of contents** | ||
|
|
||
| .. contents:: | ||
| :local: | ||
|
|
||
| Use Cases / Context | ||
| =================== | ||
|
|
||
| In Odoo, products have their own invoicing policy that can be: | ||
|
|
||
| - Invoicing on ordered quantities | ||
| - Invoicing on ordered quantities | ||
|
|
||
| Following that configuration, when trying to create invoices from sale | ||
| orders, each line of product will apply its invoicing policy. | ||
|
|
||
| In some cases, user needs to apply an invoicing policy on a whole sale | ||
| order. | ||
|
|
||
| The solution proposed here is to add an invoicing policy on sale order | ||
| level. | ||
|
|
||
| Configuration | ||
| ============= | ||
|
|
||
| - Go to Sale > Configuration > Settings > Sale Invoice Policy | ||
| - Choose the one that fits your needs. | ||
|
|
||
| Usage | ||
| ===== | ||
|
|
||
| - Create Sale Order | ||
| - Select Invoicing Policy on Sale Order or let it on Products Invoicing | ||
| Policy | ||
| - The created invoices will use the configuration on sale order. | ||
|
|
||
| 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_invoice_policy%0Aversion:%2019.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 | ||
| ------- | ||
|
|
||
| * ACSONE SA/NV | ||
|
|
||
| Contributors | ||
| ------------ | ||
|
|
||
| - Cédric Pigeon <cedric.pigeon@acsone.eu> | ||
| - François Honoré <francois.honore@acsone.eu> | ||
| - Denis Roussel <denis.roussel@acsone.eu> | ||
| - Alexei Rivera <arivera@archeti.com> | ||
| - Luis J. Salvatierra <luis.salvatierra@factorlibre.com> | ||
| - Alejandro Ji Cheung <alejandro.jicheung@factorlibre.com> | ||
| - Ioan Galan <ioan@studio73.es> | ||
| - Laurent Mignon <laurent.mignon@acsone.eu> | ||
| - Marie Lejeune <marie.lejeune@acsone.eu> | ||
| - Jacques-Etienne Baudoux (BCIM) <<je.bcim.be>> | ||
| - Thomas Herbin <the@apik.cloud> | ||
|
|
||
| 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/19.0/sale_invoice_policy>`_ project on GitHub. | ||
|
|
||
| You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| from .hooks import pre_init_hook | ||
| from . import models |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Copyright 2017 ACSONE SA/NV (<http://acsone.eu>) | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
| { | ||
| "name": "Sale invoice Policy", | ||
| "summary": """ | ||
| Sales Management: let the user choose the invoice policy on the | ||
| order""", | ||
| "author": "ACSONE SA/NV, Odoo Community Association (OCA)", | ||
| "website": "https://github.com/OCA/sale-workflow", | ||
| "category": "Sales Management", | ||
| "version": "19.0.1.0.0", | ||
| "license": "AGPL-3", | ||
| "depends": ["base", "sale_stock", "base_partition"], | ||
| "external_dependencies": {"python": ["openupgradelib"]}, | ||
| "data": [ | ||
| "views/res_config_settings_view.xml", | ||
| "views/sale_view.xml", | ||
| ], | ||
| "pre_init_hook": "pre_init_hook", | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Copyright 2024 ACSONE SA/NV (<https://acsone.eu>) | ||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
| from openupgradelib import openupgrade | ||
|
|
||
|
|
||
| def pre_init_hook(env): | ||
| """ | ||
| Create the sale order invoice policy with the "product" policy (standard) | ||
| but with a postgres query to avoid an update on all sale order records | ||
| """ | ||
| field_spec = [ | ||
| ( | ||
| "invoice_policy", | ||
| "sale.order", | ||
| False, | ||
| "selection", | ||
| False, | ||
| "sale_invoice_policy", | ||
| "product", | ||
| ) | ||
| ] | ||
| openupgrade.add_fields(env, field_spec=field_spec) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| # Translation of Odoo Server. | ||
| # This file contains the translation of the following modules: | ||
| # * sale_invoice_policy | ||
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 12.0\n" | ||
| "Report-Msgid-Bugs-To: \n" | ||
| "PO-Revision-Date: 2020-02-26 18:13+0000\n" | ||
| "Last-Translator: georginaf <georgina.fornes@qubiq.es>\n" | ||
| "Language-Team: none\n" | ||
| "Language: ca\n" | ||
| "MIME-Version: 1.0\n" | ||
| "Content-Type: text/plain; charset=UTF-8\n" | ||
| "Content-Transfer-Encoding: \n" | ||
| "Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
| "X-Generator: Weblate 3.10\n" | ||
|
|
||
| #. module: sale_invoice_policy | ||
| #: model:ir.model,name:sale_invoice_policy.model_res_config_settings | ||
| msgid "Config Settings" | ||
| msgstr "Configuració" | ||
|
|
||
| #. module: sale_invoice_policy | ||
| #: model:ir.model.fields.selection,name:sale_invoice_policy.selection__sale_order__invoice_policy__delivery | ||
| msgid "Delivered quantities" | ||
| msgstr "Quantitats entregades" | ||
|
|
||
| #. module: sale_invoice_policy | ||
| #: model:ir.model.fields,field_description:sale_invoice_policy.field_sale_order__invoice_policy | ||
| msgid "Invoice Policy" | ||
| msgstr "Política de Facturació" | ||
|
|
||
| #. module: sale_invoice_policy | ||
| #: model:ir.model.fields,field_description:sale_invoice_policy.field_sale_order__invoice_policy_required | ||
| msgid "Invoice Policy Required" | ||
| msgstr "Política de Facturació" | ||
|
|
||
| #. module: sale_invoice_policy | ||
| #: model_terms:ir.ui.view,arch_db:sale_invoice_policy.view_sales_config | ||
| msgid "Invoice Policy required in Sale Orders" | ||
| msgstr "Política de Facturació" | ||
|
|
||
| #. module: sale_invoice_policy | ||
| #: model:ir.model.fields,help:sale_invoice_policy.field_sale_order__invoice_policy | ||
| msgid "" | ||
| "Ordered Quantity: Invoice based on the quantity the customer ordered.\n" | ||
| "Delivered Quantity: Invoiced based on the quantity the vendor delivered " | ||
| "(time or deliveries)." | ||
| msgstr "" | ||
| "Quantitat demanada: Factura basada en la quantitat demanada pel client.\n" | ||
| "Quantitat entregada: Factura basada en funció de la quantitat entregada pel " | ||
| "proveïdor ( temps o entregues)." | ||
|
|
||
| #. module: sale_invoice_policy | ||
| #: model:ir.model.fields.selection,name:sale_invoice_policy.selection__sale_order__invoice_policy__order | ||
| msgid "Ordered quantities" | ||
| msgstr "Quantitats Demanades" | ||
|
|
||
| #. module: sale_invoice_policy | ||
| #: model_terms:ir.ui.view,arch_db:sale_invoice_policy.view_sales_config | ||
| msgid "Sale Invoice Policy" | ||
| msgstr "" | ||
|
|
||
| #. module: sale_invoice_policy | ||
| #: model:ir.model.fields,field_description:sale_invoice_policy.field_res_config_settings__sale_invoice_policy_required | ||
| msgid "Sale Invoice Policy Required" | ||
| msgstr "Política de Facturació" | ||
|
|
||
| #. module: sale_invoice_policy | ||
| #: model:ir.model,name:sale_invoice_policy.model_sale_order | ||
| msgid "Sales Order" | ||
| msgstr "" | ||
|
|
||
| #. module: sale_invoice_policy | ||
| #: model:ir.model,name:sale_invoice_policy.model_sale_order_line | ||
| msgid "Sales Order Line" | ||
| msgstr "Línia de comanda de venda" | ||
|
|
||
| #. module: sale_invoice_policy | ||
| #: model:ir.model.fields,help:sale_invoice_policy.field_res_config_settings__sale_invoice_policy_required | ||
| msgid "This makes Invoice Policy required on Sale Orders" | ||
| msgstr "La política de facturació és necessària a les comandes de venda" | ||
|
|
||
| #~ msgid "Default Invoicing Policy" | ||
| #~ msgstr "Política de Facturació" | ||
|
|
||
| #~ msgid "Default Sale Invoice Policy" | ||
| #~ msgstr "Política de Facturació" | ||
|
|
||
| #~ msgid "Default Sale Order Invoice Policy" | ||
| #~ msgstr "Política de Facturació" | ||
|
|
||
| #~ msgid "Invoicing Policy" | ||
| #~ msgstr "Política de Facturació" | ||
|
|
||
| #~ msgid "" | ||
| #~ "Ordered Quantity: Invoice quantities ordered by the customer.\n" | ||
| #~ "Delivered Quantity: Invoice quantities delivered to the customer." | ||
| #~ msgstr "" | ||
| #~ "Quantitat demanada: Factura basada en la quantitat demanada pel client.\n" | ||
| #~ "Quantitat entregada: Facturada en funció de la quantitat entregada pel " | ||
| #~ "proveïdor ( temps o entregues)." | ||
|
|
||
| #~ msgid "Product Template" | ||
| #~ msgstr "Plantilla del Producte" | ||
|
|
||
| #~ msgid "Sale Order" | ||
| #~ msgstr "Comanda de Venda" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"base"is redundant here --sale_stockalready depends on it transitively. The 18.0 version doesn't list it either. Suggest removing it to keep the dependency declaration accurate.