-
-
Notifications
You must be signed in to change notification settings - Fork 688
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
[17.0][MIG] account_global_discount: Migration to 17.0 #1687
Open
miguel-S73
wants to merge
41
commits into
OCA:17.0
Choose a base branch
from
Studio73:17.0-mig-account_global_discount
base: 17.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.
Conversation
This file contains 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
2 tasks
/ocabot migration account_global_discount |
miguel-S73
force-pushed
the
17.0-mig-account_global_discount
branch
2 times, most recently
from
August 14, 2024 16:11
20b1a28
to
d6bd7b3
Compare
@pedrobaeza I apply same change that OCA/server-backend#275 (comment) |
pedrobaeza
changed the title
[MIG] account_global_discount: 17.0
[17.0][MIG] account_global_discount: Migration to 17.0
Aug 14, 2024
OK, some reviewers should validate this. |
ferran-S73
force-pushed
the
17.0-mig-account_global_discount
branch
from
September 27, 2024 06:36
d6bd7b3
to
ad6b296
Compare
…ine + Discounts in invoice report [IMP] account_global_discount: Discounts in invoice report Give discounts info in the invoice report. [FIX] account_global_discount: link line taxes to discount move line
- We need to take into account invoice lines with multiple taxes, so the link should be m2m. - Migration scripts for preserving the best information on existing installations. - Tests for checking new conditions. - Perform sanity check for not ending in an incompatible situation. - Some refactor done on onchanges for avoiding duplicating operations. - Adjust UI for not allowing to edit computed invoice global discounts.
- Standard procedure - Make test more resilient
Replaced by more explicit `_convert` method.
For reducing diff, we rename the method and call it record per record. Fixes OCA#788
[UPD] Update account_global_discount.pot Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-invoicing-13.0/account-invoicing-13.0-account_global_discount Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-13-0/account-invoicing-13-0-account_global_discount/
Co-Authored-By: Pedro M. Baeza <[email protected]> [UPD] README.rst
Currently translated at 100.0% (35 of 35 strings) Translation: account-invoicing-13.0/account-invoicing-13.0-account_global_discount Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-13-0/account-invoicing-13-0-account_global_discount/nl_NL/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-invoicing-13.0/account-invoicing-13.0-account_global_discount Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-13-0/account-invoicing-13-0-account_global_discount/
Currently translated at 100.0% (34 of 34 strings) Translation: account-invoicing-13.0/account-invoicing-13.0-account_global_discount Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-13-0/account-invoicing-13-0-account_global_discount/es/
When we set the global discount on the create method we must ensure that the move lines are properly recomputed
Users will need a specific group to set global discounts so it's easier to decide who's allowed to apply them. [UPD] Update account_global_discount.pot
…ulti-lines from invoices when global discount is empty
…ove lines Previously, no taxes were populated as base taxes for global discount move lines, which means that the tax reports were incorrect. The global discount lines + move lines has been injected other way for avoiding inconsistencies, and the rest of the features have been adapted according this. A migration script is provided as well for filling taxes in existing global discount move lines. [UPD] Update account_global_discount.pot [UPD] README.rst Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-invoicing-13.0/account-invoicing-13.0-account_global_discount Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-13-0/account-invoicing-13-0-account_global_discount/
For recomputing the global discounts, now we need to call another method. TT30077
- Signed amount error in supplier invoices - computed fields must be stored because the other standard computed fields in same method are - Filtering global discount in on_change by invoice's company - Partner in global discount move line - When writing Odoo doesn't autocomplete amount_currency and it could fail with constraint
Currently translated at 100.0% (36 of 36 strings) Translation: account-invoicing-14.0/account-invoicing-14.0-account_global_discount Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-account_global_discount/it/
odoo/odoo@c9d5f06 has changed the number of arguments on the method `_recompute_tax_lines`, so we need to adapt the overrides to such change.
Currently translated at 100.0% (35 of 35 strings) Translation: account-invoicing-14.0/account-invoicing-14.0-account_global_discount Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-account_global_discount/pt/
In a foreign currency invoice the amounts (amount_total, amount_untaxed) are expressed in the `invoice` currency while the accounting entry lines are expressed in the `company` currency. The base_before_global_discounts has to be expressed in the invoice currency as well in such invoices because the discounts need to be computed in the same currency as the other amounts. Also set the invoice currency_id on the tax line so that it doesn't default to the company currency, and convert the discount journal entry amount to the company currnecy.
- Depending on the installed set of modules, the company currency may be USD or EUR. If the second case, these tests will fail, so we make sure that the company currency is USD for our tests, doing the change by SQL, as there's a Python constraint that prevents it. Not needed in v17 due to: odoo/odoo#107113.
… on big database installation
Currently translated at 100.0% (36 of 36 strings) Translation: account-invoicing-16.0/account-invoicing-16.0-account_global_discount Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_global_discount/it/
Currently translated at 100.0% (36 of 36 strings) Translation: account-invoicing-16.0/account-invoicing-16.0-account_global_discount Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-16-0/account-invoicing-16-0-account_global_discount/it/
miguel-S73
force-pushed
the
17.0-mig-account_global_discount
branch
2 times, most recently
from
November 6, 2024 14:31
90fbdce
to
ca1c359
Compare
miguel-S73
force-pushed
the
17.0-mig-account_global_discount
branch
from
November 6, 2024 14:34
ca1c359
to
77a9b48
Compare
@pedrobaeza all check are green. |
Great. Now some reviewers are needed. We don't need this module for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Standard migration to 17.0
Depends: