-
-
Notifications
You must be signed in to change notification settings - Fork 359
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] delivery_package_number: Migration to 17.0 #839
[17.0][MIG] delivery_package_number: Migration to 17.0 #839
Conversation
9f90731
to
e4e66f4
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.
code + functional
@@ -10,14 +10,13 @@ | |||
"license": "AGPL-3", | |||
"installable": True, | |||
"application": False, | |||
"depends": ["delivery"], | |||
"depends": ["delivery", "stock_delivery"], |
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 this new dependency?
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.
it's a new glue module for pickings + delivery, the base delivery
only handles the carrier models and adds shipping methods to sales now. Though the depends could be abbreviated to just ["stock_delivery"]
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, I see. Maybe we should rename this to stock_delivery_package_number
? cc @chienandalu @sergio-teruel
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.
Odoo hasn't renamed any of their modules to stock_delivery_x
so far, not even another glue module delivery_stock_picking_batch
. I think it would more consistent to keep the current delivery_x
naming
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.
I'd keep it in the short form as well....
/ocabot migration delivery_package_number |
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.
There are pending forward ports in v16 as well: #788
ping @sergio-teruel
Hi @Josep-s73 , Can you add this commits from 16?? Thanks |
[UPD] Update delivery_package_number.pot [UPD] README.rst
[UPD] Update delivery_package_number.pot [UPD] README.rst Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: delivery-carrier-14.0/delivery-carrier-14.0-delivery_package_number Translate-URL: https://translation.odoo-community.org/projects/delivery-carrier-14-0/delivery-carrier-14-0-delivery_package_number/
…ransfer wizard if picking have not carrier. TT38549
…delivery_carrier_label module
deaa126
to
e37c6da
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.
There are still missing commits from v16. You can simply fetch a fresh v16 branch and redo the initial migration steps and then cherry pick your migration commit
name="number_of_packages" | ||
attrs="{'readonly': [('state', '=', 'done')]}" | ||
/> | ||
<field name="number_of_packages" readonly="state == 'done'" /> |
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.
<field name="number_of_packages" readonly="state == 'done'" /> | |
<field name="number_of_packages" readonly="state == 'done'" /> |
@@ -7,19 +7,19 @@ | |||
<field name="arch" type="xml"> | |||
<xpath expr="//footer" position="before"> | |||
<field name="ask_number_of_packages" invisible="1" /> | |||
<group attrs="{'invisible': [('ask_number_of_packages','=',False)]}"> | |||
<group invisible="ask_number_of_packages == False"> |
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.
I like to rely on coercion of truthy / falsey values. I.e.: None
is falsey but isn't equal to False
. It's also more semantic
<group invisible="ask_number_of_packages == False"> | |
<group invisible="not ask_number_of_packages"> |
<field name="number_of_packages" /> | ||
</group> | ||
</xpath> | ||
<xpath expr="//button[@special='cancel']" position="after"> | ||
<field | ||
name="print_package_label" | ||
widget="boolean_toggle" | ||
attrs="{'invisible': [('ask_number_of_packages','=',False)]}" | ||
invisible="ask_number_of_packages == False" |
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.
invisible="ask_number_of_packages == False" | |
invisible="not ask_number_of_packages" |
/> | ||
<label | ||
for="print_package_label" | ||
attrs="{'invisible': [('ask_number_of_packages','=',False)]}" | ||
invisible="ask_number_of_packages == False" |
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.
invisible="ask_number_of_packages == False" | |
invisible="not ask_number_of_packages" |
@@ -10,14 +10,13 @@ | |||
"license": "AGPL-3", | |||
"installable": True, | |||
"application": False, | |||
"depends": ["delivery"], | |||
"depends": ["delivery", "stock_delivery"], |
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.
"depends": ["delivery", "stock_delivery"], | |
"depends": ["stock_delivery"], |
…es wizard. TT48170
If we don't return the print action the label won't be downloaded. TT48759
9e8c795
to
563a0f8
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.
@@ -9,13 +9,13 @@ | |||
<group> | |||
<field | |||
name="number_of_packages" | |||
attrs="{'invisible': [('stock_number_package_validation_line_ids', '!=', [])]}" | |||
invisible="stock_number_package_validation_line_ids != []" |
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.
This is why you should rely on python boolean coercion. This will allways be invisible with this condition
invisible="stock_number_package_validation_line_ids != []" | |
invisible="stock_number_package_validation_line_ids" |
attrs="{'invisible': [('stock_number_package_validation_line_ids', '=', [])]}" | ||
invisible="stock_number_package_validation_line_ids == []" |
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 same goes for this one. This will never be invisible.
attrs="{'invisible': [('stock_number_package_validation_line_ids', '=', [])]}" | |
invisible="stock_number_package_validation_line_ids == []" | |
invisible="not stock_number_package_validation_line_ids" |
delivery_package_number/README.rst
Outdated
<<<<<<< HEAD | ||
* Pedro M. Baeza | ||
* David Vidal | ||
* Carlos Roca | ||
* Sergio Teruel | ||
- Pedro M. Baeza | ||
- David Vidal | ||
- Marçal Isern | ||
- Carlos Roca |
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.
You should have resolve merge conflicts in the previous commit and don't let them show in the diff...
563a0f8
to
d25bf60
Compare
<group> | ||
<field | ||
name="stock_number_package_validation_line_ids" | ||
invisible="not stock_number_package_validation_line_ids" | ||
nolabel="1" | ||
> | ||
<tree create="0" delete="0" editable="1"> | ||
<field | ||
name="picking_id" | ||
options="{'no_open': True}" | ||
readonly="1" | ||
force_save="1" | ||
/> | ||
<field name="number_of_packages" /> | ||
</tree> | ||
</field> | ||
</group> |
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.
To show the picking list correctly when validating package numbers in bulk
<group> | |
<field | |
name="stock_number_package_validation_line_ids" | |
invisible="not stock_number_package_validation_line_ids" | |
nolabel="1" | |
> | |
<tree create="0" delete="0" editable="1"> | |
<field | |
name="picking_id" | |
options="{'no_open': True}" | |
readonly="1" | |
force_save="1" | |
/> | |
<field name="number_of_packages" /> | |
</tree> | |
</field> | |
</group> | |
<field | |
name="stock_number_package_validation_line_ids" | |
invisible="not stock_number_package_validation_line_ids" | |
nolabel="1" | |
> | |
<tree create="0" delete="0" editable="1"> | |
<field | |
name="picking_id" | |
options="{'no_open': True}" | |
readonly="1" | |
force_save="1" | |
/> | |
<field name="number_of_packages" /> | |
</tree> | |
</field> |
d25bf60
to
db261ba
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.
Thanks 👍
This PR has the |
/ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 9593b9d. Thanks a lot for contributing to OCA. ❤️ |
Standard migration to 17.0