openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #00667
[Merge] lp:~openerp-dev/openobject-addons/ksa-addons2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons2
ksa(OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/ksa-addons2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons2.
Requested reviews:
OpenERP R&D Team (openerp-dev)
Related bugs:
#500931 No analytic entry is generated finishing one production order
https://bugs.launchpad.net/bugs/500931
#543979 product: check uos not necessary
https://bugs.launchpad.net/bugs/543979
#674551 "qunatity" in MRP
https://bugs.launchpad.net/bugs/674551
#675418 account moves with same account in debit and credit
https://bugs.launchpad.net/bugs/675418
solve yml problem for mrp_procurment
--
https://code.launchpad.net/~openerp-dev/openobject-addons/ksa-addons2/+merge/41578
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-dev/openobject-addons/ksa-addons2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons2.
=== modified file 'mrp/test/mrp_procurement.yml'
--- mrp/test/mrp_procurement.yml 2010-10-11 21:57:06 +0000
+++ mrp/test/mrp_procurement.yml 2010-11-23 11:51:52 +0000
@@ -2,10 +2,10 @@
In order to test the flow of procurement orders. I will put some orders with
different procurement methods. I have installed sale, mrp and purchase modules.
-
- I am creating products.
--
+ I am creating products.
+-
I create record for product Shirt.
--
+-
!record {model: product.product, id: product_product_shirt0}:
categ_id: product.cat1
cost_method: standard
@@ -26,9 +26,9 @@
warranty: 0.0
weight: 0.0
weight_net: 0.0
--
+-
I create record for product Cloth.
--
+-
!record {model: product.product, id: product_product_cloth0}:
categ_id: product.cat1
cost_method: standard
@@ -52,9 +52,9 @@
warranty: 0.0
weight: 0.0
weight_net: 0.0
--
+-
I create record for product Buttons.
--
+-
!record {model: product.product, id: product_product_buttons0}:
categ_id: product.cat1
cost_method: standard
@@ -79,10 +79,10 @@
weight: 0.0
weight_net: 0.0
-
- I am creating bills of material for 'Shirt'.
--
+ I am creating bills of material for 'Shirt'.
+-
I create bills of material for Shirt.
--
+-
!record {model: mrp.bom, id: mrp_bom_shirt0}:
bom_lines:
- company_id: base.main_company
@@ -99,7 +99,7 @@
product_efficiency: 1.0
product_id: product_product_buttons0
product_qty: 8.0
- product_uom: product.product_uom_unit
+ product_uom: product.product_uom_kgm
product_uos_qty: 0.0
sequence: 0.0
type: normal
@@ -123,7 +123,7 @@
product_id: mrp.product_product_buttons0
product_max_qty: 50.0
product_min_qty: 10.0
- product_uom: product.product_uom_unit
+ product_uom: product.product_uom_kgm
qty_multiple: 1
warehouse_id: stock.warehouse0
-
@@ -142,7 +142,7 @@
-
I run the procurement.
-
- !workflow {model: procurement.order, action: button_check, ref: procurement_order_shirt0}
+ !workflow {model: procurement.order, action: button_check, ref: procurement_order_shirt0}
-
I see that there is a manufacturing order for Shirt.
-
@@ -210,7 +210,7 @@
picking_ids = pick_obj.search(cr, uid, [('address_id.name','=','Wong'),('state','=','assigned')])
partial = self.browse(cr, uid, 1, context)
partial_datas = {
- 'delivery_date' : partial.date
+ 'delivery_date' : partial.date
}
for pick in pick_obj.browse(cr, uid, picking_ids):
for m in pick.move_lines:
@@ -219,8 +219,8 @@
'product_qty' : m.product_qty,
'product_uom' : m.product_uom.id
}
- if (pick.type == 'in') and (m.product_id.cost_method == 'average'):
- partial_datas['move%s'%(m.id)].update({
+ if (pick.type == 'in') and (m.product_id.cost_method == 'average'):
+ partial_datas['move%s'%(m.id)].update({
'product_price' : m.product_price,
'product_currency': m.product_currency
})
@@ -246,7 +246,7 @@
picking_ids = pick_obj.search(cr, uid, [('address_id.name','=','Tang'),('state','=','assigned')])
partial = self.browse(cr, uid, 1, context)
partial_datas = {
- 'delivery_date': partial.date
+ 'delivery_date': partial.date
}
for pick in pick_obj.browse(cr, uid, picking_ids):
for m in pick.move_lines:
@@ -255,8 +255,8 @@
'product_qty': m.product_qty,
'product_uom': m.product_uom.id
}
- if (pick.type == 'in') and (m.product_id.cost_method == 'average'):
- partial_datas['move%s'%(m.id)].update({
+ if (pick.type == 'in') and (m.product_id.cost_method == 'average'):
+ partial_datas['move%s'%(m.id)].update({
'product_price': m.product_price,
'product_currency': m.product_currency
})
@@ -323,4 +323,4 @@
prod_obj = self.pool.get('mrp.production')
prod_ids = prod_obj.search(cr, uid, [('product_id.name','=','Shirt')])
self.do_produce(cr, uid, [1], context={'active_ids': prod_ids})
-
+
=== modified file 'stock/product.py'
--- stock/product.py 2010-11-23 05:20:24 +0000
+++ stock/product.py 2010-11-23 11:51:52 +0000
@@ -282,14 +282,15 @@
uoms = uom_obj.browse(cr, uid, list(set(uoms)), context=context)
for o in uoms:
uoms_o[o.id] = o
- ctx = {'raise-exception': False} #TOCHECK: before change uom of product, stock move line are in old uom.
+ #TOCHECK: before change uom of product, stock move line are in old uom.
+ context.update({'raise-exception': False})
for amount, prod_id, prod_uom in results:
amount = uom_obj._compute_qty_obj(cr, uid, uoms_o[prod_uom], amount,
- uoms_o[context.get('uom', False) or product2uom[prod_id]], context=ctx)
+ uoms_o[context.get('uom', False) or product2uom[prod_id]], context=context)
res[prod_id] += amount
for amount, prod_id, prod_uom in results2:
amount = uom_obj._compute_qty_obj(cr, uid, uoms_o[prod_uom], amount,
- uoms_o[context.get('uom', False) or product2uom[prod_id]], context=ctx)
+ uoms_o[context.get('uom', False) or product2uom[prod_id]], context=context)
res[prod_id] -= amount
return res
=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml 2010-11-22 18:15:53 +0000
+++ stock/stock_view.xml 2010-11-23 11:51:52 +0000
@@ -144,8 +144,10 @@
</field>
</page>
</notebook>
- <field name="state"/>
- <group col="4" colspan="2">
+ <group col="2" colspan="2">
+ <field name="state"/>
+ </group>
+ <group col="2" colspan="2">
<button name="action_cancel_inventary" states="draft" string="Cancel Inventory" type="object" icon="gtk-cancel"/>
<button name="action_confirm" states="draft" string="Validate Inventory" type="object" icon="gtk-apply"/>
<button name="action_done" states="confirm" string="Confirm Inventory" type="object" icon="gtk-jump-to"/>
Follow ups