Merge lp:~openerp-dev/openobject-addons/trunk-bug-1080651-shp into lp:openobject-addons

Proposed by Pankita Shah(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1080651-shp
Merge into: lp:openobject-addons
Diff against target: 16 lines (+6/-0)
1 file modified
stock/stock.py (+6/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1080651-shp
Reviewer Review Type Date Requested Status
Atul Patel(OpenERP) (community) Approve
OpenERP Core Team Pending
Review via email: mp+136369@code.launchpad.net

Description of the change

Hello,

 - i have fixed problem of physical inventory. which is deleted when it is in confirm and done state.
    solve this problem add constraint on state field

thanks

shp

To post a comment you must log in.
8075. By Atul Patel(OpenERP)

[FIX]: Replace name and browse method

Revision history for this message
Atul Patel(OpenERP) (atp-openerp) wrote :

hello,

it's work

thanks.

review: Approve
8076. By Atul Patel(OpenERP)

[MERGE]: Merged with lp:openobject-addons

Unmerged revisions

8076. By Atul Patel(OpenERP)

[MERGE]: Merged with lp:openobject-addons

8075. By Atul Patel(OpenERP)

[FIX]: Replace name and browse method

8074. By Pankita Shah(OpenERP)

[FIX] add constaint on physical inventories when it is in confirm and done state

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2012-12-21 16:48:08 +0000
3+++ stock/stock.py 2012-12-31 09:22:21 +0000
4@@ -2759,6 +2759,12 @@
5 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.inventory', context=c)
6 }
7
8+ def unlink(self, cr, uid, ids, context=None):
9+ for inv in self.browse(cr, uid, ids, context=context):
10+ if inv.state not in ('draft', 'cancel'):
11+ raise osv.except_osv(_('Invalid Action!'), _('Cannot delete physical inventories which are already confirmed or done.'))
12+ return super(stock_inventory, self).unlink(cr, uid, ids, context=context)
13+
14 def copy(self, cr, uid, id, default=None, context=None):
15 if default is None:
16 default = {}

Subscribers

People subscribed via source and target branches

to all changes: