-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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] sale_advance_payment: Migration to 17.0 #3156
Conversation
… better support in multi-currency.
Currently translated at 92.1% (35 of 38 strings) Translation: sale-workflow-14.0/sale-workflow-14.0-sale_advance_payment Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_advance_payment/fr/
- Allow to make advance payments when invoice has been created. This is justified by the fact that users may want to create a payment reversal in some circumstances. - Introduce payment type (inbound, outbound) to improve usability
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-14.0/sale-workflow-14.0-sale_advance_payment Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_advance_payment/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-15.0/sale-workflow-15.0-sale_advance_payment Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_advance_payment/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-15.0/sale-workflow-15.0-sale_advance_payment Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_advance_payment/
Currently translated at 100.0% (44 of 44 strings) Translation: sale-workflow-15.0/sale-workflow-15.0-sale_advance_payment Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_advance_payment/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-16.0/sale-workflow-16.0-sale_advance_payment Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_advance_payment/
Currently translated at 100.0% (44 of 44 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_advance_payment Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_advance_payment/it/
Currently translated at 100.0% (44 of 44 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_advance_payment Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_advance_payment/it/
Currently translated at 100.0% (44 of 44 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_advance_payment Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_advance_payment/it/
I've reviewed the tests and it seems the error is because the currency conversion is not applied correctly. If anyone can provide some insight, otherwise I'll review it again when I get a chance. |
Please Squash administrative commits with the previous commit for reducing commit noise. Check https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests#mergesquash-the-commits-generated-by-bots-or-weblate for details. |
sale_id = fields.Many2one( | ||
"sale.order", "Sale", readonly=True, states={"draft": [("readonly", False)]} | ||
) |
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.
Since Odoo 17, property states
is no longer supported.
You should define the readonly
attribute on the related views instead.
something of the like of <field name="sale_id" readonly="state != 'draft'">
"currency_id": sale.pricelist_id.currency_id.id | ||
or sale.currency_id.id, |
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.
https://github.com/odoo/odoo/blob/17.0/addons/sale/models/sale_order.py#L392-L401
The pricelist is not set anymore on draft SO.
The Travis issue might come from this.
I've ran the tests on the module in its version 16.0, and the currency_id doesn't match with the one of 17.0
Have a look at [17.0][MIG] purchase advance payment, it might be useful on what changes to do on the unit tests |
Thank you for the comments @vvrossem. I'm a bit busy right now, but I will review everything and make the necessary changes by the end of the week. |
/ocabot migration sale_advance_payment |
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.
Please remove the .deb
file. Except that, migration looks technically good to me
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.
This file should be removed, cf. OCA/oca-addons-repo-template#262
@@ -11,7 +11,7 @@ | |||
string="Pay sale advanced" | |||
type="action" | |||
groups="account.group_account_invoice" | |||
attrs="{'invisible': [('state', 'in', ['done','cancel'])]}" | |||
invisible="state == 'cancel'" |
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.
We don't want it anymore to be invisible when the state is done ? It does not look like a migration action
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.
Don't merge the PR while the debian file is in there.
This PR will be superseded by: |
superseeded by #3244 |
Migration to 17.0