Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
703 มุมมอง

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
1238
0
ก.ค. 24
5771
0
ก.พ. 24
524
0
ส.ค. 22
2170
1
ม.ค. 19
6238