Files
gzth/yuthon_purchase/views/purchase_workflow_views.xml
T
2025-12-13 16:34:36 +08:00

148 lines
7.7 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_purchase_workflow_tree" model="ir.ui.view">
<field name="name">purchase.workflow.tree</field>
<field name="model">purchase.workflow</field>
<field name="arch" type="xml">
<tree string="采购工作流">
<field name="name"/>
<field name="user_id"/>
<field name="partner_id"/>
<field name="pay_way"/>
<field name="purchase_type"/>
</tree>
</field>
</record>
<record id="view_purchase_workflow_form" model="ir.ui.view">
<field name="name">purchase.workflow.form</field>
<field name="model">purchase.workflow</field>
<field name="arch" type="xml">
<form string="采购工作流表单">
<sheet>
<widget name="web_ribbon" title="普件" bg_color="text-bg-success" invisible="urgency_level != 'normal'"/>
<widget name="web_ribbon" title="急件" bg_color="text-bg-warning" invisible="urgency_level != 'urgent'"/>
<widget name="web_ribbon" title="特急" bg_color="text-bg-danger" invisible="urgency_level != 'emergency'"/>
<group col="2">
<group>
<field name="code" string="流水号" readonly="1"/>
</group>
<group>
<field name="urgency_level" readonly="1"/>
</group>
</group>
<div class="col-12 text-center mb-3">
<h1>
<field name="name_title" readonly="1"/>
</h1>
</div>
<div class="oe_title mb-4">
<label for="name"/>
<h1>
<field name="name" string="标题" required="1"/>
</h1>
</div>
<group string="审批信息" col="2" class="mb-4">
<group>
<field name="work_end" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="start_date"/>
<field name="user_id" string="申请人" required="1"/>
<field name="purchase_type" required="1"/>
<field name="partner_id" domain="[('user_ids', '=', False)]" required="1"/>
<field name="pay_way" required="1"/>
</group>
<group>
<field name="date_order" string="订单日期" required="1"/>
<field name="date_planned" string="预计到货日期" invisible="purchase_type != 'fixed'" required="1"/>
<field name="service_start_date" string="服务开始时间" invisible="purchase_type != 'service'"/>
<field name="service_end_date" string="服务结束时间" invisible="purchase_type != 'service'"/>
<field name="service_year" string="服务年限" invisible="purchase_type != 'service'"/>
<field name="department_id" invisible="1"/>
</group>
</group>
<group>
<field name="reason_text"/>
</group>
<group col="2">
<group>
<field name="document_ids" string="附件" widget="preview_many2many"/>
<field name="license_id" invisible="purchase_type != 'service'" widget="preview_many2one"/>
</group>
<group>
<field name="aptitude_id" invisible="purchase_type != 'service'" widget="preview_many2one"/>
<field name="contract_id" string="服务合同" invisible="purchase_type != 'service'" widget="preview_many2one"/>
</group>
</group>
<notebook string="采购明细" >
<page string="固定资产明细" invisible="purchase_type != 'fixed'">
<field name="fixed_line_ids">
<tree editable="bottom">
<field name="purchase_id" column_invisible="1"/>
<field name="product_id" required="1"/>
<field name="brand"/>
<field name="specs"/>
<field name="product_packaging_id"/>
<field name="number"/>
<field name="unit_id"/>
<field name="price_unit"/>
<field name="taxes_id"/>
<field name="total" sum="Total"/>
<field name="name" string="描述" required="1"/>
</tree>
</field>
</page>
<page string="低值易耗明细" invisible="purchase_type != 'low'">
<field name="low_line_ids">
<tree editable="bottom">
<field name="purchase_id" column_invisible="1"/>
<field name="product_id" string="物品名称" required="1"/>
<field name="name"/>
<field name="brand"/>
<field name="specs"/>
<field name="number"/>
<field name="unit_id"/>
<field name="price"/>
<field name="taxes_id"/>
<field name="total" sum="Total"/>
</tree>
</field>
</page>
<page string="服务明细" invisible="purchase_type != 'service'">
<field name="service_line_ids">
<tree editable="bottom">
<field name="service_id" column_invisible="1"/>
<field name="product_id" required="1"/>
<field name="name" string="描述" required="1"/>
<field name="frequency"/>
<field name="fee"/>
<field name="product_packaging_id"/>
<field name="unit_id"/>
<field name="price"/>
<field name="taxes_id"/>
<field name="total" sum="Total"/>
</tree>
</field>
</page>
<page string="付款详情" invisible="pay_way == 'onetime'">
<field name="pay_line_ids">
<tree editable="bottom">
<field name="purchase_id" column_invisible="1"/>
<field name="payment_stage" required="1"/>
<field name="amount"/>
<field name="payment_date"/>
<field name="remake"/>
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_purchase_workflow_action" model="ir.actions.act_window">
<field name="name">采购申请单</field>
<field name="res_model">purchase.workflow</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>