跳至内容
菜单
此问题已终结

Hello

I'm trying to add a custom sequence to the sale order form. How can you determine the number of lines for the current order, when you press "add an item"? I saw a some older posts which use the context variable which was passed to the default_get in sale.order.line like this:

next_sequence = len(context.get('ref_ids')) + 1

https://www.odoo.com/de_DE/forum/hilfe-1/question/how-to-generate-automatic-sequence-number-in-one2many-field-67834

In odoo 10 default_get() gets passed two variables:

self, fields_list

fields_list is a list of fields from tha sale_order_line table. The self variable contains a lot of information but I can not find the information. Even with pydev. Is default_get still the way to go?

Thank for any input


形象
丢弃
相关帖文 回复 查看 活动
0
12月 19
3815
0
3月 23
5269
0
1月 19
2987
0
2月 16
3814
1
2月 16
3613