Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4046 Lượt xem

Hello everyone,I have created a new module,and when I am trying to upgrade that,I am getting the following error :


Field 'company_id' used in attributes must be present in view but is missing:

 - 'company_id' in domain = "['|', ('company_id', '=', False), ('company_id', '=', company_id)]"

 - 'company_id' in domain = "[('sale_ok', '=', True), '|', ('company_id', '=', False), ('company_id', '=', company_id)]"


Field 'product_uom_category_id' used in attributes must be present in view but is missing:

 - 'product_uom_category_id' in domain = "[('category_id', '=', product_uom_category_id)]"


Context error:

View `sale.order.view.inherit1`

[view_id: 821, xml_id: n / a, model: sale.order, parent_id: 757]

None "while parsing /home/batsman/Desktop/odoo13ce/odoo/addons/hx_sales_/views/sale_hx_view.xml:2, near

can someone please guide me how to solve this error,thanks.
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

The error itself is giving you the solution :)

Please add "product_uom_category_id" and "product_uom_category_id" fields in your view. If you don't want them to visible, you can hide (invisible="1") but the fields should present in the view if you are using them in domain/attrs.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Yes the fields are added,and this module is upgrading in one other module,but doing problem in this module.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 10 23
97
ODOO 18 Upgrade Đã xử lý
2
thg 6 25
9402
1
thg 7 24
1964
1
thg 1 24
5145
2
thg 12 23
15018