添加功能
This commit is contained in:
@@ -12,8 +12,9 @@ class IssueLibrary(models.Model):
|
||||
name = fields.Char(string='议题名称')
|
||||
name_text = fields.Text(string='议题名称', compute='_compute_name', readonly=False)
|
||||
depart_opinions = fields.Text(string='部门意见')
|
||||
topic_content = fields.Text(string='议题详细描述')
|
||||
topic_content = fields.Text(string='事项背景')
|
||||
will_based = fields.Text(string='上会依据')
|
||||
deliberation_content = fields.Text(string='审议内容', default='建议同意')
|
||||
is_invisible_workflow = fields.Boolean(string="流程隐藏的判断")
|
||||
code = fields.Char(string='编号', required=True, copy=False,
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('issue_library_code'))
|
||||
|
||||
@@ -65,9 +65,10 @@
|
||||
<group>
|
||||
<field name="name" required="1" force_save="1" invisible="is_invisible_workflow"/>
|
||||
<field name="topic_content" invisible="is_invisible_workflow"/>
|
||||
<field name="will_based"/>
|
||||
<field name="deliberation_content"/>
|
||||
<field name="documents_ids" widget="preview_many2many" invisible="is_invisible_workflow"/>
|
||||
<field name="is_invisible_workflow" invisible="1"/>
|
||||
|
||||
<field name="name_text" invisible="1"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
|
||||
@@ -32,6 +32,8 @@ class InheritPurchaseOrder(models.Model):
|
||||
pay_way = fields.Selection([('onetime', '一次性'), ('installment', '分期')], string="付款方式", default='onetime')
|
||||
reason_text = fields.Text(string="申请事由")
|
||||
pay_line_ids = fields.One2many('purchase.order.pay.line', 'order_id', string="付款详情")
|
||||
low_line_ids = fields.One2many('purchase.low.line', 'order_id', string="低值易耗明细")
|
||||
service_line_ids = fields.One2many('purchase.service.line', 'order_id', string="服务明细")
|
||||
|
||||
def end_approval(self):
|
||||
self.button_confirm()
|
||||
|
||||
@@ -114,7 +114,7 @@ class PurchaseOrderPayLine(models.Model):
|
||||
_description = "付款详情"
|
||||
|
||||
purchase_id = fields.Many2one('purchase.workflow', string="关联采购工作流")
|
||||
order_id = fields.Many2one('purchase.order', string="关联采购工作流")
|
||||
order_id = fields.Many2one('purchase.order', string="关联采购")
|
||||
payment_stage = fields.Char(string="付款阶段")
|
||||
amount = fields.Char(string="比例/金额")
|
||||
payment_date = fields.Date(string="付款日期")
|
||||
@@ -154,7 +154,9 @@ class PurchaseLowLine(models.Model):
|
||||
_name = 'purchase.low.line'
|
||||
_description = '低值易耗采购明细'
|
||||
purchase_id = fields.Many2one('purchase.workflow', string="关联采购工作流")
|
||||
|
||||
product_id = fields.Many2one('product.product', string="物品名称")
|
||||
order_id = fields.Many2one('purchase.order', string="关联采购")
|
||||
brand = fields.Char(string="品牌")
|
||||
specs = fields.Char(string="规格")
|
||||
name = fields.Text(string="描述")
|
||||
@@ -186,6 +188,7 @@ class PurchaseServiceLine(models.Model):
|
||||
|
||||
service_id = fields.Many2one('purchase.workflow', string="关联采购工作流")
|
||||
product_id = fields.Many2one('product.product', string="服务项目")
|
||||
order_id = fields.Many2one('purchase.order', string="关联采购")
|
||||
frequency = fields.Integer(string='频次')
|
||||
fee = fields.Float(string="费用")
|
||||
name = fields.Text(string="描述")
|
||||
|
||||
@@ -80,30 +80,84 @@
|
||||
<xpath expr="//field[@name='partner_id']" position="attributes">
|
||||
<attribute name="domain">[('is_employee', '=', False)]</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='products']" position="attributes">
|
||||
<attribute name="invisible">purchase_type != 'fixed'</attribute>
|
||||
<attribute name="string">固定资产明细</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='products']" position="after">
|
||||
<!-- <page string="服务明细" invisible="purchase_type != 'service'">-->
|
||||
<!-- <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>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- <page string="低值易耗明细" invisible="purchase_type != 'low'">-->
|
||||
<!-- <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>-->
|
||||
<page string="日常消耗品明细" invisible="purchase_type != 'day'">
|
||||
<field name="tax_country_id" invisible="1"/>
|
||||
<field name="order_line" widget="section_and_note_one2many" mode="tree,kanban" context="{'default_state': 'draft'}" readonly="state in ('done', 'cancel')">
|
||||
<tree string="Purchase Order Lines" editable="bottom" >
|
||||
<control>
|
||||
<create name="add_product_control" string="Add a product"/>
|
||||
<create name="add_section_control" string="Add a section" context="{'default_display_type': 'line_section'}"/>
|
||||
<create name="add_note_control" string="Add a note" context="{'default_display_type': 'line_note'}"/>
|
||||
<button name="action_add_from_catalog" string="Catalog" type="object" class="px-4 btn-link" context="{'order_id': parent.id}"/>
|
||||
</control>
|
||||
<field name="tax_calculation_rounding_method" column_invisible="True"/>
|
||||
<field name="display_type" column_invisible="True"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="state" column_invisible="True"/>
|
||||
<field name="product_type" column_invisible="True"/>
|
||||
<field name="product_uom" column_invisible="True" groups="!uom.group_uom"/>
|
||||
<field name="product_uom_category_id" column_invisible="True"/>
|
||||
<field name="invoice_lines" column_invisible="True"/>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="product_id" readonly="state in ('purchase', 'to approve', 'done', 'cancel')" required="not display_type" width="35%" context="{'partner_id':parent.partner_id, 'quantity':product_qty, 'company_id': parent.company_id}" force_save="1" domain="[('purchase_ok', '=', True)]"/>
|
||||
<field name="name" widget="section_and_note_text"/>
|
||||
<field name="date_planned" optional="hide" required="not display_type" force_save="1"/>
|
||||
<field name="analytic_distribution" widget="analytic_distribution" optional="hide" groups="analytic.group_analytic_accounting" options="{'product_field': 'product_id', 'business_domain': 'purchase_order', 'amount_field': 'price_subtotal'}"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="qty_received_manual" column_invisible="True"/>
|
||||
<field name="qty_received_method" column_invisible="True"/>
|
||||
<field name="qty_received" string="Received" column_invisible="parent.state not in ('purchase', 'done')" readonly="qty_received_method != 'manual'" optional="show"/>
|
||||
<field name="qty_invoiced" string="Billed" column_invisible="parent.state not in ('purchase', 'done')" optional="show"/>
|
||||
<field name="product_uom" string="UoM" groups="uom.group_uom" readonly="state in ('purchase', 'done', 'cancel')" required="not display_type" options="{'no_open': True}" force_save="1" optional="show"/>
|
||||
<field name="product_packaging_qty" invisible="not product_id or not product_packaging_id" groups="product.group_stock_packaging" optional="show"/>
|
||||
<field name="product_packaging_id" invisible="not product_id" context="{'default_product_id': product_id, 'tree_view_ref':'product.product_packaging_tree_view', 'form_view_ref':'product.product_packaging_form_view'}" groups="product.group_stock_packaging" optional="show"/>
|
||||
<field name="price_unit" readonly="qty_invoiced != 0"/>
|
||||
<button name="action_purchase_history" type="object" icon="fa-history" title="Purchase History" invisible="not id"/>
|
||||
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use', '=', 'purchase'), ('company_id', 'parent_of', parent.company_id), ('country_id', '=', parent.tax_country_id), ('active', '=', True)]" context="{'default_type_tax_use': 'purchase', 'search_view_ref': 'account.account_tax_view_search'}" options="{'no_create': True}" optional="show"/>
|
||||
<field name="discount" string="Disc.%" readonly="qty_invoiced != 0" optional="hide"/>
|
||||
<field name="price_subtotal" string="Tax excl."/>
|
||||
<field name="price_total" string="Tax incl." column_invisible="parent.tax_calculation_rounding_method == 'round_globally'" optional="hide"/>
|
||||
</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">
|
||||
|
||||
Reference in New Issue
Block a user