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

Hi, how can I modify quotation form view on sales app? Thanks for this cool platform.

아바타
취소
작성자

as it threw me an error editing the list view / form view

UncaughtPromiseError > OwlError
Uncaught Promise > The following error occurred in onWillStart: "View is not a constructor"
OwlError: The following error occurred in onWillStart: "View is not a constructor"
at wrapError (https://toa-global3.odoo.com/web/assets/190-23b30da/web.assets_common.min.js:1543:77)
at onWillStart (https://toa-global3.odoo.com/web/assets/190-23b30da/web.assets_common.min.js:1549:117)
at EditorAdapter.setup (https://toa-global3.odoo.com/web/assets/191-1ea2b0d/web.assets_backend.min.js:8946:401)
at EditorAdapter.setup (https://toa-global3.odoo.com/web/assets/199-0627d94/web_studio.studio_assets.min.js:48:15)
at new ComponentNode (https://toa-global3.odoo.com/web/assets/190-23b30da/web.assets_common.min.js:1506:136)
at https://toa-global3.odoo.com/web/assets/190-23b30da/web.assets_common.min.js:2026:6
at ControllerComponent.template (eval at compile (https://toa-global3.odoo.com/web/assets/190-23b30da/web.assets_common.min.js:1990:370), <anonymous>:11:27)
at Fiber._render (https://toa-global3.odoo.com/web/assets/190-23b30da/web.assets_common.min.js:1433:96)
at Fiber.render (https://toa-global3.odoo.com/web/assets/190-23b30da/web.assets_common.min.js:1432:6)
at ComponentNode.initiateRender (https://toa-global3.odoo.com/web/assets/190-23b30da/web.assets_common.min.js:1511:47)

Caused by: TypeError: View is not a constructor
at Class._getX2mFieldsView (https://toa-global3.odoo.com/web/assets/199-0627d94/web_studio.studio_assets.min.js:801:425)
at Class.start (https://toa-global3.odoo.com/web/assets/199-0627d94/web_studio.studio_assets.min.js:774:259)
at prototype.<computed> [as start] (https://toa-global3.odoo.com/web/assets/190-23b30da/web.assets_common.min.js:5681:488)
at https://toa-global3.odoo.com/web/assets/190-23b30da/web.assets_common.min.js:6018:52

베스트 답변

Hi,

In order to modify the quotation form view or any other views in Odoo, you can just inherit that view and can add the desired changes to the view.
For example, for modifying the sales view, you can add this xml code in your xml file and add it in module manifest.

<record id="view_order_form_inherit_example" model="ir.ui.view">


               <field name="name">sale.order.form.inherit.example</field>


              <field name="model">sale.order</field>


              <field name="inherit_id" ref="sale.view_order_form"/>


              <field name="arch" type="xml">


                     <xpath expr="//field[@name='partner_id']" position="after">


                            <field name="custom_field_name"/>


                      </xpath>


                </field>


          </record>


Regards

아바타
취소
작성자

Hi @Cybrosys Techno Solutions Pvt.Ltd so meaning to say, I couldn't just edit straightaway? Thanks for your response, really appreciated it :)

관련 게시물 답글 화면 활동
4
8월 15
6470
1
4월 25
1007
1
3월 24
2428
1
1월 24
1610
0
12월 23
1161