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

I have two different views on the same model purchase.order.shipment


view 1:
 <notebook><pagestring="Products"><fieldname="shipment_lines"attrs="{'readonly': [('state', '!=', 'draft')]}"widget="section_and_note_one2many"mode="tree">
<treecreate="false"string="Shipment Order Lines"editable="bottom"><fieldname="shipment_id"invisible="1"/><fieldname="product_id"readonly='1'force_save="1"/><fieldname="product_uom"invisible='1'force_save="1"/><fieldname="product_qty"readonly='1'force_save="1"/><fieldname="qty_received"readonly='1'force_save="1"/><fieldname="remaining_qty"readonly='1'force_save="1"/>
<fieldname="shipment_qty_received"required='1'force_save="1"/>
tree>field>page>notebook>

view 2: <pagestring="Assesment"name="assesment"><fieldname="shipment_lines"><treename="assesment"create="false"editable="bottom"><fieldname="shipment_id"invisible="1"/><fieldname="product_id"readonly='1'/><fieldname="hs_code"readonly='1'/><fieldname="shipment_qty_pieces"readonly='1'/><fieldname="product_qty"invisible="1"/><fieldname="price_unit"invisible="1"/><fieldname="net_weight"readonly='1'/><fieldname="price_subtotal"readonly='1'/><fieldname="mav"/><fieldname="assessable_value_bdt"/><fieldname="cd"/><fieldname="rd"/><fieldname="sd"/><fieldname="vat"/><fieldname="ait"/><fieldname="at"/><fieldname="psi"/><fieldname="total_duty_tax"/>tree>field>page>
but view 2 is overlaping view 1



For view 1 i was expecting this view:


아바타
취소
베스트 답변

Hi, 

Here the issue is that in some cases we couldn't add multiple tree views for the same one2many field, When we add like that it will always overlap the first view. So try to add another one2many field with the same functionalities as the field 'shipment_lines' and add that one2many field to the second view.

Python:// Add the new one2many field

shipment_lines = fields.One2many( ) //Existing field
new_shipment_lines_ids = fields.One2many( ) // New field with same functionalioties of field 'shipment_lines'

XML View:

View 1

<record id="action_task_generation" model="ir.cron">
    <field name="name">Auto Task Generation</field>
    <field name="model_id" ref="model_crm_lead"/>
    <field name="state">code</field>
    <field name="code">model.action_generate_task()</field>
    <field name="interval_number">1</field>
    <field name="interval_type">days</field>
    <field name="numbercall">-1</field>
    <field name="active" eval="True"/>
    <field name="doall" eval="True"/>
</record>


View 2:

<pagestring="Assesment"name="assesment">

<fieldname="new_shipment_lines_ids">

<treename="assesment"create="false"editable="bottom">

<fieldname="shipment_id"invisible="1"/>

<fieldname="product_id"readonly='1'/>

<fieldname="hs_code"readonly='1'/>

<fieldname="shipment_qty_pieces"readonly='1'/>

<fieldname="product_qty"invisible="1"/>

<fieldname="price_unit"invisible="1"/>

<fieldname="net_weight"readonly='1'/>

<fieldname="price_subtotal"readonly='1'/>

<fieldname="mav"/>

<fieldname="assessable_value_bdt"/>

<fieldname="cd"/><fieldname="rd"/>

<fieldname="sd"/><fieldname="vat"/>

<fieldname="ait"/><fieldname="at"/>

<fieldname="psi"/><fieldname="total_duty_tax"/>tree>field>page>


Hope it helps

아바타
취소
관련 게시물 답글 화면 활동
1
7월 25
1991
2
7월 23
1909
2
9월 23
5886
0
3월 23
2283
0
4월 22
3782