75 lines
4.8 KiB
XML
75 lines
4.8 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<data>
|
|
<record model="ir.ui.view" id="view_purchase_requisition_form_inherit_sf">
|
|
<field name="name">purchase.requisition.form.inherit.sf</field>
|
|
<field name="model">purchase.requisition</field>
|
|
<field name="inherit_id" ref="purchase_requisition.view_purchase_requisition_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//header/button[@name='action_in_progress'][1]" position="after">
|
|
<field name="is_upload_contract_file" invisible="1"/>
|
|
<button name="upload_contract_file" string="上传合同" type="object" class="oe_highlight"
|
|
attrs="{'invisible': ['|', ('is_upload_contract_file', '=', True), ('state', 'not in', ['draft'])]}"/>
|
|
]}"/>
|
|
<button name="delete_contract_file" string="删除合同" type="object" class="oe_highlight"
|
|
attrs="{'invisible': ['|', ('is_upload_contract_file', '=', False), ('state', 'not in', ['draft'])]}"/>
|
|
</xpath>
|
|
<xpath expr="//group" position="replace">
|
|
<group>
|
|
<group>
|
|
<field name="type_id" attrs="{'readonly': [('state','!=','draft')]}"/>
|
|
<field name="date_end"
|
|
attrs="{'readonly': [('state','not in',('draft','in_progress','open','ongoing'))]}"/>
|
|
<field name="ordering_date"
|
|
attrs="{'readonly': [('state','not in',('draft','in_progress','open','ongoing'))]}"/>
|
|
<field name="schedule_date"
|
|
attrs="{'readonly': [('state','not in',('draft','in_progress','open','ongoing'))]}"/>
|
|
<field name="origin" placeholder="e.g. PO0025"
|
|
attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
|
<field name="picking_type_id" options="{'no_open': True, 'no_create': True}"
|
|
groups="stock.group_adv_location" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
|
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"
|
|
attrs="{'readonly': [('state','not in',('draft'))]}"/>
|
|
</group>
|
|
<group>
|
|
<field name="is_quantity_copy" invisible='1'/>
|
|
<field name="user_id"
|
|
attrs="{'readonly': [('state','not in',('draft','in_progress','open'))]}"
|
|
domain="[('share', '=', False)]"/>
|
|
<field name="vendor_id" context="{'res_partner_search_mode': 'supplier'}"
|
|
attrs="{'required': [('is_quantity_copy', '=', 'none')], 'readonly': [('state', 'in', ['ongoing','done'])]}"/>
|
|
<field name="currency_id" groups="base.group_multi_currency"/>
|
|
<field name="partner_ref"/>
|
|
<field name="contract_number"/>
|
|
<field name="payment_term_id" options="{'no_create': True}"/>
|
|
<field name="contract_summary"/>
|
|
</group>
|
|
</group>
|
|
</xpath>
|
|
<xpath expr="//page[@name='products']//tree//field[@name='product_id']" position="after">
|
|
<field name="materials_id"/>
|
|
<field name="materials_type_id"/>
|
|
<field name="part_number"/>
|
|
</xpath>
|
|
<xpath expr="//page[@name='products']//tree//field[@name='price_unit']" position="after">
|
|
<field name="delivery_date"/>
|
|
</xpath>
|
|
<xpath expr="//notebook/page[1]" position="before">
|
|
<page string="合同" name="contract_documents"
|
|
attrs="{'invisible': [('contract_document_id', '=', False)]}"
|
|
autofocus="autofocus">
|
|
<group>
|
|
<group>
|
|
<field name="contract_document_id" invisible="1"/>
|
|
<field name="contract_file_name" invisible="1"/>
|
|
<field name="contract_file"
|
|
widget="adaptive_viewer"
|
|
filename="contract_file_name"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo> |