[18.0][MIG] sale_order_line_input: Migration to 18.0#3795
[18.0][MIG] sale_order_line_input: Migration to 18.0#3795OCA-git-bot merged 22 commits intoOCA:18.0from
Conversation
|
/ocabot migration sale_order_line_input |
| <field | ||
| name="product_id" | ||
| readonly="not product_updatable" | ||
| required="not display_type" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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:
company_price_amount: They replace theprice_subtotal+price_totalfields because it is not possible to make column_invisible with conditional and also because it will not always be the same value (if we are showing lines from different companies and each one has a defined configuration). https://github.com/odoo/odoo/blob/a7a29ed691db4f1607c0d12929c56845681164fa/addons/sale/views/sale_order_views.xml#L657company_price_tax_incl_excl: Replaces the fields (Optional amounts)price_total+price_subtotalfor the same reason as above. https://github.com/odoo/odoo/blob/a7a29ed691db4f1607c0d12929c56845681164fa/addons/sale/views/sale_order_views.xml#L666
[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/
[UPD] README.rst
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
…any domains don't work. Taxes empty
[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
…d to show order from order line
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>
9e9aa83 to
e837394
Compare
|
Ping @CarlosRoca13 |
carlosdauden
left a comment
There was a problem hiding this comment.
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.
carlosdauden
left a comment
There was a problem hiding this comment.
Sorry, I understand that the use of the additional fields does not cause confusion
|
/ocabot merge nobump |
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at 43f33c4. Thanks a lot for contributing to OCA. ❤️ |
Supersedes #3458
Changes done:
BaseCommonin testsMigration to 18.0
Please @carlosdauden and @pedrobaeza can you review it?
@Tecnativa TT54282