Merge lp:~unifield-team/unifield-addons/uf-1216 into lp:unifield-addons

Proposed by Patrick Amstutz
Status: Merged
Merged at revision: 4546
Proposed branch: lp:~unifield-team/unifield-addons/uf-1216
Merge into: lp:unifield-addons
Diff against target: 11 lines (+1/-1)
1 file modified
sale/sale.py (+1/-1)
To merge this branch: bzr merge lp:~unifield-team/unifield-addons/uf-1216
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+115507@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale/sale.py'
2--- sale/sale.py 2012-07-04 12:05:33 +0000
3+++ sale/sale.py 2012-07-18 10:08:38 +0000
4@@ -1263,7 +1263,7 @@
5 context = {}
6 """Allows to delete sales order lines in draft,cancel states"""
7 for rec in self.browse(cr, uid, ids, context=context):
8- if rec.state not in ['draft', 'cancel']:
9+ if rec.state not in ['draft', 'cancel'] and not context.get('call_unlink', False):
10 raise osv.except_osv(_('Invalid action !'), _('Cannot delete a sales order line which is %s !') %(rec.state,))
11 return super(sale_order_line, self).unlink(cr, uid, ids, context=context)
12

Subscribers

People subscribed via source and target branches

to all changes: