[IMP] purchase_requisition_custom: update orde report & precompute is_purchase_budget
This commit is contained in:
parent
f742f6effc
commit
4cf52739d7
|
|
@ -109,7 +109,7 @@ class PurchaseRequisitionCustom(models.Model):
|
||||||
[('department', 'Department'), ('default', 'Default Cost Center'), ('product_line', 'Product Line'),
|
[('department', 'Department'), ('default', 'Default Cost Center'), ('product_line', 'Product Line'),
|
||||||
('project', 'Project')], string='Purchase Cost', default='department')
|
('project', 'Project')], string='Purchase Cost', default='department')
|
||||||
selected_purchase_id = fields.Many2one("purchase.order", compute="_compute_selected_purchase_order")
|
selected_purchase_id = fields.Many2one("purchase.order", compute="_compute_selected_purchase_order")
|
||||||
is_purchase_budget = fields.Boolean(string="Is Purchase Budget", compute='_compute_purchase_budget')
|
is_purchase_budget = fields.Boolean(string="Is Purchase Budget", compute='_compute_purchase_budget', default=lambda self: self.env.company.purchase_budget)
|
||||||
type_id_test = fields.Many2one('purchase.requisition.type', string="Agreement Type")
|
type_id_test = fields.Many2one('purchase.requisition.type', string="Agreement Type")
|
||||||
Project_name = fields.Char(string='Project name')
|
Project_name = fields.Char(string='Project name')
|
||||||
Chair_number = fields.Char(string='Chair number')
|
Chair_number = fields.Char(string='Chair number')
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,26 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<template id="report_purchaseorder_document_inherit_add_description" inherit_id="purchase.report_purchaseorder_document">
|
||||||
|
<xpath expr="//t[@t-foreach='o.order_line']//td[@name='td_taxes']" position="before">
|
||||||
|
<td>
|
||||||
|
<span t-field="line.description"/>
|
||||||
|
</td>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//thead/tr/th[@name='th_taxes']" position="before">
|
||||||
|
<th name="order_line_description"><strong>Order Description</strong></th>
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template id="report_purchasequotation_document_inherit_add_description" inherit_id="purchase.report_purchasequotation_document">
|
||||||
|
<xpath expr="//td[@id='product']" position="after">
|
||||||
|
<td>
|
||||||
|
<span t-field="line.description"/>
|
||||||
|
</td>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//thead/tr/th[@name='th_description']" position="after">
|
||||||
|
<th name="order_line_description"><strong>Order Description</strong></th>
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue