-
-
Notifications
You must be signed in to change notification settings - Fork 720
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
[16.0][MIG] product_secondary_unit #2 #1325
Conversation
6f73826
to
062a481
Compare
<field name="model">product.template</field> | ||
<field name="inherit_id" ref="product.product_template_form_view" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//page[@name='general_information']/group[2]" position="after"> |
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.
The only thing I'd change here is to use a relative reference.
And set columns for the group and also for the field as well.
<xpath expr="//page[@name='general_information']/group[last()]" position="after" > <group string="Secondary Unit of Measure" col="4" groups="uom.group_uom" > <field name="secondary_uom_ids" colspan="4" nolabel="1">
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.
Ok done
062a481
to
559f120
Compare
As I mentioned, #1193 doesn't include de product variants part, and more important, without |
559f120
to
5c085db
Compare
/ocabot migration product_secondary_unit |
@otmanelagy Do you mind if we swtitch to this ? |
The migration issue (#1157) has been updated to reference the current pull request. |
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.
Code review
This PR has the |
# Copyright 2021 Tecnativa - Sergio Teruel | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
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.
Why did you remove the License?
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.
An error, corrected
<!-- Copyright 2018 Tecnativa - Sergio Teruel | ||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> |
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.
Why did you remove the License?
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.
idem, corrected
requirements.txt
Outdated
@@ -1,2 +1,3 @@ | |||
# generated from manifests external_dependencies | |||
odoo_test_helper |
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.
see comment in the manifest file
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.
The correct way to add this is in a file test-requirements.txt
@@ -12,6 +12,7 @@ | |||
"application": False, | |||
"installable": True, | |||
"depends": ["product"], | |||
"external_dependencies": {"python": ["odoo_test_helper"]}, |
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.
Its a bad idea to add odoo_test_helpder in the external_dependencies key since its only use for the unit test. A better way to do that is to use test-requirements.txt file
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.
Done
If you set |
Hi, |
@BT-aleonard Have you seen this PR (#1336)? About the secondary_uom_qty default? |
<odoo> | ||
<record id="product_template_form_view" model="ir.ui.view"> | ||
<field name="name">Product template Secondary Unit</field> | ||
<field name="model">product.template</field> | ||
<field name="inherit_id" ref="product.product_template_form_view" /> | ||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]" /> |
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.
Why remove the groups? Is the better way to not load the view
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.
Because it will raise this error Inherited view cannot have 'Groups' define on the record. Use 'groups' attributes inside the view definition
@@ -37,7 +41,6 @@ | |||
<field name="name">Product Secondary Unit</field> | |||
<field name="model">product.product</field> | |||
<field name="inherit_id" ref="product.product_normal_form_view" /> | |||
<field name="groups_id" eval="[(4, ref('uom.group_uom'))]" /> |
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.
Idem
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.
Idem :)
@sergio-teruel |
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: product-attribute-15.0/product-attribute-15.0-product_secondary_unit Translate-URL: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_secondary_unit/
5c085db
to
e49e1e5
Compare
e49e1e5
to
e18f69c
Compare
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.
LGTM: code review
This PR has the |
@sergio-teruel , can you merge please? I am working on another migration depending on this module. |
ping @pedrobaeza |
/ocabot merge nobump |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 137afe1. Thanks a lot for contributing to OCA. ❤️ |
Adding changes of #1246
In replacement of #1193
Changes
precompute=True
for ProductSecondaryUnitMixin.secondary_uom_qty instead ofdefault
UserWarning: Field sale.order.line.product_uom_qty cannot be precomputed as it depends on non-precomputed field sale.order.line.secondary_uom_qty
group_id
(groups
instead)Question