Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
477 Vistas

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jun 25
1084
0
jul 24
5470
0
feb 24
524
0
ago 22
1941
1
ene 19
6027