-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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] sale_order_line_delivery_state: Migration to 17.0 #3333
base: 17.0
Are you sure you want to change the base?
[17.0] [MIG] sale_order_line_delivery_state: Migration to 17.0 #3333
Conversation
eac4ac9
to
9ebef89
Compare
Currently translated at 100.0% (10 of 10 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_order_line_delivery_state Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_line_delivery_state/es/
Currently translated at 100.0% (10 of 10 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_order_line_delivery_state Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_line_delivery_state/it/
9ebef89
to
b2daa7c
Compare
/ocabot migration sale_order_line_delivery_state |
@@ -18,14 +18,14 @@ | |||
type="object" | |||
string="Force delivery done" | |||
states="done" | |||
attrs="{'invisible': ['|', ('force_delivery_state', '=', True), ('delivery_state', '=', 'done')]}" | |||
invisible="['|', ('force_delivery_state', '=', True), ('delivery_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.
Does this work? I thought a Python expression was expected here, like force_delivery_state or delivery_state == 'done'
], | ||
# Compute method have a different name then the field because | ||
# the method _compute_delivery_state already exist to compute | ||
# the field delivery_set in odoo delivery module |
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.
In Odoo 17, this no longer seems to be the case. There is a _compute_delivery_state
method, still in the Odoo delivery module, but it's only on sale.order
, not on sale.order.line
.
b2daa7c
to
ce4f543
Compare
ce4f543
to
b703ec0
Compare
states="done" | ||
invisible="force_delivery_state or 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.
Ah there is a states attribute as well. This might explain why you did not use the delivery_state
field from the previous attrs, even though it still makes sense.
states="done" | |
invisible="force_delivery_state or state == 'done'" | |
invisible="force_delivery_state or state != 'done' or delivery_state == 'done'" |
states="done" | ||
invisible="not force_delivery_state" |
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.
Here I don't think it makes sense to hide the button if the order is not in done state. If force_delivery_state
is set on an order that is not in done
state it's an exceptional case that should be visualized IMHO.
states="done" | |
invisible="not force_delivery_state" | |
invisible="not force_delivery_state" |
store=True, | ||
) | ||
|
||
force_delivery_state = fields.Boolean( |
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.
Maybe this field should be set to copy=False
. What do you think?
No description provided.