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

[17.0][MIG] sale_advance_payment: Migration to 17.0 #3156

Closed
wants to merge 43 commits into from

Conversation

Abranes
Copy link
Member

@Abranes Abranes commented May 27, 2024

Migration to 17.0

omar7r and others added 30 commits May 27, 2024 23:24
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/
Ivorra78 and others added 11 commits May 27, 2024 23:24
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/
@Abranes
Copy link
Member Author

Abranes commented May 29, 2024

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.

@vvrossem
Copy link
Contributor

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.

Comment on lines +10 to +12
sale_id = fields.Many2one(
"sale.order", "Sale", readonly=True, states={"draft": [("readonly", False)]}
)
Copy link
Contributor

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'">

Comment on lines +106 to +107
"currency_id": sale.pricelist_id.currency_id.id
or sale.currency_id.id,
Copy link
Contributor

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

@vvrossem
Copy link
Contributor

vvrossem commented Jun 3, 2024

Have a look at [17.0][MIG] purchase advance payment, it might be useful on what changes to do on the unit tests

@Abranes
Copy link
Member Author

Abranes commented Jun 3, 2024

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.

@rousseldenis
Copy link
Contributor

/ocabot migration sale_advance_payment

@rousseldenis
Copy link
Contributor

@Abranes

Copy link

@Camille0907 Camille0907 left a 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

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'"

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

Copy link
Member

@gurneyalex gurneyalex left a 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.

@yankinmax
Copy link
Contributor

This PR will be superseded by:

@gurneyalex
Copy link
Member

superseeded by #3244

@gurneyalex gurneyalex closed this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.