Merge pull request #2776 from expsa/samir-aladawi-fix-purchase-requisition
[FIX] purchase_requisition_custom
This commit is contained in:
commit
bc67479608
|
|
@ -17,7 +17,6 @@ class OnlinePurchaseRequisition(models.Model):
|
|||
available_until = fields.Date('Availablity date')
|
||||
|
||||
|
||||
|
||||
def extend_availability(self):
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
|
|
@ -66,7 +65,14 @@ class OnlinePurchaseRequisition(models.Model):
|
|||
if po.state != "purchase":
|
||||
email = template.send_mail(po.id,force_send=True,)
|
||||
return sup
|
||||
|
||||
|
||||
def copy(self, default=None):
|
||||
data = super(OnlinePurchaseRequisition, self).copy(default)
|
||||
data.published_in_portal = False
|
||||
data.publish_in_portal = False
|
||||
data.availability_period = 0
|
||||
data.po_notification = False
|
||||
return data
|
||||
|
||||
|
||||
class POCustom(models.Model):
|
||||
|
|
|
|||
|
|
@ -216,10 +216,6 @@ class PurchaseRequisitionCustom(models.Model):
|
|||
def copy(self, default=None):
|
||||
data = super(PurchaseRequisitionCustom, self).copy(default)
|
||||
data.sent_to_commitee = False
|
||||
data.published_in_portal = False
|
||||
data.publish_in_portal = False
|
||||
data.availability_period = 0
|
||||
data.po_notification = False
|
||||
data.state = 'draft'
|
||||
return data
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue