Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
566 Представления

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?



Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
июн. 25
1141
0
июл. 24
5566
0
февр. 24
524
0
авг. 22
2082
1
янв. 19
6110