Skip to Content
Menu
This question has been flagged

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


Avatar
Discard
Related Posts Replies Views Activity
0
Dec 19
3062
0
Mar 23
3773
0
Jan 19
2332
0
Feb 16
2769
1
Feb 16
2558