[IMP] purchase_requisition: Add archived in purchase agreement types
closes odoo/odoo#71254 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit is contained in:
@@ -34,6 +34,7 @@ class PurchaseRequisitionType(models.Model):
|
||||
line_copy = fields.Selection([
|
||||
('copy', 'Use lines of agreement'), ('none', 'Do not create RfQ lines automatically')],
|
||||
string='Lines', required=True, default='copy')
|
||||
active = fields.Boolean(default=True, help="Set active to false to hide the Purchase Agreement Types without removing it.")
|
||||
|
||||
|
||||
class PurchaseRequisition(models.Model):
|
||||
|
||||
@@ -44,10 +44,12 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Purchase Agreement Types">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<group>
|
||||
<group string="Agreement Type">
|
||||
<field name="name"/>
|
||||
<field name="exclusive" widget="radio"/>
|
||||
<field name="active" invisible="1"/>
|
||||
</group>
|
||||
<group string="Data for new quotations">
|
||||
<field name="line_copy" widget="radio"/>
|
||||
@@ -58,6 +60,17 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_purchase_requisition_type_search">
|
||||
<field name="name">purchase.requisition.type.search</field>
|
||||
<field name="model">purchase.requisition.type</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
<separator/>
|
||||
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="tender_type_action" model="ir.actions.act_window">
|
||||
<field name="name">Purchase Agreement Types</field>
|
||||
<field name="res_model">purchase.requisition.type</field>
|
||||
|
||||
Reference in New Issue
Block a user