跳至内容
菜单
此问题已终结
1 回复
2111 查看

I've been trying to remove all the install warnings on my Odoo server. I'm down to 2 and they are related to depreciated .


I've tried to update them and it will install without any warnings but not show the reports with the following configuration:



I've read on the docmentation that for a tag that we need to add a binding_model_id field however I can't find anywhere a good description of how this is actually done. I see examples that use model_mrp_bom and mrp.model_bom but neither work. I get an install error saying they are not found.

形象
丢弃
最佳答案

Hi,

Use binding model as model_mrp_bom,

which depicts that the print button will shows under this model

<field name="binding_model_id" ref="model_mrp_bom"/>


Regards

形象
丢弃
编写者

Thank you for the quick response. I tried that this morning but it seems to be unable to find the model. As far as I can tell it's like it is looking for a new model within my module rather than the original mrp.bom one. (mrp_bom_structure_xlsx.model_mrp_bom)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 698, in _tag_root
f(rec)
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 568, in _tag_record
f_val = self.id_get(f_ref, raise_if_not_found=nodeattr2bool(rec, 'forcecreate', True))
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 681, in id_get
res = self.model_id_get(id_str, raise_if_not_found)
File "/home/odoo/src/odoo/odoo/tools/convert.py", line 687, in model_id_get
return self.env['ir.model.data']._xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 2012, in _xmlid_to_res_model_res_id
return self._xmlid_lookup(xmlid)[1:3]
File "<decorator-gen-40>", line 2, in _xmlid_lookup
File "/home/odoo/src/odoo/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 2005, in _xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: mrp_bom_structure_xlsx.model_mrp_bom

相关帖文 回复 查看 活动
1
6月 23
3347
2
4月 16
15945
Custom Report 已解决
2
9月 21
3577
4
10月 20
8558
1
8月 15
4886