Skip to content

[18.0][MIG] sale_order_line_input: Migration to 18.0#3795

Merged
OCA-git-bot merged 22 commits intoOCA:18.0from
Tecnativa:18.0-mig-sale_order_line_input
Jul 11, 2025
Merged

[18.0][MIG] sale_order_line_input: Migration to 18.0#3795
OCA-git-bot merged 22 commits intoOCA:18.0from
Tecnativa:18.0-mig-sale_order_line_input

Conversation

@victoralmau
Copy link
Copy Markdown
Member

@victoralmau victoralmau commented Jul 7, 2025

Supersedes #3458

Changes done:

Migration to 18.0

Please @carlosdauden and @pedrobaeza can you review it?

@Tecnativa TT54282

@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot migration sale_order_line_input

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Jul 8, 2025
@pedrobaeza pedrobaeza requested a review from carlosdauden July 8, 2025 07:47
<field
name="product_id"
readonly="not product_updatable"
required="not display_type"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is something I have to comment on every migration...
The objective of this module is to manage the order lines from a tree view, but keeping as much as possible the behaviour they have in the normal order view.
To do this, what you have to do in the migration of this module is to go to compare the order view and put the same fields with the same attributes (except the conditions in which ‘parent.’ is used).

This is just an example of the attributes that have not been checked, but there are others like with, string, etc. that are not seen here either:
https://github.com/odoo/odoo/blob/c84b67e5dca1a74e1a5862e754455944015f4105/addons/sale/views/sale_order_views.xml#L531

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok, “copied” the sale view in this module; I don't like this technique because for example many things will not work the same (sections, notes, sequences) in addition to the changes that other modules make in the sales order lines in the form view (add an extra column for example). It could also be the case (with other OCA modules that extend sales) that in order to create new lines, fields that are not in the view are required and/or need to be defined.

The sol_product_many2one widget is not supported outside the order form view, therefore the product_id field is always shown and the product_template_id field is hidden.

2 extra fields have been added:

carlosdauden and others added 22 commits July 9, 2025 08:13
[UPD] README.rst

[UPD] Update sale_order_line_input.pot
[UPD] Update sale_order_line_input.pot

[UPD] README.rst

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_order_line_input
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_order_line_input/zh_CN/

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_order_line_input
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_order_line_input/
[UPD] Update sale_order_line_input.pot

[UPD] README.rst
to solve a pypi upload issue
Since v13 the customer field on res.partner model has been disappeared,
so when we try to add a value on the field order_partner_id we get an
error.

sale_order_line_input 13.0.1.1.0
[MIG] sale_order_line_input: Migration to 14.0
[UPD] Update sale_order_line_input.pot

[UPD] README.rst

[IMP] update dotfiles [ci skip]

[UPD] README.rst

[UPD] README.rst
Currently translated at 100.0% (22 of 22 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_order_line_input
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_line_input/it/
[UPD] Update sale_order_line_input.pot

[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: sale-workflow-17.0/sale-workflow-17.0-sale_order_line_input
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_order_line_input/it/

Translated using Weblate (Italian)

Currently translated at 100.0% (18 of 18 strings)

Translation: sale-workflow-17.0/sale-workflow-17.0-sale_order_line_input
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_order_line_input/it/
Translated using Weblate (Turkish)

Currently translated at 100.0% (18 of 18 strings)

Translation: sale-workflow-17.0/sale-workflow-17.0-sale_order_line_input
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_order_line_input/tr/
TT54282

Co-authored-by: Raura <jcolljeyce@gmail.com>
@victoralmau victoralmau force-pushed the 18.0-mig-sale_order_line_input branch from 9e9aa83 to e837394 Compare July 9, 2025 10:30
@victoralmau
Copy link
Copy Markdown
Member Author

Ping @CarlosRoca13

Copy link
Copy Markdown
Contributor

@carlosdauden carlosdauden left a comment

Choose a reason for hiding this comment

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

Great work.

I think it is better not to create those additional fields to show the amounts with and without tax.

On the one hand we can cause confusion to the user when viewing records of several companies with different configuration and in the same column some amounts are with taxes and others without taxes.
On the other hand, we increase the complexity of the module in an ‘unnecessary’ way, as I think that one option would be to add all the fields in the view so that the user can manage them as he/she sees fit.

We can put optional=‘show’ for the fields without taxes and optional=‘hide’ for the fields with taxes and this way we are coherent with the default values that Odoo brings regarding this configuration.

Copy link
Copy Markdown
Contributor

@carlosdauden carlosdauden left a comment

Choose a reason for hiding this comment

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

Sorry, I understand that the use of the additional fields does not cause confusion

@pedrobaeza
Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 18.0-ocabot-merge-pr-3795-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 20411d1 into OCA:18.0 Jul 11, 2025
5 of 7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 43f33c4. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 18.0-mig-sale_order_line_input branch July 11, 2025 11:49
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.