Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Dez. 19
3874
0
März 23
5393
0
Jan. 19
3105
0
Feb. 16
3899
1
Feb. 16
3675