Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
516 Zobrazení

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?



Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
čvn 25
1087
0
čvc 24
5480
0
úno 24
524
0
srp 22
1952
1
led 19
6033