[MERGE] merged jco's feature branch clearing the packages and logistic units concepts
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Fri, 4 Apr 2014 13:16:37 +0000 (15:16 +0200)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Fri, 4 Apr 2014 13:16:37 +0000 (15:16 +0200)
bzr revid: qdp-launchpad@openerp.com-20140404131637-a23gqw42132q6ig5

1  2 
addons/product/product.py
addons/product/product_view.xml
addons/stock/stock.py
addons/stock/stock_view.xml

@@@ -946,13 -951,9 +951,8 @@@ class product_packaging(osv.osv)
          'code' : fields.char('Code', help="The code of the transport unit."),
          'weight': fields.float('Total Package Weight',
              help='The weight of a full package, pallet or box.'),
-         'weight_ul': fields.float('Empty Package Weight'),
-         'height': fields.float('Height', help='The height of the package'),
-         'width': fields.float('Width', help='The width of the package'),
-         'length': fields.float('Length', help='The length of the package'),
      }
  
--
      def _check_ean_key(self, cr, uid, ids, context=None):
          for pack in self.browse(cr, uid, ids, context=context):
              res = check_ean(pack.ean)
                                              attrs="{'readonly': [('is_only_child', '=', False)]}"/>
                                      </group>
                                  </group>
--                                <field name="packaging" groups="product.group_stock_packaging"
--                                        attrs="{'readonly': [('is_only_child', '=', False)]}">
++                                <separator string="Packages" groups="product.group_stock_packaging"/>
++                                <field name="packaging" groups="product.group_stock_packaging" attrs="{'readonly': [('is_only_child', '=', False)]}">
                                      <form string="Packaging" version="7.0">
                                          <group col="4">
                                              <field name="ean"/>
                                              <newline/>
                                              <field name="qty"/>
                                              <field name="ul"/>
-                                             <field name="weight_ul"/>
                                              <separator colspan="4" string="Palletization"/>
                                              <field name="ul_qty"/>
 -                                            <field name="ul_container"/>
++                                            <field name="ul_container" domain="[('type', '=', 'pallet')]" context="{'default_type': 'pallet'}"/>
                                              <field name="rows"/>
                                              <field name="weight"/>
-                                             <separator colspan="4" string="Pallet Dimension"/>
-                                             <field name="height"/>
-                                             <field name="width"/>
-                                             <field name="length"/>
                                          </group>
                                          <separator colspan="4" string="Description"/>
                                          <field name="name"/>
@@@ -3506,7 -3473,8 +3506,8 @@@ class stock_package(osv.osv)
          'complete_name': fields.function(_complete_name, type='char', string="Package Name",),
          'parent_left': fields.integer('Left Parent', select=1),
          'parent_right': fields.integer('Right Parent', select=1),
-         'packaging_id': fields.many2one('product.packaging', 'Type of Packaging'),
 -        'packaging_id': fields.many2one('product.packaging', 'Packaging'),
++        'packaging_id': fields.many2one('product.packaging', 'Packaging', help="This field should be completed only if everything inside the package share the same product, otherwise it doesn't really makes sense."),
+         'ul_id': fields.many2one('product.ul', 'Logistic Unit'),
          'location_id': fields.function(_get_package_info, type='many2one', relation='stock.location', string='Location', multi="package",
                                      store={
                                         'stock.quant': (_get_packages, ['location_id'], 10),
Simple merge