Merge pull request #2761 from expsa/samir-aladawi-fix-purchase-requisition
[FIX] purchase_requisition_custom
This commit is contained in:
commit
44eab66644
|
|
@ -91,6 +91,8 @@ class PurchaseRequisitionCustom(models.Model):
|
|||
change_state_line = fields.One2many('change.purchase.user.state', 'requisition_id')
|
||||
date_end = fields.Datetime(string='Agreement Deadline', tracking=True)
|
||||
check_request = fields.Boolean(compute='check_request_field')
|
||||
type_exclusive = fields.Selection(related='type_id.exclusive')
|
||||
|
||||
|
||||
def get_attachments(self):
|
||||
# Check if multiple records are passed, and handle them in a loop
|
||||
|
|
|
|||
|
|
@ -457,10 +457,13 @@
|
|||
attrs="{'invisible':[('type','!=', 'project')], 'required':[('type','=', 'project')], 'readonly':[('state' , '!=' , 'draft')]}"/>
|
||||
|
||||
<field name="request_id" readonly="1"/>
|
||||
<field name="type_exclusive" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='vendor_id']" position="attributes">
|
||||
<attribute name="attrs">{'readonly':[('state','in',('cancel','checked','done','waiting'))]}
|
||||
</attribute>
|
||||
<attribute name="attrs">{
|
||||
'readonly': [('state','in',('cancel','checked','done','waiting'))],
|
||||
'required': [('type_exclusive', '=', 'multiple')]
|
||||
}</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='ordering_date']" position="attributes">
|
||||
<attribute name="required">1</attribute>
|
||||
|
|
|
|||
Loading…
Reference in New Issue