Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

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


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
gru 19
3814
0
mar 23
5256
0
sty 19
2979
0
lut 16
3778
1
lut 16
3589