콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

Hi!

I'm using Odoo 12, last docker build, clean install.

I installed the sales addon, went into settings, checked the delivery costs options (which installed the delivery addon).

Then, I tried to install my custom addon that has a view that inherits the `delivery.view_order_form_with_carrier`, located in `odoo/addons/delivery/views/delivery_view.xml` at line 280.

For now, my view does nothing (just inherits, locate the `carrier_id` field, and write `hello world` after it).

During the installation of my addon, the following error appears :

Le champ `product_qty` n'existe pas

Contexte de l'erreur : 
Vue `custom.delivery.sale.order.form.view.with_carrier` [view_id: 1014, xml_id: n/a, model: sale.order, parent_id: 1003] None" while parsing /mnt/extra-addons/custom/views/delivery/delivery_view.xml:3, near <record id="custom.delivery__view_order_form_with_carrier" model="ir.ui.view">
        <field name="name">custom.delivery.sale.order.form.view.with_carrier</field>
        <field name="model">sale.order</field> <field name="inherit_id" ref="delivery.view_order_form_with_carrier"/> <field name="arch" type="xml"> <xpath expr="//field[@name='carrier_id']" position="after"> <span>Hello, World!</span> </xpath> </field> </record>

Which means that the field `product_qty` does not exist.

This field is used in the view I'm trying to inherit, I'm not using it in my custom view as you can see.
This field is defined in the `SaleOrderLine` model in the `delivery` module.
The view i'm trying to inherit is related to the `SaleOrder` model.

I don't know why it works if no inheritance (to me, it should not as the field is not defined on SaleOrder model), and why not if I use inheritance on this view.

Is there something I don't know about views and inheritance? Or maybe a bug?
Do you know how can I inherit this view to make some customizations?

Thank you a lot in advance.

아바타
취소
관련 게시물 답글 화면 활동
1
11월 24
1823
5
7월 24
93414
1
12월 23
3181
1
5월 22
3882
0
1월 20
3053