Merge lp:~openerp-dev/openobject-addons/trunk-bug-707287-mma into lp:openobject-addons

Proposed by Mayur Maheshwari(OpenERP)
Status: Rejected
Rejected by: Fabien (Open ERP)
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-707287-mma
Merge into: lp:openobject-addons
Diff against target: 44 lines (+12/-1)
1 file modified
procurement/procurement.py (+12/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-707287-mma
Reviewer Review Type Date Requested Status
Rucha (Open ERP) (community) Approve
Mayur Maheshwari(OpenERP) (community) Needs Resubmitting
qdp (OpenERP) Pending
Review via email: mp+63355@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Rucha (Open ERP) (rpa-openerp) wrote :

improvements should also to be done in check_produce() to check for product mto, produce

review: Needs Fixing
4766. By Mayur Maheshwari(OpenERP)

[FIX]procurement:excepation message when product mto, produce.

Revision history for this message
Mayur Maheshwari(OpenERP) (mma-openerp) :
review: Needs Resubmitting
Revision history for this message
Rucha (Open ERP) (rpa-openerp) :
review: Approve
4767. By Mayur Maheshwari(OpenERP)

[MERGE]: Merge with lp:openobject-addons

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

see my comment in the related bug.

Unmerged revisions

4767. By Mayur Maheshwari(OpenERP)

[MERGE]: Merge with lp:openobject-addons

4766. By Mayur Maheshwari(OpenERP)

[FIX]procurement:excepation message when product mto, produce.

4765. By Mayur Maheshwari(OpenERP)

[FIX]procurement:excepation message when Procurement UOM and product purchase UOM mismatch!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'procurement/procurement.py'
2--- procurement/procurement.py 2011-07-01 23:41:24 +0000
3+++ procurement/procurement.py 2011-09-15 12:39:14 +0000
4@@ -258,6 +258,10 @@
5 res = True
6 user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
7 for procurement in self.browse(cr, uid, ids, context=context):
8+ if procurement.product_id.uom_po_id.category_id.id != procurement.product_uom.category_id.id:
9+ message = _("Procurement UOM and product purchase UOM categories mismatch!")
10+ cr.execute('update procurement_order set state=%s, message=%s where id=%s', ('exception', message, procurement.id))
11+ return False
12 if procurement.product_id.product_tmpl_id.supply_method <> 'produce':
13 partner_list = sorted([(partner_id.sequence, partner_id) for partner_id in procurement.product_id.seller_ids if partner_id])
14 if partner_list:
15@@ -281,6 +285,10 @@
16 user = self.pool.get('res.users').browse(cr, uid, uid)
17 partner_obj = self.pool.get('res.partner')
18 for procurement in self.browse(cr, uid, ids):
19+ if procurement.product_id.uom_po_id.category_id.id != procurement.product_uom.category_id.id:
20+ message = _("Procurement UOM and product purchase UOM categories mismatch!")
21+ cr.execute('update procurement_order set state=%s, message=%s where id=%s', ('exception', message, procurement.id))
22+ return False
23 if procurement.product_id.product_tmpl_id.supply_method <> 'buy':
24 return False
25 if not procurement.product_id.seller_ids:
26@@ -293,7 +301,6 @@
27 cr.execute('update procurement_order set message=%s where id=%s',
28 (_('No default supplier defined for this product'), procurement.id))
29 return False
30-
31 if user.company_id and user.company_id.partner_id:
32 if partner.id == user.company_id.partner_id.id:
33 return False
34@@ -366,6 +373,10 @@
35 @return: True or move id.
36 """
37 ok = True
38+ if procurement.product_id.uom_po_id.category_id.id != procurement.product_uom.category_id.id:
39+ message = _("Procurement UOM and product purchase UOM categories mismatch!")
40+ cr.execute('update procurement_order set state=%s, message=%s where id=%s', ('exception', message, procurement.id))
41+ return False
42 if procurement.move_id:
43 message = False
44 id = procurement.move_id.id

Subscribers

People subscribed via source and target branches

to all changes: