Skip to content

Commit

Permalink
Fixes two things:
Browse files Browse the repository at this point in the history
- When you copy a purchase request the cancelled boolean should be reset.
- Users should not be able to duplicate just purchase request lines
  • Loading branch information
JordiBForgeFlow committed Jul 10, 2017
1 parent 254b0d7 commit 9ac7238
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion purchase_request/models/purchase_request.py
Expand Up @@ -255,7 +255,7 @@ def _compute_supplier_id(self):
'Procurement Order',
readonly=True, copy=False)
cancelled = fields.Boolean(
string="Cancelled", readonly=True, default=False)
string="Cancelled", readonly=True, default=False, copy=False)

@api.onchange('product_id')
def onchange_product_id(self):
Expand Down
2 changes: 1 addition & 1 deletion purchase_request/views/purchase_request_view.xml
Expand Up @@ -261,7 +261,7 @@
<field name="model">purchase.request.line</field>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<form string="Purchase Request Line" version="7.0">
<form string="Purchase Request Line" duplicate="False">
<sheet>
<h1>
<field name="request_id"/>
Expand Down

0 comments on commit 9ac7238

Please sign in to comment.