fix purchase

This commit is contained in:
eslamabady 2024-07-22 03:59:37 +03:00
parent e1a796a00d
commit 43581a58a3
21 changed files with 3 additions and 3 deletions

View File

@ -327,7 +327,7 @@ class PurchaseOrderCustom(models.Model):
def action_skip_budget(self):
""" Skip purchase budget"""
for po_id in self:
if po_id.state == 'wait_for_send':
if po_id.state == 'wait_for_send' or po_id.request_id:
# Deal with double validation process
valid_amount = self.env.user.company_id.currency_id.compute(
po_id.company_id.po_double_validation_amount, po_id.currency_id)

View File

@ -139,7 +139,7 @@
<button string='PO To Contract' name="open_convert_po_contract" type="object"
class="oe_highlight" groups="purchase.group_purchase_manager"
attrs="{'invisible':[('state','in',('draft','wait','wait_for_send','sent','to approve','sign','waiting','purchase','cancel'))]}"/>
attrs="{'invisible':[('state','in',('draft','wait','wait_for_send','sent','to approve','sign','waiting','done','purchase','cancel'))]}"/>
</xpath>
<xpath expr="//field[@name='date_order']" position="after">
@ -151,7 +151,7 @@
<attribute name="groups">purchase.group_purchase_manager</attribute>
<attribute name="states">""</attribute>
<attribute name="attrs">
{'invisible':[('state','in',('wait','wait_for_send','sign','sent','to approve','waiting','purchase','cancel'))]}
{'invisible':[('state','in',('wait','wait_for_send','sign','sent','to approve','done','waiting','purchase','cancel'))]}
</attribute>
</xpath>
<xpath expr="/form/header/button[@id='bid_confirm']" position="attributes">