openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #00939
[Merge] lp:~openerp-commiter/openobject-addons/trunk-addons-aag into lp:~openerp-dev/openobject-addons/trunk-dev-addons2
aag(OpenERP) has proposed merging lp:~openerp-commiter/openobject-addons/trunk-addons-aag into lp:~openerp-dev/openobject-addons/trunk-dev-addons2.
Requested reviews:
OpenERP R&D Team (openerp-dev)
Related bugs:
#665052 "Logistics" not "Logistic"
https://bugs.launchpad.net/bugs/665052
#668378 invoice from packing wrong price/unit if product has uos
https://bugs.launchpad.net/bugs/668378
from http://pad.openerp.com/openerp-apr-training-mod2
Manufacturing is Done
--
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-addons-aag/+merge/42622
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-commiter/openobject-addons/trunk-addons-aag into lp:~openerp-dev/openobject-addons/trunk-dev-addons2.
=== modified file 'hr_expense/hr_expense_view.xml'
--- hr_expense/hr_expense_view.xml 2010-10-22 08:53:31 +0000
+++ hr_expense/hr_expense_view.xml 2010-12-03 13:42:03 +0000
@@ -86,7 +86,7 @@
<newline/>
<field name="unit_amount"/>
<field name="unit_quantity"/>
- <field name="uom_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id)" widget="selection"/>
+ <field name="uom_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id)"/>
</group>
<group colspan="2" col="2" groups="analytic.group_analytic_accounting">
<separator string="Customer Project" colspan="2"/>
=== modified file 'mrp/mrp.py'
--- mrp/mrp.py 2010-11-22 13:47:16 +0000
+++ mrp/mrp.py 2010-12-03 13:42:03 +0000
@@ -321,6 +321,16 @@
result = result + res[0]
result2 = result2 + res[1]
return result, result2
+
+ def copy(self, cr, uid, id, default=None, context=None):
+ if default is None:
+ default = {}
+ if context is None:
+ context = {}
+ default = default.copy()
+ bom_name = self.read(cr, uid, id, ['name'], context=context)
+ default['name'] = bom_name['name'] + _(' (copy)')
+ return super(mrp_bom, self).copy(cr, uid, id, default, context=context)
mrp_bom()
=== modified file 'mrp/mrp_view.xml'
--- mrp/mrp_view.xml 2010-11-22 18:13:26 +0000
+++ mrp/mrp_view.xml 2010-12-03 13:42:03 +0000
@@ -322,11 +322,11 @@
<field name="code" select="1" string="Reference" groups="base.group_extended"/>
<newline/>
<field name="product_qty"/>
- <field name="product_uom" widget="selection"/>
- <field name="routing_id" widget="selection" groups="base.group_extended"/>
+ <field name="product_uom"/>
+ <field name="routing_id" groups="base.group_extended"/>
<newline/>
<field name="product_uos_qty" groups="product.group_uos" />
- <field name="product_uos" widget="selection" groups="product.group_uos"/>
+ <field name="product_uos" groups="product.group_uos"/>
<newline/>
<field name="type" groups="base.group_extended"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
@@ -567,8 +567,9 @@
<field name="origin"/>
<field name="product_id" on_change="product_id_change(product_id)"/>
<field name="product_qty"/>
- <group colspan="2" col="3">
- <field name="product_uom" widget="selection"/>
+ <group colspan="2" col="4">
+ <field name="product_uom"/>
+ <button name="action_compute" states="draft" string="Compute Data" type="object" icon="terp-stock_format-scientific"/>
<button type="action"
icon="terp-accessories-archiver+"
name="%(mrp.action_change_production_qty)d"
@@ -582,7 +583,7 @@
<notebook colspan="4">
<page string="Consumed Products">
<field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]" on_change="bom_id_change(bom_id)"/>
- <field name="routing_id" groups="base.group_extended" select="1" widget="selection"/>
+ <field name="routing_id" groups="base.group_extended" select="1"/>
<field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
<separator string="" colspan="4"/>
@@ -592,7 +593,7 @@
<tree colors="blue:state in ('draft');black:state in ('picking_except','confirmed','ready','in_production');gray:state in ('cancel','done') " string="Products to Consume">
<field name="product_id" />
<field name="product_qty" string="Qty"/>
- <field name="product_uom" string="UOM" widget="selection"/>
+ <field name="product_uom" string="UOM"/>
<field name="location_id" string="Source Loc."/>
<field name="state" invisible="1"/>
<button name="%(stock.move_consume)d"
@@ -611,7 +612,7 @@
<tree colors="red:scrapped==True;blue:state in('draft');black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel') " string="Consumed Products" editable="bottom">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
- <field name="product_uom" readonly="1" string="UOM" widget="selection"/>
+ <field name="product_uom" readonly="1" string="UOM"/>
<field name="location_dest_id" readonly="1" string="Destination Loc."/>
<field name="prodlot_id" context="{'product_id': product_id}"/>
<field name="state" invisible="1"/>
@@ -632,7 +633,6 @@
<group col="9" colspan="4">
<field name="state"/>
<button name="button_cancel" states="draft,ready,confirmed,in_production,picking_except" string="Cancel" icon="gtk-stop"/>
- <button name="action_compute" states="draft" string="Compute Data" type="object" icon="terp-stock_format-scientific"/>
<button name="button_confirm" states="draft" string="Confirm Production" icon="gtk-apply"/>
<button name="button_produce" states="ready" string="Start Production" icon="terp-gtk-jump-to-ltr"/>
<button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" icon="gtk-ok" type="action"/>
@@ -646,7 +646,7 @@
<tree string="Products to Finish">
<field name="product_id" />
<field name="product_qty" string="Qty"/>
- <field name="product_uom" string="UOM" widget="selection"/>
+ <field name="product_uom" string="UOM"/>
<field name="location_id" string="Source Loc." />
<field name="state" invisible="1"/>
<button name="%(stock.action_partial_move)d"
@@ -665,7 +665,7 @@
<tree colors="red:scrapped==True;blue:state in('draft');black:state in('picking_except','confirmed','ready','in_production');gray:state in('cancel','done') " string="Finished Products" editable="bottom">
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1" string="Qty"/>
- <field name="product_uom" readonly="1" string="UOM" widget="selection"/>
+ <field name="product_uom" readonly="1" string="UOM"/>
<field name="location_dest_id" readonly="1" string="Destination Loc." widget="selection"/>
<field name="prodlot_id" context="{'product_id': product_id}"/>
<field name="scrapped" invisible="1"/>
@@ -904,7 +904,7 @@
<act_window
domain="[('bom_id','=',False)]"
- context="{'search_default_product_id': [active_id]}"
+ context="{'search_default_product_id': [active_id],'default_product_id':active_id}"
id="act_product_product_2_mrp_bom"
name="Bill of Materials"
res_model="mrp.bom"
=== modified file 'procurement/procurement_view.xml'
--- procurement/procurement_view.xml 2010-11-15 09:43:30 +0000
+++ procurement/procurement_view.xml 2010-12-03 13:42:03 +0000
@@ -63,10 +63,10 @@
<field name="product_id" on_change="onchange_product_id(product_id)"/>
<field name="location_id" domain="[('usage','=','internal')]"/>
<field name="product_qty"/>
- <field name="product_uom" widget="selection"/>
+ <field name="product_uom"/>
<field name="product_uos_qty" groups="product.group_uos,base.group_extended"/>
- <field name="product_uos" widget="selection" groups="product.group_uos,base.group_extended"/>
+ <field name="product_uos" groups="product.group_uos,base.group_extended"/>
<separator colspan="4" string="Status"/>
<field colspan="4" name="message" readonly="1"/>
=== modified file 'product/product.py'
--- product/product.py 2010-11-24 17:09:41 +0000
+++ product/product.py 2010-12-03 13:42:03 +0000
@@ -450,6 +450,7 @@
_description = "Product"
_table = "product_product"
_inherits = {'product.template': 'product_tmpl_id'}
+ _order = 'default_code'
_columns = {
'qty_available': fields.function(_product_qty_available, method=True, type='float', string='Real Stock'),
'virtual_available': fields.function(_product_virtual_available, method=True, type='float', string='Virtual Stock'),
=== modified file 'product/product_view.xml'
--- product/product_view.xml 2010-11-24 17:09:41 +0000
+++ product/product_view.xml 2010-12-03 13:42:03 +0000
@@ -117,8 +117,8 @@
<group colspan="2" col="2" name="uom">
<separator string="Unit of Measure" colspan="2"/>
- <field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" widget="selection"/>
- <field name="uom_po_id" widget="selection" groups="base.group_extended"/>
+ <field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)"/>
+ <field name="uom_po_id" groups="base.group_extended"/>
</group>
<group colspan="2" col="2" name="uos" groups="product.group_uos">
@@ -459,7 +459,7 @@
<field name="product_name" groups="base.group_extended"/>
<field name="product_code" groups="base.group_extended"/>
<field name="min_qty"/>
- <field name="product_uom" widget="selection"/>
+ <field name="product_uom"/>
<field name="delay"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field colspan="4" groups="base.group_extended" name="pricelist_ids" nolabel="1" widget="one2many_list">
=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml 2010-11-23 12:40:55 +0000
+++ stock/stock_view.xml 2010-12-03 13:42:03 +0000
@@ -691,7 +691,7 @@
string="Scrap" type="action" groups="base.group_extended"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" colspan="1"/>
- <field name="product_uom" string="Unit Of Measure" widget="selection" colspan="4"/>
+ <field name="product_uom" string="Unit Of Measure" colspan="4"/>
<field name="product_uos_qty" groups="product.product_uos" colspan="4"/>
<field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4"/>
<field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]" colspan="4"/>
@@ -884,7 +884,7 @@
string="Scrap" type="action"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" colspan="1" groups="base.group_extended"/>
- <field name="product_uom" string="Unit Of Measure" widget="selection" colspan="4" />
+ <field name="product_uom" string="Unit Of Measure" colspan="4" />
<field name="product_uos_qty" groups="product.product_uos" colspan="4" />
<field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4" />
<field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]" colspan="4" />
@@ -1104,7 +1104,7 @@
string="Scrap" type="action" groups="base.group_extended"
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" colspan="1"/>
- <field name="product_uom" string="Unit Of Measure" widget="selection" colspan="4"/>
+ <field name="product_uom" string="Unit Of Measure" colspan="4"/>
<field name="product_uos_qty" groups="product.product_uos" colspan="4"/>
<field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4"/>
<field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]" colspan="4"/>
@@ -1359,7 +1359,7 @@
<group colspan="4" col="7">
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
- <field name="product_uom" string="Unit Of Measure" widget="selection"/>
+ <field name="product_uom" string="Unit Of Measure"/>
<button name="%(stock.move_scrap)d" groups="base.group_extended"
string="Scrap" type="action"
icon="gtk-convert" context="{'scrap': True}"
@@ -1555,7 +1555,7 @@
<group colspan="4" col="7">
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
- <field name="product_uom" string="Unit Of Measure" widget="selection"/>
+ <field name="product_uom" string="Unit Of Measure"/>
<button name="%(stock.move_scrap)d" groups="base.group_extended"
string="Scrap" type="action"
icon="gtk-convert" context="{'scrap': True}"
Follow ups