Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: Porting sale_order_type to 17
by
Francesco Ballerini
Hi Gandalf Corvotempesta I appreciate your name : )
1 - In the context of a porting I think it's correct to simply remove "groups" attribute from fields in order to resolve the missing xml_id, as the group has been completely removed from the source code
2 - about this case I'm not sure because I don't know if it's possible in odoo17, to avoid the usage of deprecated python argument "states" while keeping the "readonly" condition in python. If you don't find a way to keep this in python, I think there is no problem on defining the "readonly" conditions on XML. Until odoo16 you could have parsed type_id readonly states into XML by adding "attrs" attribute on field like the following code
<field
name="type_id"
attrs="{'readonly': [('state', 'in', ['sale', 'done', 'cancel'])]}"
/>
although in Odoo17 I think this expression has to be changed into something like
<field
name="type_id"
readonly="state not in ['sale', 'done', 'cancel']"
/>
as a consequence of this commit.
Best regards
--
Francesco Ballerini
Il giorno dom 19 nov 2023 alle ore 18:57 Gandalf Corvotempesta <notifications@odoo-community.org> ha scritto:
Hi guys i'm trying to port sale_order_type module to Odoo 17 (i'm not a python developer) I've done almost everything and now the module install properly (and seems to work properly too) But there are two things i don't know how to solve: 1. group_display_incoterm was removed from sale_stock and thus the actually views used by sale_order_type doens't install properly. I've removed the reference to ' groups="sale_stock.group_display_incoterm" ' but I don't know if this is correct or has to be replaced with something else 2. `states` are deprecated in 17. How can I replace these ? https://github.com/OCA/sale-workflow/blob/16.0/sale_order_type/models/sale.py#L20-L23 Tnx_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe