Merge lp:~openerp-dev/openobject-addons/6.1-opw-582049-bde into lp:openobject-addons/6.1

Proposed by Bharat Devnani (Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-582049-bde
Merge into: lp:openobject-addons/6.1
Diff against target: 12 lines (+1/-1)
1 file modified
stock/product.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-582049-bde
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+135658@code.launchpad.net

Description of the change

Hello Sir,

I have added the condition to raise warning when Inventory Valuation is Real Time and Stock Valuation is not defined in product and product category respectively.

Steps to reproduce:
-> Warehouse -> Products -> Products
1) Create Product
   Inventory Valuation : Periodical (manual) (Accounting Tab)
   Costing Method : Average Price
   Update Cost Price generates warning Message
   "Valuation Account is not specified for Product Category"

Thanks & Regards,
Devnani Bharat R.

To post a comment you must log in.

Unmerged revisions

7078. By Bharat Devnani (Open ERP)

[FIX] added condition to raise warning when Inventory Valuation is Real Time and Stock Valuation is not defined in product and product category respectively

7077. By Bharat Devnani (Open ERP)

[MERGE] merged with main addons 6.1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/product.py'
2--- stock/product.py 2012-06-19 07:40:07 +0000
3+++ stock/product.py 2012-11-22 12:14:25 +0000
4@@ -72,7 +72,7 @@
5 product_obj=self.browse(cr, uid, ids, context=context)[0]
6 account_valuation = product_obj.categ_id.property_stock_valuation_account_id
7 account_valuation_id = account_valuation and account_valuation.id or False
8- if not account_valuation_id: raise osv.except_osv(_('Error!'), _('Valuation Account is not specified for Product Category: %s') % (product_obj.categ_id.name))
9+ if product_obj.valuation == 'real_time' and not account_valuation_id: raise osv.except_osv(_('Error!'), _('Valuation Account is not specified for Product Category: %s') % (product_obj.categ_id.name))
10 move_ids = []
11 loc_ids = location_obj.search(cr, uid,[('usage','=','internal')])
12 for rec_id in ids: