fix
This commit is contained in:
parent
e503e17cc6
commit
f165a9e4f9
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -233,7 +233,7 @@ class PurchaseRequisitionCustom(models.Model):
|
|||
raise ValidationError(_("Please add Committe Members"))
|
||||
|
||||
def action_approve(self):
|
||||
purchase_orders = self.env['purchase.order'].search([('requisition_id', '=', self.id)])
|
||||
purchase_orders = self.env['purchase.order'].search([('requisition_id', '=', self.id),('state','=','to approve')])
|
||||
po_order_approval = self.env.company.po_double_validation == 'two_step'
|
||||
for po_id in purchase_orders:
|
||||
# Deal with double validation process for first approve
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@
|
|||
'|', ('state','in',['sign','purchase','to approve','done',
|
||||
'cancel','budget_rejected','wait_for_send','waiting']), ('is_signed', '=', True)]}"
|
||||
string="Sign"/>
|
||||
<button type="object" name="action_approve_po" string="Confirm" class="oe_highlight"
|
||||
<button type="object" name="action_approve_po" string="Confirm Purchase" class="oe_highlight"
|
||||
attrs="{'invisible':['|',('requisition_id','=',False),'|',('state','not in',('to approve')),('is_purchase_budget','=',False)]}"/>
|
||||
<button type="object" name="action_select" groups="purchase_requisition_custom.committe_member"
|
||||
attrs="{'invisible':[('state','in',['wait','draft','done','purchase','wait_for_send','sent','waiting','cancel'])]}"
|
||||
|
|
@ -131,6 +131,9 @@
|
|||
groups="purchase_requisition_custom.group_skip_purchase_budget"/>
|
||||
<!-- <button name="button_draft" states="cancel" string="Set to Draft" type="object"/>-->
|
||||
</xpath>
|
||||
<xpath expr="//button[@name='button_approve']" position="replace">
|
||||
<button name="button_approve" type="object" attrs="{'invisible':['|',('requisition_id','!=',False),('state','not in',('to approve'))]}" string="Approve Order" class="oe_highlight" groups="purchase.group_purchase_manager"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//button[@name='button_draft']" position="after">
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue