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_order_line_sequence: Migration to 18.0 #3433

Open
wants to merge 32 commits into
base: 18.0
Choose a base branch
from

Conversation

BT-mchechlacz
Copy link

No description provided.

nikul-serpentcs and others added 30 commits November 26, 2024 11:35
* sale_order_line_sequence v10

* OCA Transbot updated translations from Transifex

* Update sale_order_line_sequence.pot

* Translated using Weblate (Portuguese)

Currently translated at 100,0% (6 of 6 strings)

Translation: sale-workflow-10.0/sale-workflow-10.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_order_line_sequence/pt/

* sale_order_line_sequence: migration to 11.0

* Update sale_order_line_sequence.pot

* [MIG] sale_order_line_sequence v12
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Currently translated at 100.0% (8 of 8 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_order_line_sequence/es/
Currently translated at 100.0% (8 of 8 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_order_line_sequence/de/
Currently translated at 100.0% (8 of 8 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_order_line_sequence/zh_CN/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-15.0/sale-workflow-15.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_order_line_sequence/
Currently translated at 25.0% (2 of 8 strings)

Translation: sale-workflow-15.0/sale-workflow-15.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_order_line_sequence/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_line_sequence/
Currently translated at 100.0% (8 of 8 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_line_sequence/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_line_sequence/
Currently translated at 100.0% (10 of 10 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_line_sequence/es/
Currently translated at 100.0% (10 of 10 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_line_sequence/it/
Currently translated at 100.0% (10 of 10 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_line_sequence/pt_BR/
Currently translated at 70.0% (7 of 10 strings)

Translation: sale-workflow-17.0/sale-workflow-17.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_order_line_sequence/fr/
Currently translated at 70.0% (7 of 10 strings)

Translation: sale-workflow-17.0/sale-workflow-17.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_order_line_sequence/fr/
Currently translated at 100.0% (10 of 10 strings)

Translation: sale-workflow-17.0/sale-workflow-17.0-sale_order_line_sequence
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_order_line_sequence/fr/
@BT-mchechlacz BT-mchechlacz force-pushed the 18.0-mig-sale_order_line_sequence branch 2 times, most recently from 9daae73 to 4877de4 Compare November 26, 2024 10:51
@BT-mchechlacz BT-mchechlacz force-pushed the 18.0-mig-sale_order_line_sequence branch from 4877de4 to e8ed45b Compare November 26, 2024 10:52
Copy link

@BT-crodriguez BT-crodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just some licenses missing

@@ -0,0 +1 @@
from . import test_sale_order_line_sequence

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[change] Missing license header

# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BT-crodriguez License headers are not needed in __init__.py files.

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[change] Missing license header

<?xml version="1.0" encoding="utf-8" ?>
<!--
  License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are licenses needed in each file? https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst only mentions the manifest.

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[change] Missing license header

<?xml version="1.0" encoding="utf-8" ?>
<!--
  License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[change] Missing license header

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[change] Missing license header

@rousseldenis
Copy link
Contributor

/ocabot migration sale_order_line_sequence

@api.depends("move_id.invoice_line_ids")
def _compute_related_so_sequence(self):
for rec in self:
if len(rec.mapped("move_id.line_ids.sale_line_ids.order_id")) > 1:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that you are touching this line in the migration commit, better go all the way with

Suggested change
if len(rec.mapped("move_id.line_ids.sale_line_ids.order_id")) > 1:
if len(rec.move_id.line_ids.sale_line_ids.order_id) > 1:

id="report_saleorder_document_sequence"
inherit_id="sale.report_saleorder_document"
>
<xpath expr="//table[hasclass('table')]/thead/tr/th[1]" position="before">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make the table selection more specific? I see multiple tables with this class in the document. I think each does have a unique class that you can add here.

{
"name": "Sale Order Line Sequence",
"summary": "Propagates SO line sequence to invoices and stock picking.",
"version": "18.0.1.1.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"version": "18.0.1.1.0",
"version": "18.0.1.0.0",

<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<field name="order_line" position="before">
<field name="max_line_sequence" invisible="1" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fields like this, that will never be visible and are only used in attributes of other fields are now added automatically in Odoo 18. I think we can consider removing them from our views for a slightly cleaner layout. What do you think?

I only added this to the migration guidelines yesterday, so you will not have seen it before.

Missing fields used in domains and other attributes are added to the view as invisible automatically. If you encounter fields in views with invisible="True", they can probably be removed. Reference: odoo/odoo#137031

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.