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

Odoo 16 Enterprise


I simply install module manufacture (mrp) then I want to add new company. I got error

  File "/home/it-new/odoo/odoo16/enterprise/stock/models/stock_warehouse.py", line 131, in create
    new_vals = warehouse._create_or_update_sequences_and_picking_types()
  File "/home/it-new/odoo/odoo16/enterprise/stock/models/stock_warehouse.py", line 348, in _create_or_update_sequences_and_picking_types
    data[picking_type].update(create_data[picking_type])
KeyError: 'pbm_type_id'


I debug it and found that it is from stock.warehouse.  


the error happen here

data = self._get_picking_type_update_values()

create_data, max_sequence = self._get_picking_type_create_values(max_sequence)


for picking_type, values in data.items():

if self[picking_type]:

self[picking_type].sudo().sequence_id.write(sequence_data[picking_type])

self[picking_type].write(values)

else:

data[picking_type].update(create_data[picking_type]) # <=== here

So I investigate the source of the data. pbm_type_id​ is from mrp​ module

if we look in the picture below, _get_picking_type_update_values()​ don't have pbm_type_id​ means that this method didn't pass mrp​ module

but _get_picking_type_create_values(max_sequence)​ have pbm_type_id​  means that this method pass mrp​ module


I already add stock​ and mrp​ in the depends inside manifest module 



anyone know how to fix this?



Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
cze 25
1087
0
lip 24
5476
0
lut 24
524
0
sie 22
1947
1
sty 19
6033