[IMP] product: refactoring of product variant. The main view became the view of produ...
authorChristophe Matthieu <chm@odoo.com>
Tue, 27 May 2014 07:42:52 +0000 (09:42 +0200)
committerChristophe Matthieu <chm@odoo.com>
Tue, 27 May 2014 07:42:52 +0000 (09:42 +0200)
121 files changed:
addons/account/product_view.xml
addons/account_anglo_saxon/product_view.xml
addons/event_sale/event_sale_view.xml
addons/hr_expense/hr_expense.py
addons/hr_expense/hr_expense_view.xml
addons/membership/membership.py
addons/membership/membership_view.xml
addons/mrp/mrp.py
addons/mrp/mrp_demo.xml
addons/mrp/mrp_view.xml
addons/mrp/procurement.py
addons/mrp/product.py
addons/mrp/report/price.py
addons/mrp/security/ir.model.access.csv
addons/mrp/stock.py
addons/mrp/test/bom_with_service_type_product.yml
addons/mrp/test/order_demo.yml
addons/mrp/views/report_mrpbomstructure.xml
addons/mrp/wizard/change_production_qty.py
addons/mrp_byproduct/test/mrp_byproduct.yml
addons/point_of_sale/point_of_sale.py
addons/point_of_sale/point_of_sale_demo.xml
addons/point_of_sale/point_of_sale_view.xml
addons/point_of_sale/security/ir.model.access.csv
addons/point_of_sale/static/src/js/widgets.js
addons/product/pricelist.py
addons/product/product.py
addons/product/product_data.xml
addons/product/product_demo.xml
addons/product/product_view.xml
addons/product/report/product_label.xml
addons/product/security/ir.model.access.csv
addons/product/security/product_security.xml
addons/product/test/product_pricelist.yml
addons/product_email_template/views/product_view.xml
addons/product_expiry/product_expiry.py
addons/product_expiry/product_expiry_view.xml
addons/product_extended/product_extended.py
addons/product_manufacturer/__init__.py [deleted file]
addons/product_manufacturer/__openerp__.py [deleted file]
addons/product_manufacturer/i18n/ar.po [deleted file]
addons/product_manufacturer/i18n/bg.po [deleted file]
addons/product_manufacturer/i18n/bs.po [deleted file]
addons/product_manufacturer/i18n/ca.po [deleted file]
addons/product_manufacturer/i18n/cs.po [deleted file]
addons/product_manufacturer/i18n/da.po [deleted file]
addons/product_manufacturer/i18n/de.po [deleted file]
addons/product_manufacturer/i18n/el.po [deleted file]
addons/product_manufacturer/i18n/es.po [deleted file]
addons/product_manufacturer/i18n/es_CR.po [deleted file]
addons/product_manufacturer/i18n/es_EC.po [deleted file]
addons/product_manufacturer/i18n/es_MX.po [deleted file]
addons/product_manufacturer/i18n/es_VE.po [deleted file]
addons/product_manufacturer/i18n/et.po [deleted file]
addons/product_manufacturer/i18n/fi.po [deleted file]
addons/product_manufacturer/i18n/fr.po [deleted file]
addons/product_manufacturer/i18n/gl.po [deleted file]
addons/product_manufacturer/i18n/hr.po [deleted file]
addons/product_manufacturer/i18n/hu.po [deleted file]
addons/product_manufacturer/i18n/it.po [deleted file]
addons/product_manufacturer/i18n/ja.po [deleted file]
addons/product_manufacturer/i18n/lt.po [deleted file]
addons/product_manufacturer/i18n/lv.po [deleted file]
addons/product_manufacturer/i18n/mk.po [deleted file]
addons/product_manufacturer/i18n/mn.po [deleted file]
addons/product_manufacturer/i18n/nb.po [deleted file]
addons/product_manufacturer/i18n/nl.po [deleted file]
addons/product_manufacturer/i18n/pl.po [deleted file]
addons/product_manufacturer/i18n/product_manufacturer.pot [deleted file]
addons/product_manufacturer/i18n/pt.po [deleted file]
addons/product_manufacturer/i18n/pt_BR.po [deleted file]
addons/product_manufacturer/i18n/ro.po [deleted file]
addons/product_manufacturer/i18n/ru.po [deleted file]
addons/product_manufacturer/i18n/sl.po [deleted file]
addons/product_manufacturer/i18n/sr.po [deleted file]
addons/product_manufacturer/i18n/sr@latin.po [deleted file]
addons/product_manufacturer/i18n/sv.po [deleted file]
addons/product_manufacturer/i18n/tr.po [deleted file]
addons/product_manufacturer/i18n/zh_CN.po [deleted file]
addons/product_manufacturer/i18n/zh_TW.po [deleted file]
addons/product_manufacturer/product_manufacturer.py [deleted file]
addons/product_manufacturer/product_manufacturer_view.xml [deleted file]
addons/product_manufacturer/security/ir.model.access.csv [deleted file]
addons/project_mrp/project_mrp.py
addons/project_mrp/project_mrp_view.xml
addons/purchase/purchase.py
addons/purchase/purchase_view.xml
addons/purchase_requisition/purchase_requisition.py
addons/purchase_requisition/purchase_requisition_view.xml
addons/report_intrastat/report_intrastat_view.xml
addons/sale/res_config.py
addons/sale/res_config_view.xml
addons/sale/sale.py
addons/sale_mrp/test/cancellation_propagated.yml
addons/sale_mrp/test/sale_mrp.yml
addons/sale_mrp/tests/test_move_explode.py
addons/stock/product.py
addons/stock/product_view.xml
addons/stock/stock_view.xml
addons/stock_account/product_view.xml
addons/stock_account/stock_account.py
addons/stock_landed_costs/product.py
addons/stock_landed_costs/product_view.xml
addons/stock_landed_costs/stock_landed_costs_view.xml
addons/warning/warning.py
addons/warning/warning_view.xml
addons/website_quote/data/website_quotation_demo.xml
addons/website_sale/controllers/main.py
addons/website_sale/data/data.xml
addons/website_sale/data/demo.xml
addons/website_sale/models/__init__.py
addons/website_sale/models/product.py
addons/website_sale/models/res_config.py [deleted file]
addons/website_sale/security/ir.model.access.csv
addons/website_sale/static/src/css/website_sale.css
addons/website_sale/static/src/css/website_sale.sass
addons/website_sale/static/src/js/website.tour.sale.js
addons/website_sale/static/src/js/website_sale.js
addons/website_sale/tests/test_sale_process.py
addons/website_sale/views/templates.xml
addons/website_sale/views/views.xml

index 73b31bb..9c1b0ee 100644 (file)
@@ -1,57 +1,52 @@
 <?xml version="1.0" encoding="utf-8"?>
 <openerp>
     <data>
-        <record id="product_normal_form_view" model="ir.ui.view">
-            <field name="name">product.normal.form.inherit</field>
-            <field name="model">product.product</field>
+        <record id="product_template_form_view" model="ir.ui.view">
+            <field name="name">product.template.form.inherit</field>
+            <field name="model">product.template</field>
             <field name="priority">5</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
-                <notebook position="inside">
+                <page string="Sales" position="after">
                     <page string="Accounting" groups="account.group_account_invoice">
+                        <group>
+                            <label for="categ_id" string="Internal Category"/>
+                            <div><field name="categ_id" colspan="3" nolabel="1"/></div>
+                        </group>
                         <group name="properties">
                             <group>
                                 <field name="property_account_income" domain="[('type','=','other')]" groups="account.group_account_user"
-                                    attrs="{'readonly': [('is_only_child', '=', False)]}"/>
+                                    attrs="{'readonly': [('is_product_variant', '=', True)]}"/>
                                 <field name="taxes_id" colspan="2" widget="many2many_tags"
-                                    attrs="{'readonly':[ '|', ('sale_ok','=',0), ('is_only_child', '=', False)]}"/>
+                                    attrs="{'readonly':[ '|', ('sale_ok','=',0), ('is_product_variant', '=', True)]}"/>
                             </group>
                             <group>
                                 <field name="property_account_expense" domain="[('type','=','other')]" groups="account.group_account_user"
-                                    attrs="{'readonly': [('is_only_child', '=', False)]}"/>
+                                    attrs="{'readonly': [('is_product_variant', '=', True)]}"/>
                                 <field name="supplier_taxes_id" colspan="2" widget="many2many_tags"
-                                    attrs="{'readonly': [('is_only_child', '=', False)]}"/>
+                                    attrs="{'readonly': [('is_product_variant', '=', True)]}"/>
                             </group>
                         </group>
                     </page>
-                </notebook>
+                </page>
             </field>
         </record>
 
-        <record id="product_template_form_view" model="ir.ui.view">
-            <field name="name">product.template.product.form.inherit</field>
+        <record id="product_template_search_view" model="ir.ui.view">
+            <field name="name">product.template.search</field>
             <field name="model">product.template</field>
-            <field name="inherit_id" ref="product.product_template_form_view"/>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="product.product_template_search_view"/>
             <field name="arch" type="xml">
-                <notebook position="inside">
-                    <page string="Accounting">
-                        <group name="properties">
-                            <group>
-                                <field name="property_account_income" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
-                                <field name="taxes_id" colspan="2" widget="many2many_tags"/>
-                            </group>
-                            <group>
-                                <field name="property_account_expense" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
-                                <field name="supplier_taxes_id" colspan="2" widget="many2many_tags"/>
-                            </group>
-                        </group>
-                    </page>
-                </notebook>
-             </field>
+                <field name="product_variant_ids" position="after">
+                    <field name="categ_id"/>
+                </field>
+                <xpath expr="//group[@string='Group by...']" position="inside">
+                    <filter string='Category' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'categ_id'}"/>
+                </xpath>
+            </field>
         </record>
 
-
-
         <record id="view_category_property_form" model="ir.ui.view">
             <field name="name">product.category.property.form.inherit</field>
             <field name="model">product.category</field>
index c06decf..5a58913 100644 (file)
@@ -1,29 +1,18 @@
 <?xml version="1.0"?>
 <openerp>
     <data>
-        <record id="product_normal_form_view" model="ir.ui.view">
-            <field name="name">product.normal.form.inherit.stock</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="account.product_normal_form_view"/>
-            <field name="arch" type="xml">
-                <field name="property_account_expense" position="after">
-                    <label string="" colspan="2"/>
-                    <field name="property_account_creditor_price_difference" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}" />
-                    <newline/>
-                </field>
-            </field>
-        </record>
-
         <record id="product_template_form_view" model="ir.ui.view">
-            <field name="name">product.template.product.form.inherit</field>
+            <field name="name">product.normal.form.inherit.stock</field>
             <field name="model">product.template</field>
             <field name="inherit_id" ref="account.product_template_form_view"/>
             <field name="arch" type="xml">
                 <field name="property_account_expense" position="after">
+                    <label string="" colspan="2"/>
+                    <field name="purchase_ok" invisible="1"/>
                     <field name="property_account_creditor_price_difference" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}" />
                     <newline/>
                 </field>
-             </field>
+            </field>
         </record>
 
         <record id="view_category_property_form" model="ir.ui.view">
index 8987354..a049565 100644 (file)
@@ -1,18 +1,19 @@
 <?xml version="1.0"?>
 <openerp>
     <data>
-        <record model="ir.ui.view" id="event_sale_product_form">
-             <field name="model">product.product</field>
-             <field name="inherit_id" ref="product.product_normal_form_view" />
+
+        <record model="ir.ui.view" id="event_sale_product_template_form">
+             <field name="model">product.template</field>
+             <field name="inherit_id" ref="product.product_template_form_view" />
              <field name="arch" type="xml">
-                <div name="options" position="after">
-                    <field name="event_ok" on_change="onchange_event_ok(type, event_ok, context)"
-                           attrs="{'readonly': [('is_only_child', '=', False)]}"/>
-                    <label for="event_ok"/>
+                <div name="options" position="inside">
+                    <div>
+                        <field name="event_ok" on_change="onchange_event_ok(type, event_ok, context)"/>
+                        <label for="event_ok"/>
+                    </div>
                 </div>
                 <field name='type' position="after">
-                    <field name="event_type_id" attrs="{'invisible': [('event_ok', '=', False)],
-                                                        'readonly': [('is_only_child', '=', False)]}"/>
+                    <field name="event_type_id" attrs="{'invisible': [('event_ok', '=', False)]}"/>
                 </field>
              </field>
         </record>
             </field>
         </record>
 
-        <record model="ir.ui.view" id="event_sale_product_template_form">
-             <field name="model">product.template</field>
-             <field name="inherit_id" ref="product.product_template_form_view" />
-             <field name="arch" type="xml">
-                <div name="options" position="inside">
-                    <field name="event_ok" on_change="onchange_event_ok(type, event_ok, context)"/>
-                    <label for="event_ok"/>
-                </div>
-                <field name='company_id' position="after">
-                    <field name="event_type_id" attrs="{'invisible': [('event_ok', '=', False)]}"/>
-                </field>
-             </field>
-        </record>
-
         <record model="ir.ui.view" id="event_order_line">
              <field name="name">event.sale.order</field>
              <field name="model">sale.order</field>
index f57b142..0129e5d 100644 (file)
@@ -392,8 +392,8 @@ class hr_expense_expense(osv.osv):
         return result
 
 
-class product_product(osv.osv):
-    _inherit = "product.product"
+class product_template(osv.osv):
+    _inherit = "product.template"
     _columns = {
         'hr_expense_ok': fields.boolean('Can be Expensed', help="Specify if the product can be selected in an HR expense line."),
     }
index 457d8f3..9756e6a 100644 (file)
 
 
         <record id="view_product_hr_expense_form" model="ir.ui.view">
-            <field name="name">product.product.expense.form</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
+            <field name="name">product.template.expense.form</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
                 <div name="options" position="inside">
-                    <field name="hr_expense_ok"/>
-                    <label for="hr_expense_ok"/>
+                    <div>
+                        <field name="hr_expense_ok"/>
+                        <label for="hr_expense_ok"/>
+                    </div>
                 </div>
             </field>
         </record>
index 98e47f8..6cc1f0e 100644 (file)
@@ -462,7 +462,7 @@ class Product(osv.osv):
         return super(Product,self).fields_view_get(cr, user, view_id, view_type, context, toolbar, submenu)
 
     '''Product'''
-    _inherit = 'product.product'
+    _inherit = 'product.template'
     _columns = {
         'membership': fields.boolean('Membership', help='Check if the product is eligible for membership.'),
         'membership_date_from': fields.date('Membership Start Date', help='Date from which membership becomes active.'),
index 3964b8b..461090f 100644 (file)
@@ -8,7 +8,7 @@
 
         <record model="ir.ui.view" id="membership_product_search_form_view">
             <field name="name">membership.product.search.form</field>
-            <field name="model">product.product</field>
+            <field name="model">product.template</field>
             <field name="arch" type="xml">
                 <search string="Membership Products">
                     <field name="name" filter_domain="['|',('name','ilike',self),('code','ilike',self)]" string="Membership Product"/>
 
         <record model="ir.ui.view" id="membership_products_tree">
             <field name="name">Membership products</field>
-            <field name="model">product.product</field>
+            <field name="model">product.template</field>
             <field name="arch" type="xml">
                 <tree string="Membership products">
-                    <field name="code"/>
                     <field name="name"/>
                     <field name="membership_date_from"/>
                     <field name="membership_date_to"/>
@@ -41,7 +40,7 @@
 
         <record model="ir.ui.view" id="membership_products_form">
             <field name="name">Membership Products</field>
-            <field name="model">product.product</field>
+            <field name="model">product.template</field>
             <field name="arch" type="xml">
                 <form string="Membership products" version="7.0">
                     <sheet>
             </field>
         </record>
 
-        <record model="ir.ui.view" id="product_normal_form_view">
+        <record model="ir.ui.view" id="product_template_form_view">
             <field name="name">Membership Products</field>
-            <field name="model">product.product</field>
+            <field name="model">product.template</field>
             <field name="priority">6</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
-                <page string="Accounting" position="after">
-                    <page string="Membership">
-                        <group col="1">
-                            <group>
-                                <field name="membership" readonly="0"/>
-                            </group>
-                            <group attrs="{'invisible':[('membership','=',False)]}">
-                                <field name="membership_date_from" readonly="0" attrs="{'required':[('membership','=',True)]}"/>
-                                <field name="membership_date_to" readonly="0" attrs="{'required':[('membership','=',True)]}"/>
-                            </group>
-                        </group>
-                    </page>
-                </page>
+                <field name="type" position="after">
+                    <field name="membership" readonly="0" attrs="{'invisible': [('type', '!=', 'service')]}"/>
+                </field>
+                <field name="description" position="before">
+                    <group attrs="{'invisible':[('membership','=',False)]}">
+                        <field name="membership_date_from" readonly="0" attrs="{'required':[('membership','=',True)]}"/>
+                        <field name="membership_date_to" readonly="0" attrs="{'required':[('membership','=',True)]}"/>
+                    </group>
+                </field>
             </field>
         </record>
 
         <record model="ir.actions.act_window" id="action_membership_products">
             <field name="name">Membership Products</field>
-            <field name="res_model">product.product</field>
+            <field name="res_model">product.template</field>
             <field name="domain">[('membership','=',True), ('type', '=', 'service')]</field>
             <field name="context">{'membership':True, 'type':'service', 'default_membership': True, 'default_type': 'service'}</field>
             <field name="search_view_id" ref="membership_product_search_form_view"/>
index 3578557..dbcd769 100644 (file)
@@ -178,207 +178,266 @@ class mrp_bom(osv.osv):
         bom_parent = bom_obj.browse(cr, uid, bom_id, context=context)
         for bom in self.browse(cr, uid, ids, context=context):
             if (bom_parent) or (bom.id == bom_id):
-                result[bom.id] = map(lambda x: x.id, bom.bom_lines)
+                result[bom.id] = map(lambda x: x.id, bom.bom_line_ids)
             else:
                 result[bom.id] = []
-            if bom.bom_lines:
+            if bom.bom_line_ids:
                 continue
             ok = ((name=='child_complete_ids'))
             if (bom.type=='phantom' or ok):
-                sids = bom_obj.search(cr, uid, [('bom_id','=',False),('product_id','=',bom.product_id.id)])
+                sids = bom_obj.search(cr, uid, [('product_tmpl_id','=',bom.product_tmpl_id.id)])
                 if sids:
                     bom2 = bom_obj.browse(cr, uid, sids[0], context=context)
-                    result[bom.id] += map(lambda x: x.id, bom2.bom_lines)
-
+                    result[bom.id] += map(lambda x: x.id, bom2.bom_line_ids)
         return result
 
     _columns = {
         'name': fields.char('Name', size=64),
         'code': fields.char('Reference', size=16),
         'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the bills of material without removing it."),
-        'type': fields.selection([('normal', 'Normal BoM'), ('phantom', 'Sets / Phantom')], 'BoM Type', required=True,
-                                 help= "If a by-product is used in several products, it can be useful to create its own BoM. "\
-                                 "Though if you don't want separated production orders for this by-product, select Set/Phantom as BoM type. "\
-                                 "If a Phantom BoM is used for a root product, it will be sold and shipped as a set of components, instead of being produced."),
-        'date_start': fields.date('Valid From', help="Validity of this BoM or component. Keep empty if it's always valid."),
-        'date_stop': fields.date('Valid Until', help="Validity of this BoM or component. Keep empty if it's always valid."),
-        'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bills of material."),
+        'type': fields.selection([('normal', 'Normal'), ('phantom', 'Set')], 'BoM Type', required=True,
+                help= "Set: When processing a sales order for this product, the delivery order will contain the raw materials, instead of the finished product."),
         'position': fields.char('Internal Reference', size=64, help="Reference to a position in an external plan."),
-        'product_id': fields.many2one('product.product', 'Product', required=True),
-        'product_uos_qty': fields.float('Product UOS Qty'),
-        'product_uos': fields.many2one('product.uom', 'Product UOS', help="Product UOS (Unit of Sale) is the unit of measurement for the invoicing and promotion of stock."),
+        'product_tmpl_id': fields.many2one('product.template', 'Product', required=True),
+        'product_id': fields.many2one('product.product', 'Product Variant',
+            domain="[('product_tmpl_id','=',product_tmpl_id)]",
+            help="If a product variant is defined the BOM is available only for this product."),
+        'bom_line_ids': fields.one2many('mrp.bom.line', 'bom_id', 'BoM Lines'),
+        
         'product_qty': fields.float('Product Quantity', required=True, digits_compute=dp.get_precision('Product Unit of Measure')),
         'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for the inventory control"),
+        'date_start': fields.date('Valid From', help="Validity of this BoM. Keep empty if it's always valid."),
+        'date_stop': fields.date('Valid Until', help="Validity of this BoM. Keep empty if it's always valid."),
+        'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bills of material."),
+        'routing_id': fields.many2one('mrp.routing', 'Routing', help="The list of operations (list of work centers) to produce the finished product. "\
+                "The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production planning."),
         'product_rounding': fields.float('Product Rounding', help="Rounding applied on the product quantity."),
-        'product_efficiency': fields.float('Manufacturing Efficiency', required=True, help="A factor of 0.9 means a loss of 10% within the production process."),
-        'bom_lines': fields.one2many('mrp.bom', 'bom_id', 'BoM Lines'),
-        'bom_id': fields.many2one('mrp.bom', 'Parent BoM', ondelete='cascade', select=True),
-        'routing_id': fields.many2one('mrp.routing', 'Routing', help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production planning."),
-        'property_ids': fields.many2many('mrp.property', 'mrp_bom_property_rel', 'bom_id', 'property_id', 'Properties'),
+        'product_efficiency': fields.float('Manufacturing Efficiency', required=True, help="A factor of 0.9 means a loss of 10% during the production process."),
+        'property_ids': fields.many2many('mrp.property', string='Properties'),
         'child_complete_ids': fields.function(_child_compute, relation='mrp.bom', string="BoM Hierarchy", type='many2many'),
         'company_id': fields.many2one('res.company', 'Company', required=True),
     }
+
+    def _get_uom_id(self, cr, uid, *args):
+        return self.pool["product.uom"].search(cr, uid, [], limit=1, order='id')[0]
     _defaults = {
         'active': lambda *a: 1,
-        'product_efficiency': lambda *a: 1.0,
         'product_qty': lambda *a: 1.0,
+        'product_efficiency': lambda *a: 1.0,
         'product_rounding': lambda *a: 0.0,
         'type': lambda *a: 'normal',
+        'product_uom': _get_uom_id,
         'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.bom', context=c),
     }
     _order = "sequence"
-    _parent_name = "bom_id"
-    _sql_constraints = [
-        ('bom_qty_zero', 'CHECK (product_qty>0)', 'All product quantities must be greater than 0.\n' \
-            'You should install the mrp_byproduct module if you want to manage extra products on BoMs !'),
-    ]
-
-    def _check_recursion(self, cr, uid, ids, context=None):
-        level = 100
-        while len(ids):
-            cr.execute('select distinct bom_id from mrp_bom where id IN %s', (tuple(ids),))
-            ids = filter(None, map(lambda x: x[0], cr.fetchall()))
-            if not level:
-                return False
-            level -= 1
-        return True
-
-    def _check_product(self, cr, uid, ids, context=None):
-        all_prod = []
-        boms = self.browse(cr, uid, ids, context=context)
-        def check_bom(boms):
-            res = True
-            for bom in boms:
-                if bom.product_id.id in all_prod:
-                    res = res and False
-                all_prod.append(bom.product_id.id)
-                lines = bom.bom_lines
-                if lines:
-                    res = res and check_bom([bom_id for bom_id in lines if bom_id not in boms])
-            return res
-        return check_bom(boms)
 
-    _constraints = [
-        (_check_recursion, 'Error ! You cannot create recursive BoM.', ['parent_id']),
-        (_check_product, 'BoM line product should not be same as BoM product.', ['product_id']),
-    ]
-
-    def onchange_product_id(self, cr, uid, ids, product_id, name, product_qty=0, context=None):
-        """ Changes UoM and name if product_id changes.
-        @param name: Name of the field
-        @param product_id: Changed product_id
-        @return:  Dictionary of changed values
-        """
-        res = {}
-        if product_id:
-            prod = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
-            res['value'] = {'name': prod.name, 'product_uom': prod.uom_id.id, 'product_uos_qty': 0, 'product_uos': False}
-            if prod.uos_id.id:
-                res['value']['product_uos_qty'] = product_qty * prod.uos_coeff
-                res['value']['product_uos'] = prod.uos_id.id
-        return res
-
-    def onchange_uom(self, cr, uid, ids, product_id, product_uom, context=None):
-        res = {'value': {}}
-        if not product_uom or not product_id:
-            return res
-        product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
-        uom = self.pool.get('product.uom').browse(cr, uid, product_uom, context=context)
-        if uom.category_id.id != product.uom_id.category_id.id:
-            res['warning'] = {'title': _('Warning'), 'message': _('The Product Unit of Measure you chose has a different category than in the product form.')}
-            res['value'].update({'product_uom': product.uom_id.id})
-        return res
-
-    def _bom_find(self, cr, uid, product_id, product_uom, properties=None):
+    def _bom_find(self, cr, uid, product_uom, product_tmpl_id=None, product_id=None, properties=None):
         """ Finds BoM for particular product and product uom.
-        @param product_id: Selected product.
+        @param product_tmpl_id: Selected product.
         @param product_uom: Unit of measure of a product.
         @param properties: List of related properties.
         @return: False or BoM id.
         """
         if properties is None:
             properties = []
-        domain = [('product_id', '=', product_id), ('bom_id', '=', False),
-            '|', ('date_start', '=', False), ('date_start', '<=', time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)),
-            '|', ('date_stop', '=', False), ('date_stop', '>=', time.strftime(DEFAULT_SERVER_DATETIME_FORMAT))]
+        domain = None
+        if product_id:
+            domain = ['|',('product_id', '=', product_id),('product_tmpl_id.product_variant_ids', '=', product_id)]
+        else:
+            domain = [('product_id', '=', False), ('product_tmpl_id', '=', product_tmpl_id)]
+        if product_uom:
+            domain +=  [('product_uom','=',product_uom)]
+        domain = domain + [ '|', ('date_start', '=', False), ('date_start', '<=', time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)),
+                            '|', ('date_stop', '=', False), ('date_stop', '>=', time.strftime(DEFAULT_SERVER_DATETIME_FORMAT))]
         ids = self.search(cr, uid, domain)
-        max_prop = 0
-        result = False
         for bom in self.pool.get('mrp.bom').browse(cr, uid, ids):
-            prop = 0
-            for prop_id in bom.property_ids:
-                if prop_id.id in properties:
-                    prop += 1
-            if (prop > max_prop) or ((max_prop == 0) and not result):
-                result = bom.id
-                max_prop = prop
-        return result
+            if not set(map(int,bom.property_ids or [])) - set(properties or []):
+                return bom.id
+        return False
 
-    def _bom_explode(self, cr, uid, bom, factor, properties=None, addthis=False, level=0, routing_id=False):
+    def _bom_explode(self, cr, uid, bom, product, factor, properties=None, level=0, routing_id=False, previous_products=None, master_bom=None):
         """ Finds Products and Work Centers for related BoM for manufacturing order.
-        @param bom: BoM of particular product.
+        @param bom: BoM of particular product template.
+        @param product: Select a particular variant of the BoM. If False use BoM without variants.
         @param factor: Factor of product UoM.
         @param properties: A List of properties Ids.
-        @param addthis: If BoM found then True else False.
         @param level: Depth level to find BoM lines starts from 10.
+        @param previous_products: List of product previously use by bom explore to avoid recursion
+        @param master_bom: When recursion, used to display the name of the master bom
         @return: result: List of dictionaries containing product details.
                  result2: List of dictionaries containing Work Center details.
         """
         routing_obj = self.pool.get('mrp.routing')
-        factor = factor / (bom.product_efficiency or 1.0)
-        factor = _common.ceiling(factor, bom.product_rounding)
-        if factor < bom.product_rounding:
-            factor = bom.product_rounding
+        all_prod = [] + (previous_products or [])
+        master_bom = master_bom or bom
+
+        def _factor(factor, product_efficiency, product_rounding):
+            factor = factor / (product_efficiency or 1.0)
+            factor = _common.ceiling(factor, product_rounding)
+            if factor < product_rounding:
+                factor = product_rounding
+            return factor
+
+        factor = _factor(factor, bom.product_efficiency, bom.product_rounding)
+
         result = []
         result2 = []
-        phantom = False
-        if bom.type == 'phantom' and not bom.bom_lines:
-            newbom = self._bom_find(cr, uid, bom.product_id.id, bom.product_uom.id, properties)
-
-            if newbom:
-                res = self._bom_explode(cr, uid, self.browse(cr, uid, [newbom])[0], factor * bom.product_qty, properties, addthis=True, level=level + 10)
-                result = result + res[0]
-                result2 = result2 + res[1]
-                phantom = True
-            else:
-                phantom = False
-        if not phantom:
-            if addthis and not bom.bom_lines:
+
+        routing = (routing_id and routing_obj.browse(cr, uid, routing_id)) or bom.routing_id or False
+        if routing:
+            for wc_use in routing.workcenter_lines:
+                wc = wc_use.workcenter_id
+                d, m = divmod(factor, wc_use.workcenter_id.capacity_per_cycle)
+                mult = (d + (m and 1.0 or 0.0))
+                cycle = mult * wc_use.cycle_nbr
+                result2.append({
+                    'name': tools.ustr(wc_use.name) + ' - ' + tools.ustr(bom.product_tmpl_id.name_get()[0][1]),
+                    'workcenter_id': wc.id,
+                    'sequence': level + (wc_use.sequence or 0),
+                    'cycle': cycle,
+                    'hour': float(wc_use.hour_nbr * mult + ((wc.time_start or 0.0) + (wc.time_stop or 0.0) + cycle * (wc.time_cycle or 0.0)) * (wc.time_efficiency or 1.0)),
+                })
+
+        for bom_line_id in bom.bom_line_ids:
+            if bom_line_id.date_start and bom_line_id.date_start > time.strftime(DEFAULT_SERVER_DATETIME_FORMAT) or \
+                bom_line_id.date_stop and bom_line_id.date_stop > time.strftime(DEFAULT_SERVER_DATETIME_FORMAT):
+                    continue
+            # check properties
+            if set(map(int,bom_line_id.property_ids or [])) - set(properties or []):
+                continue
+            # all bom_line_id variant values must be in the product
+            if bom_line_id.variants_ids:
+                if not product or (set(map(int,bom_line_id.variants_ids or [])) - set(map(int,product.variant_ids))):
+                    continue
+
+            if bom_line_id.product_id.id in all_prod:
+                raise osv.except_osv(_('Invalid Action!'), _('BoM "%s" contains a BoM line with a product recursion: "%s".') % (master_bom.name,bom_line_id.product_id.name_get()[0][1]))
+            all_prod.append(bom_line_id.product_id.id)
+            
+            if bom_line_id.type != "phantom":
                 result.append({
-                    'name': bom.product_id.name,
-                    'product_id': bom.product_id.id,
-                    'product_qty': bom.product_qty * factor,
-                    'product_uom': bom.product_uom.id,
-                    'product_uos_qty': bom.product_uos and bom.product_uos_qty * factor or False,
-                    'product_uos': bom.product_uos and bom.product_uos.id or False,
+                    'name': bom_line_id.product_id.name,
+                    'product_id': bom_line_id.product_id.id,
+                    'product_qty': _factor(bom_line_id.product_qty * factor, bom_line_id.product_efficiency, bom_line_id.product_rounding),
+                    'product_uom': bom_line_id.product_uom.id,
+                    'product_uos_qty': bom_line_id.product_uos and bom_line_id.product_uos_qty * factor or False,
+                    'product_uos': bom_line_id.product_uos and bom_line_id.product_uos.id or False,
                 })
-            routing = (routing_id and routing_obj.browse(cr, uid, routing_id)) or bom.routing_id or False
-            if routing:
-                for wc_use in routing.workcenter_lines:
-                    wc = wc_use.workcenter_id
-                    d, m = divmod(factor, wc_use.workcenter_id.capacity_per_cycle)
-                    mult = (d + (m and 1.0 or 0.0))
-                    cycle = mult * wc_use.cycle_nbr
-                    result2.append({
-                        'name': tools.ustr(wc_use.name) + ' - ' + tools.ustr(bom.product_id.name),
-                        'workcenter_id': wc.id,
-                        'sequence': level + (wc_use.sequence or 0),
-                        'cycle': cycle,
-                        'hour': float(wc_use.hour_nbr * mult + ((wc.time_start or 0.0) + (wc.time_stop or 0.0) + cycle * (wc.time_cycle or 0.0)) * (wc.time_efficiency or 1.0)),
-                    })
-            for bom2 in bom.bom_lines:
-                res = self._bom_explode(cr, uid, bom2, factor, properties, addthis=True, level=level + 10)
-                result = result + res[0]
-                result2 = result2 + res[1]
+            else:
+                bom_id = self._bom_find(cr, uid, bom_line_id.product_uom.id, product_id=bom_line_id.product_id.id, properties=properties)
+                bom2 = self.browse(cr, uid, bom_id)  
+                if bom2:
+                    res = self._bom_explode(cr, uid, bom2, bom_line_id.product_id, factor,
+                        properties=properties, level=level + 10, previous_products=all_prod, master_bom=master_bom)
+                    result = result + res[0]
+                    result2 = result2 + res[1]
+                else:
+                    raise osv.except_osv(_('Invalid Action!'), _('BoM "%s" contains a phantom BoM line but the product "%s" don\'t have any BoM defined.') % (master_bom.name,bom_line_id.product_id.name_get()[0][1]))
+
         return result, result2
 
     def copy_data(self, cr, uid, id, default=None, context=None):
         if default is None:
             default = {}
         bom_data = self.read(cr, uid, id, [], context=context)
-        default.update(name=_("%s (copy)") % (bom_data['name']), bom_id=False)
+        default.update(name=_("%s (copy)") % (bom_data['name']))
         return super(mrp_bom, self).copy_data(cr, uid, id, default, context=context)
 
+    def onchange_uom(self, cr, uid, ids, product_tmpl_id, product_uom, context=None):
+        res = {'value': {}}
+        if not product_uom or not product_tmpl_id:
+            return res
+        product = self.pool.get('product.template').browse(cr, uid, product_tmpl_id, context=context)
+        uom = self.pool.get('product.uom').browse(cr, uid, product_uom, context=context)
+        if uom.category_id.id != product.uom_id.category_id.id:
+            res['warning'] = {'title': _('Warning'), 'message': _('The Product Unit of Measure you chose has a different category than in the product form.')}
+            res['value'].update({'product_uom': product.uom_id.id})
+        return res
+
+    def onchange_product_tmpl_id(self, cr, uid, ids, product_tmpl_id, product_qty=0, context=None):
+        """ Changes UoM and name if product_id changes.
+        @param product_id: Changed product_id
+        @return:  Dictionary of changed values
+        """
+        res = {}
+        if product_tmpl_id:
+            prod = self.pool.get('product.template').browse(cr, uid, product_tmpl_id, context=context)
+            res['value'] = {
+                'name': prod.name,
+                'product_uom': prod.uom_id.id,
+            }
+        return res
+
+class mrp_bom_line(osv.osv):
+    _name = 'mrp.bom.line'
+    _order = "sequence"
+
+    _columns = {
+        'type': fields.selection([('normal', 'Normal'), ('phantom', 'Phantom')], 'BoM Line Type', required=True,
+                help="Phantom: this product line will not appear in the raw materials of manufacturing orders,"
+                     "it will be directly replaced by the raw materials of its own BoM, without triggering"
+                     "an extra manufacturing order."),
+        'product_id': fields.many2one('product.product', 'Product', required=True),
+        'product_uos_qty': fields.float('Product UOS Qty'),
+        'product_uos': fields.many2one('product.uom', 'Product UOS', help="Product UOS (Unit of Sale) is the unit of measurement for the invoicing and promotion of stock."),
+        'product_qty': fields.float('Product Quantity', required=True, digits_compute=dp.get_precision('Product Unit of Measure')),
+        'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True,
+            help="Unit of Measure (Unit of Measure) is the unit of measurement for the inventory control"),
+        
+        'date_start': fields.date('Valid From', help="Validity of component. Keep empty if it's always valid."),
+        'date_stop': fields.date('Valid Until', help="Validity of component. Keep empty if it's always valid."),
+        'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying."),
+        'routing_id': fields.many2one('mrp.routing', 'Routing', help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production planning."),
+        'product_rounding': fields.float('Product Rounding', help="Rounding applied on the product quantity."),
+        'product_efficiency': fields.float('Manufacturing Efficiency', required=True, help="A factor of 0.9 means a loss of 10% within the production process."),
+        'property_ids': fields.many2many('mrp.property', string='Properties'),
+
+        'bom_id': fields.many2one('mrp.bom', 'Parent BoM', ondelete='cascade', select=True, required=True),
+        'variants_ids': fields.many2many('product.attribute.value', string='Variants', help="BOM Product Variants needed form apply this line."),
+    }
+
+    def _get_uom_id(self, cr, uid, *args):
+        return self.pool["product.uom"].search(cr, uid, [], limit=1, order='id')[0]
+    _defaults = {
+        'product_qty': lambda *a: 1.0,
+        'product_efficiency': lambda *a: 1.0,
+        'product_rounding': lambda *a: 0.0,
+        'type': lambda *a: 'normal',
+        'product_uom': _get_uom_id,
+    }
+    _sql_constraints = [
+        ('bom_qty_zero', 'CHECK (product_qty>0)', 'All product quantities must be greater than 0.\n' \
+            'You should install the mrp_byproduct module if you want to manage extra products on BoMs !'),
+    ]
+
+    def onchange_uom(self, cr, uid, ids, product_id, product_uom, context=None):
+        res = {'value': {}}
+        if not product_uom or not product_id:
+            return res
+        product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
+        uom = self.pool.get('product.uom').browse(cr, uid, product_uom, context=context)
+        if uom.category_id.id != product.uom_id.category_id.id:
+            res['warning'] = {'title': _('Warning'), 'message': _('The Product Unit of Measure you chose has a different category than in the product form.')}
+            res['value'].update({'product_uom': product.uom_id.id})
+        return res
+
+    def onchange_product_id(self, cr, uid, ids, product_id, product_qty=0, context=None):
+        """ Changes UoM if product_id changes.
+        @param product_id: Changed product_id
+        @return:  Dictionary of changed values
+        """
+        res = {}
+        if product_id:
+            prod = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
+            res['value'] = {
+                'product_uom': prod.uom_id.id,
+                'product_uos_qty': 0,
+                'product_uos': False
+            }
+            if prod.uos_id.id:
+                res['value']['product_uos_qty'] = product_qty * prod.uos_coeff
+                res['value']['product_uos'] = prod.uos_id.id
+        return res
 
 class mrp_production(osv.osv):
     """
@@ -475,7 +534,7 @@ class mrp_production(osv.osv):
         'date_planned': fields.datetime('Scheduled Date', required=True, select=1, readonly=True, states={'draft': [('readonly', False)]}),
         'date_start': fields.datetime('Start Date', select=True, readonly=True),
         'date_finished': fields.datetime('End Date', select=True, readonly=True),
-        'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id', '=', False)], readonly=True, states={'draft': [('readonly', False)]},
+        'bom_id': fields.many2one('mrp.bom', 'Bill of Material', readonly=True, states={'draft': [('readonly', False)]},
             help="Bill of Materials allow you to define the list of required raw materials to make a finished product."),
         'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', readonly=True, states={'draft': [('readonly', False)]},
             help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production plannification."),
@@ -586,7 +645,7 @@ class mrp_production(osv.osv):
             }}
         bom_obj = self.pool.get('mrp.bom')
         product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
-        bom_id = bom_obj._bom_find(cr, uid, product.id, product.uom_id and product.uom_id.id, [])
+        bom_id = bom_obj._bom_find(cr, uid, product.uom_id and product.uom_id.id, product_id=product.id, properties=[])
         routing_id = False
         if bom_id:
             bom_point = bom_obj.browse(cr, uid, bom_id, context=context)
@@ -635,7 +694,7 @@ class mrp_production(osv.osv):
             bom_point = production.bom_id
             bom_id = production.bom_id.id
             if not bom_point:
-                bom_id = bom_obj._bom_find(cr, uid, production.product_id.id, production.product_uom.id, properties)
+                bom_id = bom_obj._bom_find(cr, uid, production.product_uom.id, product_id=production.product_id.id, properties=properties)
                 if bom_id:
                     bom_point = bom_obj.browse(cr, uid, bom_id)
                     routing_id = bom_point.routing_id.id or False
@@ -646,9 +705,8 @@ class mrp_production(osv.osv):
 
             # get components and workcenter_lines from BoM structure
             factor = uom_obj._compute_qty(cr, uid, production.product_uom.id, production.product_qty, bom_point.product_uom.id)
-            res = bom_obj._bom_explode(cr, uid, bom_point, factor / bom_point.product_qty, properties, routing_id=production.routing_id.id)
-            results = res[0]  # product_lines
-            results2 = res[1]  # workcenter_lines
+            # product_lines, workcenter_lines
+            results, results2 = bom_obj._bom_explode(cr, uid, bom_point, production.product_id, factor / bom_point.product_qty, properties, routing_id=production.routing_id.id)
             # reset product_lines in production order
             for line in results:
                 line['production_id'] = production.id
@@ -777,15 +835,18 @@ class mrp_production(osv.osv):
         dicts = {}
         # Find product qty to be consumed and consume it
         for scheduled in production.product_lines:
-            consumed_qty = consumed_data.get(scheduled.product_id.id, 0.0)
+            product_id = scheduled.product_id.id
+
+            consumed_qty = consumed_data.get(product_id, 0.0)
+            
             # qty available for consume and produce
             qty_avail = scheduled.product_qty - consumed_qty
             if qty_avail <= 0.0:
                 # there will be nothing to consume for this raw material
                 continue
 
-            if not dicts.get(scheduled.product_id.id):
-                dicts[scheduled.product_id.id] = {}
+            if not dicts.get(product_id):
+                dicts[product_id] = {}
 
             # total qty of consumed product we need after this consumption
             total_consume = ((product_qty + produced_qty) * scheduled.product_qty / production.product_qty)
@@ -795,9 +856,8 @@ class mrp_production(osv.osv):
             for move in production.move_lines:
                 if qty <= 0.0:
                     break
-                if move.product_id.id != scheduled.product_id.id:
+                if move.product_id.id != product_id:
                     continue
-                product_id = scheduled.product_id.id
 
                 q = min(move.product_qty, qty)
                 quants = quant_obj.quants_get_prefered_domain(cr, uid, move.location_id, scheduled.product_id, q, domain=[('qty', '>', 0.0)],
@@ -895,7 +955,8 @@ class mrp_production(osv.osv):
                     #consumed more in wizard than previously planned
                     product = self.pool.get('product.product').browse(cr, uid, consume['product_id'], context=context)
                     extra_move_id = self._make_consume_line_from_data(cr, uid, production, product, product.uom_id.id, remaining_qty, False, 0, context=context)
-                    stock_mov_obj.action_done(cr, uid, [extra_move_id], context=context)
+                    if extra_move_id:
+                        stock_mov_obj.action_done(cr, uid, [extra_move_id], context=context)
 
         self.message_post(cr, uid, production_id, body=_("%s produced") % self._description, context=context)
         self.signal_button_produce_done(cr, uid, [production_id])
@@ -1111,24 +1172,4 @@ class mrp_production_product_line(osv.osv):
         'production_id': fields.many2one('mrp.production', 'Production Order', select=True),
     }
 
-class product_product(osv.osv):
-    _inherit = "product.product"
-    def _bom_orders_count(self, cr, uid, ids, field_name, arg, context=None):
-        Bom = self.pool('mrp.bom')
-        Production = self.pool('mrp.production')
-        return {
-            product_id: {
-                'bom_count': Bom.search_count(cr, uid, [('product_id', '=', product_id), ('bom_id', '=', False)], context=context),
-                'mo_count': Production.search_count(cr,uid, [('product_id', '=', product_id)], context=context),
-                'bom_strct': Bom.search_count(cr, uid, [('product_id', '=', product_id), ('bom_id', '=', False)], context=context),
-            }
-            for product_id in ids
-        }
-    _columns = {
-        'bom_ids': fields.one2many('mrp.bom', 'product_id', 'Bill of Materials'),
-        'bom_count': fields.function(_bom_orders_count, string='# Bill of Material', type='integer', multi="_bom_order_count"),
-        'bom_strct': fields.function(_bom_orders_count, string='# Bill of Material Structure', type='integer', multi="_bom_order_count"),
-        'mo_count': fields.function(_bom_orders_count, string='# Manufacturing Orders', type='integer', multi="_bom_order_count"),
-    }
-
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
index 160e92c..d6a3e65 100644 (file)
 
         <record id="mrp_bom_1" model="mrp.bom">
             <field name="name">HDD 500GB</field>
-            <field name="product_id" ref="product.product_product_18"/>
-            <field name="product_qty">1</field>
+            <field name="product_tmpl_id" ref="product.product_product_18_product_template"/>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">5</field>            
             <field name="routing_id" ref="mrp_routing_0"/>
             <field name="type">normal</field>
         </record>
 
-        <record id="mrp_bom_2" model="mrp.bom">
-            <field name="name">320GB HDD</field>
+        <record id="mrp_bom_line_1" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_17"/>
             <field name="product_qty">2</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="bom_id" ref="mrp_bom_1"/>
         </record>
 
-        <record id="mrp_bom_3" model="mrp.bom">
+        <record id="mrp_bom_2" model="mrp.bom">
             <field name="name">HDD 2TB on Demand</field>
-            <field name="product_id" ref="product.product_product_19"/>
-            <field name="product_qty">1</field>
+            <field name="product_tmpl_id" ref="product.product_product_19_product_template"/>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">5</field>            
             <field name="routing_id" ref="mrp_routing_1"/>
             <field name="type">normal</field>
         </record>
 
-        <record id="mrp_bom_4" model="mrp.bom">
-            <field name="name">HDD 500GB</field>
+        <record id="mrp_bom_line_2" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_18"/>
             <field name="product_qty">4</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">5</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_3"/>
+            <field name="bom_id" ref="mrp_bom_2"/>
         </record>
 
-        <record id="mrp_bom_5" model="mrp.bom">
+        <record id="mrp_bom_3" model="mrp.bom">
             <field name="name">HDD on Demand</field>
-            <field name="product_id" ref="product.product_product_19"/>
-            <field name="product_qty">1</field>
+            <field name="product_tmpl_id" ref="product.product_product_19_product_template"/>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">10</field>            
             <field name="type">normal</field>
         </record>
 
-        <record id="mrp_bom_6" model="mrp.bom">
-            <field name="name">320GB HDD</field>
+        <record id="mrp_bom_line_3" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_17"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">5</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_5"/>
+            <field name="bom_id" ref="mrp_bom_3"/>
         </record>
 
-        <record id="mrp_bom_7" model="mrp.bom">
+        <record id="mrp_bom_4" model="mrp.bom">
             <field name="name">Laptop Customized</field>
-            <field name="product_id" ref="product.product_product_27"/>
-            <field name="product_qty">1</field>
+            <field name="product_tmpl_id" ref="product.product_product_27_product_template"/>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">5</field>            
             <field name="routing_id" ref="mrp_routing_1"/>
             <field name="type">normal</field>
         </record>
 
-        <record id="mrp_bom_8" model="mrp.bom">
-            <field name="name">Windows 7 Professional</field>
+        <record id="mrp_bom_line_4" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_40"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">2</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_7"/>
+            <field name="bom_id" ref="mrp_bom_4"/>
         </record>
 
-        <record id="mrp_bom_9" model="mrp.bom">
-            <field name="name">USB Keyboard, QWERTY</field>
+        <record id="mrp_bom_line_5" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_8"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">4</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_7"/>
+            <field name="bom_id" ref="mrp_bom_4"/>
         </record>
 
-        <record id="mrp_bom_10" model="mrp.bom">
-            <field name="name">Mouse, Wireless</field>
+        <record id="mrp_bom_line_6" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_12"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">6</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_7"/>
+            <field name="bom_id" ref="mrp_bom_4"/>
         </record>
 
-        <record id="mrp_bom_11" model="mrp.bom">
+        <record id="mrp_bom_5" model="mrp.bom">
             <field name="name">Laptop Customized + Azerty</field>
-            <field name="product_id" ref="product.product_product_27"/>
-            <field name="product_qty">1</field>
+            <field name="product_tmpl_id" ref="product.product_product_27_product_template"/>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">10</field>            
             <field name="type">normal</field>
         </record>
 
-        <record id="mrp_bom_12" model="mrp.bom">
-            <field name="name">Windows 7 Professional</field>
+        <record id="mrp_bom_line_7" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_40"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">2</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_11"/>
+            <field name="bom_id" ref="mrp_bom_5"/>
         </record>
 
-        <record id="mrp_bom_13" model="mrp.bom">
-            <field name="name">USB Keyboard, AZERTY</field>
+        <record id="mrp_bom_line_8" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_9"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">4</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_11"/>
+            <field name="bom_id" ref="mrp_bom_5"/>
         </record>
 
-        <record id="mrp_bom_14" model="mrp.bom">
-            <field name="name">Mouse, Laser</field>
+        <record id="mrp_bom_line_9" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_11"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">6</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_11"/>
+            <field name="bom_id" ref="mrp_bom_5"/>
         </record>
 
-        <record id="mrp_bom_15" model="mrp.bom">
+        <record id="mrp_bom_6" model="mrp.bom">
             <field name="name">Computer Case-1</field>
-            <field name="product_id" ref="product.product_product_16"/>
-            <field name="product_qty">1</field>
+            <field name="product_tmpl_id" ref="product.product_product_16_product_template"/>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">5</field>            
             <field name="type">normal</field>
         </record>
 
-        <record id="mrp_bom_16" model="mrp.bom">
-            <field name="name">Processesor AMD 8-Core</field>
+        <record id="mrp_bom_line_10" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_23"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">4</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_15"/>
+            <field name="bom_id" ref="mrp_bom_6"/>
         </record>
 
-        <record id="mrp_bom_17" model="mrp.bom">
-            <field name="name">Motherboard I9P57</field>
+        <record id="mrp_bom_line_11" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_20"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">6</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_15"/>
+            <field name="bom_id" ref="mrp_bom_6"/>
         </record>
 
-        <record id="mrp_bom_18" model="mrp.bom">
-            <field name="name">HDD 320GB</field>
+        <record id="mrp_bom_line_12" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_17"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">8</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_15"/>
+            <field name="bom_id" ref="mrp_bom_6"/>
         </record>
 
-        <record id="mrp_bom_19" model="mrp.bom">
+        <record id="mrp_bom_7" model="mrp.bom">
             <field name="name">Computer Case-2</field>
-            <field name="product_id" ref="product.product_product_16"/>
-            <field name="product_qty">1</field>
+            <field name="product_tmpl_id" ref="product.product_product_16_product_template"/>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">10</field>            
             <field name="type">normal</field>
         </record>
 
-        <record id="mrp_bom_20" model="mrp.bom">
-            <field name="name">Processor Core i5 2.70 Ghz</field>
+        <record id="mrp_bom_line_13" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_22"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">2</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_19"/>
+            <field name="bom_id" ref="mrp_bom_7"/>
         </record>
 
-        <record id="mrp_bom_21" model="mrp.bom">
-            <field name="name">Motherboard A20Z7</field>
+        <record id="mrp_bom_line_14" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_21"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">4</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_19"/>
+            <field name="bom_id" ref="mrp_bom_7"/>
         </record>
 
-        <record id="mrp_bom_22" model="mrp.bom">
-            <field name="name">HDD 500GB</field>
+        <record id="mrp_bom_line_15" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_18"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">6</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_19"/>
+            <field name="bom_id" ref="mrp_bom_7"/>
         </record>
 
-        <record id="mrp_bom_23" model="mrp.bom">
-            <field name="name">Graphics Card</field>
+        <record id="mrp_bom_line_16" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_24"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">10</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_19"/>
+            <field name="bom_id" ref="mrp_bom_7"/>
         </record>
 
-        <record id="mrp_bom_24" model="mrp.bom">
+        <record id="mrp_bom_8" model="mrp.bom">
             <field name="name">PC Assemble + 2GB RAM</field>
-            <field name="product_id" ref="product.product_product_4"/>
-            <field name="product_qty">1</field>
+            <field name="product_tmpl_id" ref="product.product_product_4_product_template"/>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">5</field>            
             <field name="type">phantom</field>
         </record>
 
-        <record id="mrp_bom_25" model="mrp.bom">
-            <field name="name">15" LCD Monitor </field>
+        <record id="mrp_bom_line_17" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_6"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">2</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_24"/>
+            <field name="bom_id" ref="mrp_bom_8"/>
         </record>
 
-        <record id="mrp_bom_26" model="mrp.bom">
-            <field name="name">Computer Case-1</field>
+        <record id="mrp_bom_line_18" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_16"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">4</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_24"/>
+            <field name="bom_id" ref="mrp_bom_8"/>
         </record>
 
-        <record id="mrp_bom_27" model="mrp.bom">
-            <field name="name">Mouse, Laser</field>
+        <record id="mrp_bom_line_19" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_11"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">6</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_24"/>
+            <field name="bom_id" ref="mrp_bom_8"/>
         </record>
 
-        <record id="mrp_bom_28" model="mrp.bom">
-            <field name="name">USB Keyboard, QWERTY</field>
+        <record id="mrp_bom_line_20" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_8"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">8</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_24"/>
+            <field name="bom_id" ref="mrp_bom_8"/>
         </record>
 
-        <record id="mrp_bom_29" model="mrp.bom">
-            <field name="name">RAM DDR2 1GB</field>
+        <record id="mrp_bom_line_21" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_15"/>
             <field name="product_qty">2</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">10</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_24"/>
+            <field name="bom_id" ref="mrp_bom_8"/>
         </record>
 
-        <record id="mrp_bom_30" model="mrp.bom">
+        <record id="mrp_bom_9" model="mrp.bom">
             <field name="name">PC Assemble + 512MB RAM</field>
-            <field name="product_id" ref="product.product_product_3"/>
-            <field name="product_qty">1</field>
+            <field name="product_tmpl_id" ref="product.product_product_3_product_template"/>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">5</field>            
             <field name="routing_id" ref="mrp_routing_2"/>
             <field name="type">phantom</field>
         </record>
 
-        <record id="mrp_bom_31" model="mrp.bom">
-            <field name="name">17" LCD Monitor</field>
+        <record id="mrp_bom_line_22" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_7"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">2</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_30"/>
+            <field name="bom_id" ref="mrp_bom_9"/>
         </record>
 
-        <record id="mrp_bom_32" model="mrp.bom">
-            <field name="name">Computer Case-2</field>
+        <record id="mrp_bom_line_23" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_16"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">4</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_30"/>
+            <field name="bom_id" ref="mrp_bom_9"/>
         </record>
 
-        <record id="mrp_bom_33" model="mrp.bom">
-            <field name="name">Mouse, Laser</field>
+        <record id="mrp_bom_line_24" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_11"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">6</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_30"/>
+            <field name="bom_id" ref="mrp_bom_9"/>
         </record>
 
-        <record id="mrp_bom_34" model="mrp.bom">
-            <field name="name">USB Keyboard, QWERTY</field>
+        <record id="mrp_bom_line_25" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_8"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">8</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_30"/>
+            <field name="bom_id" ref="mrp_bom_9"/>
         </record>
 
-        <record id="mrp_bom_35" model="mrp.bom">
-            <field name="name">RAM DDR 512MB</field>
+        <record id="mrp_bom_line_26" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_13"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">10</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_30"/>
+            <field name="bom_id" ref="mrp_bom_9"/>
         </record>
 
-        <record id="mrp_bom_36" model="mrp.bom">
+        <record id="mrp_bom_10" model="mrp.bom">
             <field name="name">PC Assemble + Custom RAM (PC on Demand)</field>
-            <field name="product_id" ref="product.product_product_5"/>
-            <field name="product_qty">1</field>
+            <field name="product_tmpl_id" ref="product.product_product_5_product_template"/>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">5</field>            
             <field name="routing_id" ref="mrp_routing_2"/>
             <field name="type">phantom</field>
         </record>
 
-        <record id="mrp_bom_37" model="mrp.bom">
-            <field name="name">15" LCD Monitor </field>
+        <record id="mrp_bom_line_27" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_6"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">2</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_36"/>
+            <field name="bom_id" ref="mrp_bom_10"/>
         </record>
 
-        <record id="mrp_bom_38" model="mrp.bom">
-            <field name="name">Computer Case-1</field>
+        <record id="mrp_bom_line_28" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_16"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">4</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_36"/>
+            <field name="bom_id" ref="mrp_bom_10"/>
         </record>
 
-        <record id="mrp_bom_39" model="mrp.bom">
-            <field name="name">RAM DDR 512MB</field>
+        <record id="mrp_bom_line_29" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_13"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">6</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_36"/>
+            <field name="bom_id" ref="mrp_bom_10"/>
         </record>
 
-        <record id="mrp_bom_40" model="mrp.bom">
-            <field name="name">Mouse, Laser</field>
+        <record id="mrp_bom_line_30" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_11"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">8</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_36"/>
+            <field name="bom_id" ref="mrp_bom_10"/>
         </record>
 
-        <record id="mrp_bom_41" model="mrp.bom">
-            <field name="name">USB Keyboard, QWERTY</field>
+        <record id="mrp_bom_line_31" model="mrp.bom.line">
             <field name="product_id" ref="product.product_product_8"/>
             <field name="product_qty">1</field>
             <field name="product_uom" ref="product.product_uom_unit"/>
             <field name="sequence">10</field>            
             <field name="type">normal</field>
-            <field name="bom_id" ref="mrp_bom_36"/>
+            <field name="bom_id" ref="mrp_bom_10"/>
         </record>
 
     <record id="mrp_production_1" model="mrp.production">
         <field name="product_qty">3</field>
         <field name="location_src_id" ref="stock.stock_location_stock"/>
         <field name="location_dest_id" ref="stock.stock_location_output"/>
-        <field name="bom_id" ref="mrp_bom_24"/>
+        <field name="bom_id" ref="mrp_bom_8"/>
         <field name="routing_id" ref="mrp.mrp_routing_2"/>
     </record>
 
         <field name="product_uom" ref="product.product_uom_unit"/>
         <field name="location_src_id" ref="stock.stock_location_stock"/>
         <field name="location_dest_id" ref="stock.stock_location_output"/>
-        <field name="bom_id" ref="mrp.mrp_bom_7"/>
+        <field name="bom_id" ref="mrp.mrp_bom_4"/>
         <field name="routing_id" ref="mrp.mrp_routing_1"/>
     </record>
     <workflow action="button_confirm" model="mrp.production" ref="mrp_production_1"/>
index aaffc6f..6da46f1 100644 (file)
                 <form string="Bill of Material" version="7.0">
                     <group>
                         <group>
-                            <field name="product_id" on_change="onchange_product_id(product_id, name, product_qty, context)" class="oe_inline"/>
+                            <field name="product_tmpl_id" on_change="onchange_product_tmpl_id(product_tmpl_id, product_qty, context)"/>
+                            <field name="product_id"/>
+                            <field name="product_uom" class="oe_inline" on_change="onchange_uom(product_tmpl_id, product_uom)" groups="product.group_uom"/>
                             <label for="product_qty" string="Quantity"/>
                             <div>
-                                <field name="product_qty" class="oe_inline" on_change="onchange_product_id(product_id, name, product_qty, context)"/>
-                                <field name="product_uom" class="oe_inline" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
-                            </div>
-                            <label for="product_uos_qty" groups="product.group_uos"/>
-                            <div groups="product.group_uos" >
-                                <field name="product_uos_qty"
-                                    class="oe_inline"/>
-                                <label string="-" attrs="{'invisible':[('product_uos','=',False)]}" class="oe_inline"/>
-                                <field name="product_uos" class="oe_inline"/>
+                                <field name="product_qty" class="oe_inline" on_change="onchange_product_tmpl_id(product_tmpl_id, product_qty, context)"/>
+                                <field name="product_uom" class="oe_inline" on_change="onchange_uom(product_tmpl_id, product_uom)" groups="product.group_uom"/>
                             </div>
                             <label for="routing_id" class="oe_inline" groups="mrp.group_mrp_routings"/>
                             <div groups="mrp.group_mrp_routings">
-                               <field name="routing_id" class="oe_inline"/>
+                                <field name="routing_id" class="oe_inline"/>
                             </div>
                         </group>
                         <group>
                     </group>
                     <notebook>
                         <page string="Components">
-                            <field name="bom_lines" widget="one2many_list">
+                            <field name="bom_line_ids" widget="one2many_list">
                                 <tree string="Components" editable="bottom">
-                                    <field name="product_id" on_change="onchange_product_id(product_id, name)"/>
+                                    <field name="sequence" widget="handle"/>
+                                    <field name="product_id" on_change="onchange_product_id(product_id, product_qty)"/>
+                                    <field name="type"/>
                                     <field name="product_qty"/>
+                                    <field name="product_rounding"/>
+                                    <field name="product_efficiency"/>
                                     <field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
-                                    <field name="name" invisible="1"/>
                                     <field name="date_start"/>
                                     <field name="date_stop"/>
+                                    <field name="routing_id"/>
+                                    <field name="variants_ids" widget="many2many_tags"/>
                                 </tree>
                             </field>
                         </page>
                             <group>
                                 <group>
                                     <field name="position"/>
-                                    <field name="bom_id"/>
                                     <field name="sequence"/>
                                     <field name="active"/>
                                 </group>
             <field name="arch" type="xml">
                 <search string="Search Bill Of Material">
                     <field name="name" string="Bill Of Material" filter_domain="['|',('name','ilike',self),('code','ilike',self)]"/>
-                    <field name="bom_lines" string="Components"/>
-                    <field name="product_id"/>
+                    <field name="bom_line_ids" string="Components"/>
+                    <field name="product_tmpl_id"/>
                     <field name="company_id" groups="base.group_multi_company"/>
                     <group expand="0" string="Group By...">
-                        <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
+                        <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_tmpl_id'}"/>
                         <filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}"/>
                         <filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
                         <filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}"/>
        <record id="mrp_bom_tree_view" model="ir.ui.view">
             <field name="name">mrp.bom.tree</field>
             <field name="model">mrp.bom</field>
-            <field name="field_parent">child_complete_ids</field>
+            <!--field name="field_parent">child_complete_ids</field-->
             <field name="arch" type="xml">
                 <tree string="Bill of Materials">
                     <field name="sequence" invisible="1"/>
                     <field name="name" invisible="1"/>
+                    <field name="product_tmpl_id"/>
                     <field name="product_id"/>
-                    <field name="product_qty"/>
                     <field name="product_uom" groups="product.group_uom"/>
                     <field name="code"/>
                     <field name="type"/>
                 </tree>
             </field>
         </record>
-       <record id="mrp_bom_component_tree_view" model="ir.ui.view">
-            <field name="name">mrp.bom.component.tree</field>
-            <field name="model">mrp.bom</field>
-            <field name="field_parent">child_complete_ids</field>
-            <field name="arch" type="xml">
-                <tree string="BoM Structure">
-                    <field name="sequence" invisible="1"/>
-                    <field name="name" groups="base.group_no_one"/>
-                    <field name="code"/>
-                    <field name="product_id"/>
-                    <field name="bom_id" groups="product.group_mrp_properties"/>
-                    <field name="product_qty"/>
-                    <field name="product_uom" groups="product.group_uom"/>
-                    <field name="type"/>
-                    <field name="routing_id" groups="mrp.group_mrp_routings"/>
-                    <field name="date_start" groups="product.group_mrp_properties"/>
-                    <field name="date_stop" groups="product.group_mrp_properties"/>
-                </tree>
-            </field>
-        </record>
+
         <record id="mrp_bom_form_action" model="ir.actions.act_window">
             <field name="name">Bill of Materials</field>
             <field name="type">ir.actions.act_window</field>
             <field name="res_model">mrp.bom</field>
             <field name="view_type">form</field>
-            <field name="domain">[('bom_id','=',False)]</field>
             <field name="search_view_id" ref="view_mrp_bom_filter"/>
             <field name="help" type="html">
               <p class="oe_view_nocontent_create">
               </p>
             </field>
         </record>
+
+       <record id="mrp_bom_component_tree_view" model="ir.ui.view">
+            <field name="name">mrp.bom.component.tree</field>
+            <field name="model">mrp.bom.line</field>
+            <field name="arch" type="xml">
+                <tree string="Components" editable="top">
+                    <field name="sequence" widget="handle"/>
+                    <field name="bom_id"/>
+                    <field name="product_id" on_change="onchange_product_id(product_id)"/>
+                    <field name="type"/>
+                    <field name="product_qty"/>
+                    <field name="product_rounding"/>
+                    <field name="product_efficiency"/>
+                    <field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
+                    <field name="product_uos_qty" groups="product.group_uos"/>
+                    <field name="product_uos" groups="product.group_uos"/>
+                    <field name="date_start"/>
+                    <field name="date_stop"/>
+                    <field name="routing_id"/>
+                    <field name="variants_ids" widget="many2many_tags"/>
+                    <field name="property_ids" widget="many2many_tags"/>
+                </tree>
+            </field>
+        </record>
+
+        <record id="view_mrp_bom_line_filter" model="ir.ui.view">
+            <field name="name">mrp.bom.line.select</field>
+            <field name="model">mrp.bom.line</field>
+            <field name="arch" type="xml">
+                <search string="Search Bill Of Material Components">
+                    <field name="bom_id"/>
+                    <field name="product_id"/>
+                    <group expand="0" string="Group By...">
+                        <filter string="Bill Of Material" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'bom_id'}"/>
+                        <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
+                        <filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'product_uom'}"/>
+                        <filter string="Routing" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'routing_id'}"/>
+                        <filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}"/>
+                        <filter string=" Valid From Month" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}" help="Valid From Date by Month"/>
+                   </group>
+                </search>
+            </field>
+        </record>
+
         <record id="mrp_bom_form_action2" model="ir.actions.act_window">
             <field name="name">Bill of Material Components</field>
             <field name="type">ir.actions.act_window</field>
-            <field name="res_model">mrp.bom</field>
-            <field name="view_type">form</field>
-            <field name="view_id" ref="mrp_bom_component_tree_view"/>
-            <field name="domain">[]</field>
+            <field name="res_model">mrp.bom.line</field>
+            <field name="view_type">tree</field>
+            <field name="view_mode">tree</field>
             <field name="help" type="html">
               <p class="oe_view_nocontent_create">
                 Click to add a component to a bill of material.
               </p>
             </field>
         </record>
-        <record id="product_search_form_view_procurment" model="ir.ui.view">
-             <field name="name">product.search.bom</field>
-             <field name="model">product.product</field>
-             <field name="inherit_id" ref="product.product_search_form_view"/>
+
+        <record id="product_template_search_view_procurment" model="ir.ui.view">
+             <field name="name">product.template.search.bom</field>
+             <field name="model">product.template</field>
+             <field name="inherit_id" ref="product.product_template_search_view"/>
              <field name="arch" type="xml">
                  <xpath expr="//filter[@string='Consumable']" position="after">
                      <separator/>
-                    <filter string="Components" name="components" icon="terp-accessories-archiver" domain="[('bom_ids','not in',[]),('bom_ids.bom_id','!=',False)]"/>
+                    <filter string="Components" name="components" icon="terp-accessories-archiver" domain="[('bom_ids','not in',[])]"/>
                  </xpath>
              </field>
         </record>
         
         <record id="product_template_form_view_inherit" model="ir.ui.view">
-             <field name="name">product.template.form.view.inherited</field>
+             <field name="name">product.product.form.view.inherited</field>
              <field name="model">product.product</field>
-             <field name="inherit_id" ref="product.product_template_form_view"/>
+             <field name="inherit_id" ref="product.product_normal_form_view"/>
              <field name="arch" type="xml">
-                  <xpath expr="//field[@name='warranty']" position="before">
-                    <label for="produce_delay"/>
-                    <div>
+                <group name="sale_condition" position="inside">
+                    <label for="produce_delay" attrs="{'invisible':[('type','=','service')]}"/>
+                    <div attrs="{'invisible':[('type','=','service')]}">
                         <field name="produce_delay" class="oe_inline"/> days
                     </div>
-                </xpath>
+                </group>
              </field>
         </record>
-        
-        <record id="view_normal_procurement_locations_form_inherited" model="ir.ui.view">
-            <field name="name">product.normal.procurement.locations.inherited</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
-            <field name="arch" type="xml">
-                <xpath expr="//group[@name='procurement_uom']" position="after">
-                    <group name="delay" string="Delays" attrs="{'invisible':[('type','=','service')]}">
-                        <label for="produce_delay" />
-                        <div attrs="{'invisible':[('type','=','service')]}">
-                            <field name="produce_delay" class="oe_inline" style="vertical-align:baseline"/> days
-                        </div>                        
-                    </group>                
-                </xpath>
-            </field>
-        </record>
 
         <record id="view_mrp_product_form_inherited" model="ir.ui.view">
             <field name="name">product.form.mrp.inherited</field>
                     </div>
                     <group>
                         <group>
-                            <field name="product_id" on_change="product_id_change(product_id, product_qty)" domain="[('bom_ids','!=',False),('bom_ids.bom_id','=',False),('bom_ids.type','!=','phantom')]" class="oe_inline" context='{"default_type": "product"}'/>
+                            <field name="product_id" on_change="product_id_change(product_id, product_qty)" domain="[('bom_ids','!=',False),('bom_ids.type','!=','phantom')]" class="oe_inline" context='{"default_type": "product"}'/>
                             <label for="product_qty"/>
                             <div>
                                 <field name="product_qty" class="oe_inline" on_change="product_id_change(product_id, product_qty)"/>
             <field name="arch" type="xml">
             <data>
                 <xpath expr="//field[@name='origin']" position="before">
-                    <field name="bom_id" domain="[('product_id','=',product_id),('bom_id','=',False)]"/>
+                    <field name="bom_id" domain="[('product_id','=',product_id)]"/>
                     <field name="production_id" attrs="{'invisible': [('production_id','=',False)]}"/>
                 </xpath>
                 <xpath expr="//field[@name='origin']" position="after">
             </field>
         </record>
 
-
         <!-- Menu for Resource for MRP-->
 
         <record id="mrp_workcenter_action" model="ir.actions.act_window">
 
         <record id="act_product_mrp_bom_open" model="ir.actions.act_window">
             <field name="name">BoM Structure</field>
-            <field name="context">{'default_product_id': active_id}</field>
-            <field name="domain">[('product_id', 'in', active_ids),('bom_id','=',False)]</field>
+            <field name="context">{'default_product_tmpl_id': active_id}</field>
+            <field name="domain">[('product_tmpl_id', 'in', active_ids)]</field>
             <field name="res_model">mrp.bom</field>
         </record>
         <record model="ir.actions.act_window" id="product_open_bom">
-            <field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
+            <field name="context">{'default_product_tmpl_id': active_id, 'search_default_product_tmpl_id': active_id}</field>
             <field name="name">Bill of Materials</field>
-            <field name="domain">[('bom_id','=',False)]</field>
             <field name="res_model">mrp.bom</field>
             <field name="view_type">form</field>
         </record>
             <field name="res_model">mrp.production</field>
             <field name="view_id" ref="mrp_production_tree_view"/>
         </record>
-        <record model="ir.ui.view" id="product_form_view_bom_button">
-            <field name="name">product.product.procurement</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
+        <record model="ir.ui.view" id="product_template_form_view_bom_button">
+            <field name="name">product.template.procurement</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
-                <xpath expr="//div[@name='buttons']" position="inside">
+                <div name="buttons" position="inside">
                     <button class="oe_inline oe_stat_button" name="%(product_open_bom)d" type="action" 
                         groups="mrp.group_mrp_user" attrs="{'invisible':[('type', '=', 'service')]}" icon="fa-flask">
                         <field string="Bill of Materials" name="bom_count" widget="statinfo" />
                         groups="mrp.group_mrp_user" attrs="{'invisible':[('type', '=', 'service')]}" icon="fa-list-alt">
                         <field string="Manufacturing" name="mo_count" widget="statinfo" />
                     </button>
-                </xpath>
+                </div>
             </field>
         </record>
         
index c9910f8..50650b7 100644 (file)
@@ -62,7 +62,8 @@ class procurement_order(osv.osv):
         """
         for procurement in self.browse(cr, uid, ids, context=context):
             properties = [x.id for x in procurement.property_ids]
-            bom_id = self.pool.get('mrp.bom')._bom_find(cr, uid, procurement.product_id.id, procurement.product_uom.id, properties)
+            bom_id = self.pool.get('mrp.bom')._bom_find(cr, uid, procurement.product_uom.id,
+                product_id=procurement.product_id.id, properties=properties)
             if not bom_id:
                 return False
         return True
@@ -83,7 +84,8 @@ class procurement_order(osv.osv):
                     routing_id = procurement.bom_id.routing_id.id
                 else:
                     properties = [x.id for x in procurement.property_ids]
-                    bom_id = bom_obj._bom_find(cr, uid, procurement.product_id.id, procurement.product_uom.id, properties)
+                    bom_id = bom_obj._bom_find(cr, uid, procurement.product_uom.id,
+                        product_id=procurement.product_id.id, properties=properties)
                     bom = bom_obj.browse(cr, uid, bom_id, context=context)
                     routing_id = bom.routing_id.id
 
index c6b2376..90a02cc 100644 (file)
 ##############################################################################
 
 from openerp.osv import fields, osv
-from openerp.tools.translate import _
 
 
+class product_template(osv.osv):
+    _inherit = "product.template"
+    def _bom_orders_count(self, cr, uid, ids, field_name, arg, context=None):
+        Bom = self.pool('mrp.bom')
+        res = {}
+        for product_tmpl_id in ids:
+            nb = Bom.search_count(cr, uid, [('product_tmpl_id', '=', product_tmpl_id)], context=context)
+            res[product_tmpl_id] = {
+                'bom_count': nb,
+                'bom_strct': nb,
+            }
+        return res
+
+    def _bom_orders_count_mo(self, cr, uid, ids, name, arg, context=None):
+        res = {}
+        for product_tmpl_id in self.browse(cr, uid, ids):
+            res[product_tmpl_id.id] = sum([p.mo_count for p in product_tmpl_id.product_variant_ids])
+        return res
+
+    _columns = {
+        "bom_ids": fields.one2many('mrp.bom', 'product_tmpl_id','Bill of Materials'),
+        'bom_count': fields.function(_bom_orders_count, string='# Bill of Material', type='integer', multi="_bom_order_count"),
+        'bom_strct': fields.function(_bom_orders_count, string='# Bill of Material Structure', type='integer', multi="_bom_order_count"),
+        'mo_count': fields.function(_bom_orders_count_mo, string='# Manufacturing Orders', type='integer'),
+    }
+    def copy(self, cr, uid, id, default=None, context=None):
+        if not default:
+            default = {}
+        default.update({
+            'bom_ids': []
+        })
+        return super(product_template, self).copy(cr, uid, id, default, context=context)
+
 class product_product(osv.osv):
-    _inherit = "product.product"    
+    _inherit = "product.product"
+    def _bom_orders_count(self, cr, uid, ids, field_name, arg, context=None):
+        Production = self.pool('mrp.production')
+        res = {}
+        for product_id in ids:
+            res[product_id] = Production.search_count(cr,uid, [('product_id', '=', product_id)], context=context)
+        return res
+
     _columns = {
-        "bom_ids": fields.one2many('mrp.bom', 'product_id','Bill of Materials', domain=[('bom_id','=',False)]),
         "produce_delay": fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. In the case of multi-level BOM, the manufacturing lead times of the components will be added."),
         'track_production': fields.boolean('Track Manufacturing Lots', help="Forces to specify a Serial Number for all moves containing this product and generated by a Manufacturing Order"),
+        'mo_count': fields.function(_bom_orders_count, string='# Manufacturing Orders', type='integer'),
     }
     
     _defaults = {
         "produce_delay": 1,
     }
-    def copy(self, cr, uid, id, default=None, context=None):
-        if not default:
-            default = {}
-        default.update({
-            'bom_ids': []
-        })
-        return super(product_product, self).copy(cr, uid, id, default, context=context)
 
 
 
index 388d737..70baf1b 100644 (file)
@@ -144,7 +144,7 @@ class report_custom(report_rml):
 
         for product in product_pool.browse(cr, uid, ids, context=context):
             product_uom_name = to_xml(product.uom_id.name)
-            bom_id = bom_pool._bom_find(cr, uid, product.id, product.uom_id.id)
+            bom_id = bom_pool._bom_find(cr, uid, product.uom_id.id, product_id=product.id)
             title = "<title>%s</title>" %(_("Cost Structure"))
             title += "<title>%s</title>" % (to_xml(product.name))
             xml += "<lines style='header'>" + title + prod_header + "</lines>"
@@ -168,7 +168,7 @@ class report_custom(report_rml):
             else:
                 bom = bom_pool.browse(cr, uid, bom_id, context=context)
                 factor = number * product.uom_id.factor / bom.product_uom.factor
-                sub_boms = bom_pool._bom_explode(cr, uid, bom, factor / bom.product_qty)
+                sub_boms = bom_pool._bom_explode(cr, uid, bom, product, factor / bom.product_qty)
                 total = 0
                 total_strd = 0
                 parent_bom = {
index da7ba42..61f62fd 100644 (file)
@@ -4,6 +4,7 @@ access_mrp_workcenter,mrp.workcenter,model_mrp_workcenter,mrp.group_mrp_user,1,0
 access_mrp_routing,mrp.routing,model_mrp_routing,mrp.group_mrp_user,1,0,0,0
 access_mrp_routing_workcenter,mrp.routing.workcenter,model_mrp_routing_workcenter,mrp.group_mrp_user,1,0,0,0
 access_mrp_bom,mrp.bom,model_mrp_bom,group_mrp_user,1,0,0,0
+access_mrp_bom_line,mrp.bom.line,model_mrp_bom_line,group_mrp_user,1,0,0,0
 access_mrp_production,mrp.production user,model_mrp_production,mrp.group_mrp_user,1,1,1,1
 access_mrp_production_salesman,mrp.production salesman,model_mrp_production,base.group_sale_salesman,1,1,1,0
 access_mrp_production_product_line_salesman,mrp.production.product.line salesman,model_mrp_production_product_line,base.group_sale_salesman,1,0,1,0
@@ -14,6 +15,7 @@ access_mrp_workcenter_manager,mrp.workcenter.manager,model_mrp_workcenter,mrp.gr
 access_mrp_routing_manager,mrp.routing.manager,model_mrp_routing,mrp.group_mrp_manager,1,1,1,1
 access_mrp_routing_workcenter_manager,mrp.routing.workcenter.manager,model_mrp_routing_workcenter,mrp.group_mrp_manager,1,1,1,1
 access_mrp_bom_manager,mrp.bom.manager,model_mrp_bom,mrp.group_mrp_manager,1,1,1,1
+access_mrp_bom_line_manager,mrp.bom.line.manager,model_mrp_bom_line,mrp.group_mrp_manager,1,1,1,1
 access_stock_location_mrp_worker,stock.location mrp_worker,stock.model_stock_location,mrp.group_mrp_user,1,0,0,0
 access_stock_move_mrp_worker,stock.move mrp_worker,stock.model_stock_move,mrp.group_mrp_user,1,1,1,0
 access_stock_picking_mrp_worker,stock.picking mrp_worker,stock.model_stock_picking,mrp.group_mrp_user,1,1,1,1
@@ -55,6 +57,8 @@ access_report_mrp_inout_user,report.mrp.inout user,model_report_mrp_inout,mrp.gr
 access_report_workcenter_load_user,report.workcenter.load.user,model_report_workcenter_load,mrp.group_mrp_user,1,0,0,0
 access_mrp_bom_salesman,mrp.bom,model_mrp_bom,base.group_sale_salesman,1,0,0,0
 access_mrp_bom_stockuser,mrp.bom,model_mrp_bom,stock.group_stock_user,1,0,0,0
+access_mrp_bom_line_salesman,mrp.bom.line,model_mrp_bom_line,base.group_sale_salesman,1,0,0,0
+access_mrp_bom_line_stockuser,mrp.bom.line,model_mrp_bom_line,stock.group_stock_user,1,0,0,0
 access_product_uom_categ_mrp_manager,product.uom.categ mrp_manager,product.model_product_uom_categ,mrp.group_mrp_manager,1,1,1,1
 access_product_uom_mrp_manager,product.uom mrp_manager,product.model_product_uom,mrp.group_mrp_manager,1,1,1,1
 access_product_ul_mrp_manager,product.ul mrp_manager,product.model_product_ul,mrp.group_mrp_manager,1,1,1,1
index e77b811..1ff7e7e 100644 (file)
@@ -55,13 +55,14 @@ class StockMove(osv.osv):
         user_company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
         #doing the search as SUPERUSER because a user with the permission to write on a stock move should be able to explode it
         #without giving him the right to read the boms.
-        return self.pool.get('mrp.bom').search(cr, SUPERUSER_ID, [
-            ('product_id', '=', move.product_id.id),
-            ('bom_id', '=', False),
+        domain = [
+            '|', ('product_id', '=', move.product_id.id),
+            '&', ('product_id', '=', False), ('product_tmpl_id.product_variant_ids', '=', move.product_id.id),
             ('type', '=', 'phantom'),
             '|', ('date_start', '=', False), ('date_start', '<=', time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)),
             '|', ('date_stop', '=', False), ('date_stop', '>=', time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)),
-            ('company_id', '=', user_company)], context=context)
+            ('company_id', '=', user_company)]
+        return self.pool.get('mrp.bom').search(cr, SUPERUSER_ID, domain, context=context)
 
     def _action_explode(self, cr, uid, move, context=None):
         """ Explodes pickings.
@@ -76,7 +77,7 @@ class StockMove(osv.osv):
         if bis:
             factor = move.product_qty
             bom_point = bom_obj.browse(cr, SUPERUSER_ID, bis[0], context=context)
-            res = bom_obj._bom_explode(cr, SUPERUSER_ID, bom_point, factor, [])
+            res = bom_obj._bom_explode(cr, SUPERUSER_ID, bom_point, move.product_id, factor, [])
             state = 'confirmed'
             if move.state == 'assigned':
                 state = 'assigned'
index d06a248..b2b807d 100644 (file)
@@ -4,17 +4,17 @@
   !record {model: mrp.bom, id: mrp_bom_test1}:
     company_id: base.main_company
     name: PC Assemble SC234
+    product_tmpl_id: product.product_product_3_product_template
     product_id: product.product_product_3
+    product_uom: product.product_uom_unit
     product_qty: 1.0
     type: normal
-    bom_lines:
-      - company_id: base.main_company
-        name: On Site Assistance
-        product_id: product.product_product_2
+    bom_line_ids:
+      - product_id: product.product_product_2
+        product_uom: product.product_uom_unit
         product_qty: 1.0
-      - company_id: base.main_company
-        name: GrapWorks Software
-        product_id: product.product_product_44
+      - product_id: product.product_product_44
+        product_uom: product.product_uom_unit
         product_qty: 1.0
 -
   I make the production order using BoM having one service type product and one consumable product.
index 0e49143..d25ef12 100644 (file)
@@ -7,11 +7,11 @@
   I create Production Order of PC Assemble SC349 to produce 5.0 Unit.
 -
   !record {model: mrp.production, id: mrp_production_test1}:
-    product_id: product.product_product_4
+    product_id: product.product_product_3
     product_qty: 5.0
     location_src_id: stock.stock_location_14
     location_dest_id: stock.stock_location_output
-    bom_id: mrp_bom_24
+    bom_id: mrp_bom_9
     routing_id: mrp.mrp_routing_1
     
     
index ae5469d..fe34edf 100644 (file)
                                 </td>
                                 <td><span t-field="o.code"/></td>
                             </tr>
-                            <tr t-foreach="get_children(o.bom_lines)" t-as="l">
+                            <tr t-foreach="get_children(o.bom_line_ids)" t-as="l">
                                 <td>
                                     <span style="color: white;" t-esc="'... '*(l['level'])"/>
-                                    - <span t-esc="l['name']"/>
                                 </td>
                                  <td>
                                         [ <span t-esc="l['pcode']"/> ]
index 0f3d0cb..6b1c9aa 100644 (file)
@@ -78,7 +78,7 @@ class change_production_qty(osv.osv_memory):
                 bom_point = prod.bom_id
                 bom_id = prod.bom_id.id
                 if not bom_point:
-                    bom_id = bom_obj._bom_find(cr, uid, prod.product_id.id, prod.product_uom.id)
+                    bom_id = bom_obj._bom_find(cr, uid, prod.product_uom.id, product_id=prod.product_id.id)
                     if not bom_id:
                         raise osv.except_osv(_('Error!'), _("Cannot find bill of material for this product."))
                     prod_obj.write(cr, uid, [prod.id], {'bom_id': bom_id})
@@ -89,7 +89,7 @@ class change_production_qty(osv.osv_memory):
 
                 factor = prod.product_qty * prod.product_uom.factor / bom_point.product_uom.factor
                 product_details, workcenter_details = \
-                    bom_obj._bom_explode(cr, uid, bom_point, factor / bom_point.product_qty, [])
+                    bom_obj._bom_explode(cr, uid, bom_point, prod.product_id, factor / bom_point.product_qty, [])
                 for r in product_details:
                     if r['product_id'] == move.product_id.id:
                         move_obj.write(cr, uid, [move.id], {'product_uom_qty': r['product_qty']})
index cd6ce88..ac1a114 100644 (file)
@@ -4,7 +4,7 @@
 -
   I add a sub product in Bill of material for product External Hard Disk.
 -
-  !record {model: mrp.bom, id: mrp.mrp_bom_24}:
+  !record {model: mrp.bom, id: mrp.mrp_bom_9}:
     product_id: product.product_product_28
     name: External Hard Disk + Subproduct
     product_uom: product.product_uom_unit
@@ -20,7 +20,7 @@
     product_id: product.product_product_28
     product_qty: 2.0
     product_uom: product.product_uom_unit
-    bom_id: mrp.mrp_bom_24
+    bom_id: mrp.mrp_bom_9
     location_src_id: stock.stock_location_stock
 -
   I compute the data of production order.
index b795983..8e485ef 100644 (file)
@@ -1316,30 +1316,80 @@ class ean_wizard(osv.osv_memory):
             self.pool[m].write(cr,uid,[m_id],{'ean13':ean13})
         return { 'type' : 'ir.actions.act_window_close' }
 
-class product_product(osv.osv):
-    _inherit = 'product.product'
+class pos_category(osv.osv):
+    _name = "pos.category"
+    _description = "Public Category"
+    _order = "sequence, name"
 
+    _constraints = [
+        (osv.osv._check_recursion, 'Error ! You cannot create recursive categories.', ['parent_id'])
+    ]
 
-    #def _get_small_image(self, cr, uid, ids, prop, unknow_none, context=None):
-    #    result = {}
-    #    for obj in self.browse(cr, uid, ids, context=context):
-    #        if not obj.product_image:
-    #            result[obj.id] = False
-    #            continue
+    def name_get(self, cr, uid, ids, context=None):
+        if not len(ids):
+            return []
+        reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
+        res = []
+        for record in reads:
+            name = record['name']
+            if record['parent_id']:
+                name = record['parent_id'][1]+' / '+name
+            res.append((record['id'], name))
+        return res
+
+    def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
+        res = self.name_get(cr, uid, ids, context=context)
+        return dict(res)
+
+    def _get_image(self, cr, uid, ids, name, args, context=None):
+        result = dict.fromkeys(ids, False)
+        for obj in self.browse(cr, uid, ids, context=context):
+            result[obj.id] = tools.image_get_resized_images(obj.image)
+        return result
+    
+    def _set_image(self, cr, uid, id, name, value, args, context=None):
+        return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context)
+
+    _columns = {
+        'name': fields.char('Name', required=True, translate=True),
+        'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
+        'parent_id': fields.many2one('product.public.category','Parent Category', select=True),
+        'child_id': fields.one2many('product.public.category', 'parent_id', string='Children Categories'),
+        'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of product categories."),
+        
+        # NOTE: there is no 'default image', because by default we don't show thumbnails for categories. However if we have a thumbnail
+        # for at least one category, then we display a default image on the other, so that the buttons have consistent styling.
+        # In this case, the default image is set by the js code.
+        # NOTE2: image: all image fields are base64 encoded and PIL-supported
+        'image': fields.binary("Image",
+            help="This field holds the image used as image for the cateogry, limited to 1024x1024px."),
+        'image_medium': fields.function(_get_image, fnct_inv=_set_image,
+            string="Medium-sized image", type="binary", multi="_get_image",
+            store={
+                'product.public.category': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
+            },
+            help="Medium-sized image of the category. It is automatically "\
+                 "resized as a 128x128px image, with aspect ratio preserved. "\
+                 "Use this field in form views or some kanban views."),
+        'image_small': fields.function(_get_image, fnct_inv=_set_image,
+            string="Smal-sized image", type="binary", multi="_get_image",
+            store={
+                'product.public.category': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
+            },
+            help="Small-sized image of the category. It is automatically "\
+                 "resized as a 64x64px image, with aspect ratio preserved. "\
+                 "Use this field anywhere a small image is required."),
+    }
 
-    #        image_stream = io.BytesIO(obj.product_image.decode('base64'))
-    #        img = Image.open(image_stream)
-    #        img.thumbnail((120, 100), Image.ANTIALIAS)
-    #        img_stream = StringIO.StringIO()
-    #        img.save(img_stream, "JPEG")
-    #        result[obj.id] = img_stream.getvalue().encode('base64')
-    #    return result
+class product_template(osv.osv):
+    _inherit = 'product.template'
 
     _columns = {
         'income_pdt': fields.boolean('Point of Sale Cash In', help="Check if, this is a product you can use to put cash into a statement for the point of sale backend."),
         'expense_pdt': fields.boolean('Point of Sale Cash Out', help="Check if, this is a product you can use to take cash from a statement for the point of sale backend, example: money lost, transfer to bank, etc."),
         'available_in_pos': fields.boolean('Available in the Point of Sale', help='Check if you want this product to appear in the Point of Sale'), 
         'to_weight' : fields.boolean('To Weigh', help="Check if the product should be weighted (mainly used with self check-out interface)."),
+        'pos_categ_id': fields.many2one('pos.category','Point of Sale Category', help="Those categories are used to group similar products for point of sale."),
     }
 
     _defaults = {
index a0a68ec..ea6d624 100644 (file)
             <field name="journal_ids" eval="[(6, 0, [ref('account.cash_journal'), ref('account.bank_journal'), ref('account.check_journal')])]" />
         </record>
 
-        <!-- Resource: product.public.category -->
+        <!-- Resource: pos.category -->
 
-        <record id="product.computers" model="product.public.category">
+        <record id="computers" model="pos.category">
+          <field name="name">Computers</field>
           <field name="image" type="base64" file="point_of_sale/static/img/computer.png"/>
         </record>
 
-        <record id="beverage" model="product.public.category">
+        <record id="beverage" model="pos.category">
           <field name="name">Beverages</field>
           <field name="image" type="base64" file="point_of_sale/static/img/beverage-image.jpg"/>
         </record>
 
-        <record id="water" model="product.public.category">
+        <record id="water" model="pos.category">
           <field name="parent_id" ref="beverage"/>
           <field name="name">Water</field>
           <field name="image" type="base64" file="point_of_sale/static/img/water-image.jpg"/>
         </record>
-        <record id="plain_water" model="product.public.category">
+        <record id="plain_water" model="pos.category">
           <field name="parent_id" ref="water"/>
           <field name="name">Plain Water</field>
           <field name="image" type="base64" file="point_of_sale/static/img/plain_water-image.jpg"/>
         </record>
-        <record id="sparkling_water" model="product.public.category">
+        <record id="sparkling_water" model="pos.category">
           <field name="parent_id" ref="water"/>
           <field name="name">Sparkling Water</field>
           <field name="image" type="base64" file="point_of_sale/static/img/sparkling_water-image.jpg"/>
         </record>
-        <record id="soda" model="product.public.category">
+        <record id="soda" model="pos.category">
           <field name="parent_id" ref="beverage"/>
           <field name="name">Soda</field>
           <field name="image" type="base64" file="point_of_sale/static/img/soda-image.jpg"/>
         </record>
-        <record id="coke" model="product.public.category">
+        <record id="coke" model="pos.category">
             <field name="parent_id" ref="soda"/>
             <field name="name">Coke</field>
             <field name="image" type="base64" file="point_of_sale/static/img/coke-image.jpg"/>
         </record>
-        <record id="soda_orange" model="product.public.category">
+        <record id="soda_orange" model="pos.category">
             <field name="parent_id" ref="soda"/>
             <field name="name">Orange</field>
             <field name="image" type="base64" file="point_of_sale/static/img/soda_orange-image.jpg"/>
         </record>
-        <record id="beers" model="product.public.category">
+        <record id="beers" model="pos.category">
           <field name="parent_id" ref="beverage"/>
           <field name="name">Beers</field>
           <field name="image" type="base64" file="point_of_sale/static/img/beers-image.jpg"/>
         </record>
-        <record id="pils" model="product.public.category">
+        <record id="pils" model="pos.category">
             <field name="parent_id" ref="beers"/>
             <field name="name">Pils</field>
             <field name="image" type="base64" file="point_of_sale/static/img/pils-image.jpg"/>
         </record>
-        <record id="fruity_beers" model="product.public.category">
+        <record id="fruity_beers" model="pos.category">
             <field name="parent_id" ref="beers"/>
             <field name="name">Fruity Beers</field>
             <field name="image" type="base64" file="point_of_sale/static/img/fruity_beers-image.jpg"/>
         </record>
-        <record id="special_beers" model="product.public.category">
+        <record id="special_beers" model="pos.category">
             <field name="parent_id" ref="beers"/>
             <field name="name">Special Beers</field>
             <field name="image" type="base64" file="point_of_sale/static/img/special_beers-image.jpg"/>
         </record>
-        <record id="food" model="product.public.category">
+        <record id="food" model="pos.category">
           <field name="name">Food</field>
           <field name="image" type="base64" file="point_of_sale/static/img/food-image.jpg"/>
         </record>
-        <record id="pizza" model="product.public.category">
+        <record id="pizza" model="pos.category">
           <field name="parent_id" ref="food"/>
           <field name="name">Pizza</field>
           <field name="image" type="base64" file="point_of_sale/static/img/pizza-image.jpg"/>
         </record>
-        <record id="ice_cream" model="product.public.category">
+        <record id="ice_cream" model="pos.category">
           <field name="parent_id" ref="food"/>
           <field name="name">Ice Cream</field>
           <field name="image" type="base64" file="point_of_sale/static/img/ice_cream-image.jpg"/>
         </record>
-        <record id="chips" model="product.public.category">
+        <record id="chips" model="pos.category">
           <field name="parent_id" ref="food"/>
           <field name="name">Chips</field>
           <field name="image" type="base64" file="point_of_sale/static/img/chips-image.jpg"/>
         </record>
-        <record id="fruits" model="product.public.category">
+        <record id="fruits" model="pos.category">
           <field name="name">Fresh Fruits</field>
           <field name="image" type="base64" file="point_of_sale/static/img/fruits-image.jpg"/>
         </record>
-        <record id="oranges" model="product.public.category">
+        <record id="oranges" model="pos.category">
           <field name="parent_id" ref="fruits"/>
           <field name="name">Oranges</field>
           <field name="image" type="base64" file="point_of_sale/static/img/oranges-image.jpg"/>
         </record>
-        <record id="pomme" model="product.public.category">
+        <record id="pomme" model="pos.category">
           <field name="parent_id" ref="fruits"/>
           <field name="name">Apples</field>
           <field name="image" type="base64" file="point_of_sale/static/img/pomme-image.jpg"/>
         </record>
-        <record id="autres_agrumes" model="product.public.category">
+        <record id="autres_agrumes" model="pos.category">
           <field name="parent_id" ref="fruits"/>
           <field name="name">Other Citrus</field>
           <field name="image" type="base64" file="point_of_sale/static/img/autres_agrumes-image.jpg"/>
         </record>
-        <record id="poire" model="product.public.category">
+        <record id="poire" model="pos.category">
           <field name="parent_id" ref="fruits"/>
           <field name="name">Pears</field>
           <field name="image" type="base64" file="point_of_sale/static/img/poire-image.jpg"/>
         </record>
-        <record id="rouges_noyau_fruits" model="product.public.category">
+        <record id="rouges_noyau_fruits" model="pos.category">
           <field name="parent_id" ref="fruits"/>
           <field name="name">Berries</field>
           <field name="image" type="base64" file="point_of_sale/static/img/rouges_noyau_fruits-image.jpg"/>
         </record>
-        <record id="raisins" model="product.public.category">
+        <record id="raisins" model="pos.category">
           <field name="parent_id" ref="fruits"/>
           <field name="name">Grapes</field>
           <field name="image" type="base64" file="point_of_sale/static/img/raisins-image.jpg"/>
         </record>
-        <record id="legumes" model="product.public.category">
+        <record id="legumes" model="pos.category">
           <field name="name">Fresh vegetables</field>
           <field name="image" type="base64" file="point_of_sale/static/img/legumes-image.jpg"/>
         </record>
-        <record id="pommes_de_terre" model="product.public.category">
+        <record id="pommes_de_terre" model="pos.category">
           <field name="parent_id" ref="legumes"/>
           <field name="name">Potatoes</field>
           <field name="image" type="base64" file="point_of_sale/static/img/pommes_de_terre-image.jpg"/>
         </record>
-        <record id="legumes_racine" model="product.public.category">
+        <record id="legumes_racine" model="pos.category">
           <field name="parent_id" ref="legumes"/>
           <field name="name">Root vegetables</field>
           <field name="image" type="base64" file="point_of_sale/static/img/legumes_racine-image.jpg"/>
         </record>
-        <record id="tomates" model="product.public.category">
+        <record id="tomates" model="pos.category">
           <field name="parent_id" ref="legumes"/>
           <field name="name">Tomatos</field>
           <field name="image" type="base64" file="point_of_sale/static/img/tomates-image.jpg"/>
         </record>
-        <record id="oignons_ail_echalotes" model="product.public.category">
+        <record id="oignons_ail_echalotes" model="pos.category">
           <field name="parent_id" ref="legumes"/>
           <field name="name">Onions / Garlic / Shallots</field>
           <field name="image" type="base64" file="point_of_sale/static/img/oignons_ail_echalotes-image.jpg"/>
         </record>
-        <record id="autres_legumes_frais" model="product.public.category">
+        <record id="autres_legumes_frais" model="pos.category">
           <field name="parent_id" ref="legumes"/>
           <field name="name">Other fresh vegetables</field>
           <field name="image" type="base64" file="point_of_sale/static/img/autres_legumes_frais-image.jpg"/>
           <field name="name">Boni Oranges</field>
           <field name="to_weight">True</field>
           <field name="ean13">2100002000003</field>
-          <field name="public_categ_id" ref="oranges"/>
+          <field name="pos_categ_id" ref="oranges"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/boni_orange-image.jpg"/>
           <field name="available_in_pos">True</field>
           <field name="list_price">2.83</field>
           <field name="name">Orange Butterfly</field>
-          <field name="public_categ_id" ref="oranges"/>
+          <field name="pos_categ_id" ref="oranges"/>
           <field name="to_weight">True</field>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="name">Lemon</field>
           <field name="ean13">2301000000006</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="autres_agrumes"/>
+          <field name="pos_categ_id" ref="autres_agrumes"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/citron-image.jpg"/>
           <field name="list_price">3.19</field>
           <field name="name">Stringers</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="autres_agrumes"/>
+          <field name="pos_categ_id" ref="autres_agrumes"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/limon-image.jpg"/>
           <field name="list_price">1.98</field>
           <field name="name">Red grapefruit</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="autres_agrumes"/>
+          <field name="pos_categ_id" ref="autres_agrumes"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/pamplemousse_rouge_pamplemousse-image.jpg"/>
           <field name="list_price">2.09</field>
           <field name="name">Granny Smith apples</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="pomme"/>
+          <field name="pos_categ_id" ref="pomme"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/pomme_granny_smith-image.jpg"/>
           <field name="list_price">1.10</field>
           <field name="name">Jonagold apples</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="pomme"/>
+          <field name="pos_categ_id" ref="pomme"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/pomme_jonagold-image.jpg"/>
           <field name="list_price">1.69</field>
           <field name="name">Golden Apples Perlim</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="pomme"/>
+          <field name="pos_categ_id" ref="pomme"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/pomme_golden_perlim-image.jpg"/>
           <field name="list_price">1.70</field>
           <field name="name">Conference pears</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="poire"/>
+          <field name="pos_categ_id" ref="poire"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/poire_conference-image.jpg"/>
           <field name="list_price">5.70</field>
           <field name="name">Peach</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="rouges_noyau_fruits"/>
+          <field name="pos_categ_id" ref="rouges_noyau_fruits"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/nectarine-image.jpg"/>
           <field name="name">Peaches</field>
           <field name="to_weight">True</field>
           <field name="ean13">2300001000008</field>
-          <field name="public_categ_id" ref="rouges_noyau_fruits"/>
+          <field name="pos_categ_id" ref="rouges_noyau_fruits"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/peche-image.jpg"/>
           <field name="list_price">4.80</field>
           <field name="name">Black Grapes</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="raisins"/>
+          <field name="pos_categ_id" ref="raisins"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/raisins_noir-image.jpg"/>
           <field name="list_price">1.39</field>
           <field name="name">Potatoes</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="pommes_de_terre"/>
+          <field name="pos_categ_id" ref="pommes_de_terre"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/pomme_de_terre-image.jpg"/>
           <field name="list_price">2.20</field>
           <field name="name">Extra Flandria chicory</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="legumes_racine"/>
+          <field name="pos_categ_id" ref="legumes_racine"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/chicon_flandria_extra-image.jpg"/>
           <field name="list_price">0.90</field>
           <field name="name">Carrots</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="legumes_racine"/>
+          <field name="pos_categ_id" ref="legumes_racine"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/carotte-image.jpg"/>
           <field name="list_price">2.10</field>
           <field name="name">Fennel</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="legumes_racine"/>
+          <field name="pos_categ_id" ref="legumes_racine"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/fenouil_fenouil-image.jpg"/>
           <field name="list_price">1.90</field>
           <field name="name">In Cluster Tomatoes</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="tomates"/>
+          <field name="pos_categ_id" ref="tomates"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/tomate_en_grappe-image.jpg"/>
           <field name="name">Onions</field>
           <field name="to_weight">True</field>
           <field name="ean13">2100001000004</field>
-          <field name="public_categ_id" ref="oignons_ail_echalotes"/>
+          <field name="pos_categ_id" ref="oignons_ail_echalotes"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/Onions-image.jpg"/>
           <field name="list_price">3.10</field>
           <field name="name">Red Pepper</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="autres_legumes_frais"/>
+          <field name="pos_categ_id" ref="autres_legumes_frais"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/poivron_rouges-image.jpg"/>
           <field name="list_price">3.00</field>
           <field name="name">Green Peppers</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="autres_legumes_frais"/>
+          <field name="pos_categ_id" ref="autres_legumes_frais"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/poivron_verts-image.jpg"/>
           <field name="list_price">2.70</field>
           <field name="name">Yellow Peppers</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="autres_legumes_frais"/>
+          <field name="pos_categ_id" ref="autres_legumes_frais"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/poivron_jaunes-image.jpg"/>
           <field name="list_price">2.29</field>
           <field name="name">Leeks</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="autres_legumes_frais"/>
+          <field name="pos_categ_id" ref="autres_legumes_frais"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/poireaux_poireaux-image.jpg"/>
           <field name="list_price">1.20</field>
           <field name="name">Zucchini</field>
           <field name="to_weight">True</field>
-          <field name="public_categ_id" ref="autres_legumes_frais"/>
+          <field name="pos_categ_id" ref="autres_legumes_frais"/>
           <field name="uom_id" ref="product.product_uom_kgm" />
           <field name="uom_po_id" ref="product.product_uom_kgm" />
           <field name="image" type="base64" file="point_of_sale/static/img/courgette-image.jpg"/>
           <field name="list_price">1.49</field>
           <field name="name">Coca-Cola Regular 1L</field>
           <field name="ean13">5449000054227</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_regular_1l-image.jpg"/>
         </record>
         <record id="coca_regular_2l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.38</field>
           <field name="name">Coca-Cola Regular 2L</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_regular_2l-image.jpg"/>
         </record>
         <record id="coca_regular_50cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.97</field>
           <field name="name">Coca-Cola Regular 50cl</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_regular_50cl-image.jpg"/>
         </record>
         <record id="coca_regular_33cl" model="product.product">
           <field name="list_price">0.51</field>
           <field name="name">Coca-Cola Regular 33cl</field>
           <field name="ean13">5449000000996</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_regular_33cl-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">1.49</field>
           <field name="name">Coca-Cola Light 1L</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_light_1l-image.jpg"/>
         </record>
         <record id="coca_light_2l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.38</field>
           <field name="name">Coca-Cola Light 2L</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_light_2l-image.jpg"/>
         </record>
         <record id="coca_light_50cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.97</field>
           <field name="name">Coca-Cola Light 50cl</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_light_50cl-image.jpg"/>
         </record>
         <record id="coca_light_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.51</field>
           <field name="name">Coca-Cola Light 33cl</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_light_33cl-image.jpg"/>
         </record>
         <record id="coca_light_decaf_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.53</field>
           <field name="name">Coca-Cola Light 33cl Decaf</field> 
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_light_decaf_33cl-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">1.49</field>
           <field name="name">Coca-Cola Zero 1L</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_zero_1l-image.jpg"/>
         </record>
         <record id="coca_zero_2l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.38</field>
           <field name="name">Coca-Cola Zero 2L</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_zero_2l-image.jpg"/>
         </record>
         <record id="coca_zero_50cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.97</field>
           <field name="name">Coca-Cola Zero 50cl</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_zero_50cl-image.jpg"/>
         </record>
         <record id="coca_zero_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.51</field>
           <field name="name">Coca-Cola Zero 33cl</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_zero_33cl-image.jpg"/>
         </record>
         <record id="coca_zero_decaf_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.67</field>
           <field name="name">Coca-Cola Zero Decaf 33cl</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_zero_decaf_33cl-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">2.83</field>
           <field name="name">Coca-Cola Light Lemon 2L</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_light_lemon_2l-image.jpg"/>
         </record>
         <record id="coca_light_lemon_50cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.16</field>
           <field name="name">Coca-Cola Light Lemon 50cl</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_light_lemon_50cl-image.jpg"/>
         </record>
         <record id="coca_light_lemon_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.53</field>
           <field name="name">Coca-Cola Light Lemon 33cl</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/coca_light_lemon_33cl-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">1.70</field>
           <field name="name">Pepsi 2L</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/pepsi_2l-image.jpg"/>
         </record>
         <record id="pepsi_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.43</field>
           <field name="name">Pepsi 33cl</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/pepsi_33cl-image.jpg"/>
         </record>
         <record id="pepsi_max_2l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.71</field>
           <field name="name">Pepsi Max 2L</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/pepsi_max_2l-image.jpg"/>
         </record>
         <record id="pepsi_max_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.40</field>
           <field name="name">Pepsi Max 33cl</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/pepsi_max_33cl-image.jpg"/>
         </record>
         <record id="pepsi_max_50cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.61</field>
           <field name="name">Pepsi Max 50cl</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/pepsi_max_50cl-image.jpg"/>
         </record>
         <record id="pepsi_max_lemon_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.40</field>
           <field name="name">Pepsi Max Cool Lemon 33cl</field>
-          <field name="public_categ_id" ref="coke"/>
+          <field name="pos_categ_id" ref="coke"/>
           <field name="image" type="base64" file="point_of_sale/static/img/pepsi_max_lemon_33cl-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">0.75</field>
           <field name="name">Spa Fruit and Orange 50cl</field>
-          <field name="public_categ_id" ref="soda_orange"/>
+          <field name="pos_categ_id" ref="soda_orange"/>
           <field name="image" type="base64" file="point_of_sale/static/img/spa_et_fruit_50cl-image.jpg"/>
         </record>
         <record id="orangina_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.72</field>
           <field name="name">Orangina 33cl</field>
-          <field name="public_categ_id" ref="soda_orange"/>
+          <field name="pos_categ_id" ref="soda_orange"/>
           <field name="image" type="base64" file="point_of_sale/static/img/orangina_33cl-image.jpg"/>
         </record>
         <record id="orangina_1,5l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.42</field>
           <field name="name">Orangina 1.5L</field>
-          <field name="public_categ_id" ref="soda_orange"/>
+          <field name="pos_categ_id" ref="soda_orange"/>
           <field name="image" type="base64" file="point_of_sale/static/img/orangina_1,5l-image.jpg"/>
         </record>
         <record id="fanta_orange_50cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.98</field>
           <field name="name">Fanta Orange 50cl</field>
-          <field name="public_categ_id" ref="soda_orange"/>
+          <field name="pos_categ_id" ref="soda_orange"/>
           <field name="image" type="base64" file="point_of_sale/static/img/fanta_orange_50cl-image.jpg"/>
         </record>
         <record id="fanta_orange_2l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.28</field>
           <field name="name">Fanta Orange 2L</field>
-          <field name="public_categ_id" ref="soda_orange"/>
+          <field name="pos_categ_id" ref="soda_orange"/>
           <field name="image" type="base64" file="point_of_sale/static/img/fanta_orange_2l-image.jpg"/>
         </record>
         <record id="fanta_orange_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.51</field>
           <field name="name">Fanta Orange 33cl</field>
-          <field name="public_categ_id" ref="soda_orange"/>
+          <field name="pos_categ_id" ref="soda_orange"/>
           <field name="image" type="base64" file="point_of_sale/static/img/fanta_orange_33cl-image.jpg"/>
         </record>
         <record id="fanta_orange_25cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.84</field>
           <field name="name">Fanta Orange 25cl</field>
-          <field name="public_categ_id" ref="soda_orange"/>
+          <field name="pos_categ_id" ref="soda_orange"/>
           <field name="image" type="base64" file="point_of_sale/static/img/fanta_orange_25cl-image.jpg"/>
         </record>
         <record id="fanta_zero_orange_1,5l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.08</field>
           <field name="name">Fanta Orange Zero 1.5L</field>
-          <field name="public_categ_id" ref="soda_orange"/>
+          <field name="pos_categ_id" ref="soda_orange"/>
           <field name="image" type="base64" file="point_of_sale/static/img/fanta_zero_orange_1,5l-image.jpg"/>
         </record>
         <record id="fanta_zero_orange_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.53</field>
           <field name="name">Fanta Zero Orange 33cl</field>
-          <field name="public_categ_id" ref="soda_orange"/>
+          <field name="pos_categ_id" ref="soda_orange"/>
           <field name="image" type="base64" file="point_of_sale/static/img/fanta_zero_orange_33cl-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">0.52</field>
           <field name="name">Evian 50cl</field>
-          <field name="public_categ_id" ref="plain_water"/>
+          <field name="pos_categ_id" ref="plain_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/evian_50cl-image.jpg"/>
         </record>
         <record id="evian_1l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.70</field>
           <field name="name">Evian 1L</field>
-          <field name="public_categ_id" ref="plain_water"/>
+          <field name="pos_categ_id" ref="plain_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/evian_1l-image.jpg"/>
         </record>
         <record id="evian_2l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.26</field>
           <field name="name">2L Evian</field>
-          <field name="public_categ_id" ref="plain_water"/>
+          <field name="pos_categ_id" ref="plain_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/evian_2l-image.jpg"/>
         </record>
         <record id="spa_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.40</field>
           <field name="name">Spa Reine 33cl</field>
-          <field name="public_categ_id" ref="plain_water"/>
+          <field name="pos_categ_id" ref="plain_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/spa_33cl-image.jpg"/>
         </record>
         <record id="spa_50cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.46</field>
           <field name="name">Spa Reine 50cl</field>
-          <field name="public_categ_id" ref="plain_water"/>
+          <field name="pos_categ_id" ref="plain_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/spa_50cl-image.jpg"/>
         </record>
         <record id="spa_1l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.65</field>
           <field name="name">Spa Reine 1L</field>
-          <field name="public_categ_id" ref="plain_water"/>
+          <field name="pos_categ_id" ref="plain_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/spa_1l-image.jpg"/>
         </record>
         <record id="spa_2l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.30</field>
           <field name="name">Spa Reine 2L</field>
-          <field name="public_categ_id" ref="plain_water"/>
+          <field name="pos_categ_id" ref="plain_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/spa_2l-image.jpg"/>
         </record>
         <record id="chaudfontaine_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.34</field>
           <field name="name">Chaudfontaine 33cl</field>
-          <field name="public_categ_id" ref="plain_water"/>
+          <field name="pos_categ_id" ref="plain_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/chaudfontaine_33cl-image.jpg"/>
         </record>
         <record id="chaudfontaine_50cl" model="product.product">
           <field name="list_price">0.44</field>
           <field name="ean13">5449000111715</field>
           <field name="name">Chaudfontaine 50cl</field>
-          <field name="public_categ_id" ref="plain_water"/>
+          <field name="pos_categ_id" ref="plain_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/chaudfontaine_50cl-image.jpg"/>
         </record>
         <record id="chaudfontaine_1,5l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.86</field>
           <field name="name">Chaudfontaine 1.5l</field>
-          <field name="public_categ_id" ref="plain_water"/>
+          <field name="pos_categ_id" ref="plain_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/chaudfontaine_1,5l-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">0.38</field>
           <field name="name">Spa Barisart 33cl</field>
-          <field name="public_categ_id" ref="sparkling_water"/>
+          <field name="pos_categ_id" ref="sparkling_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/spa_gazeuse_33cl-image.jpg"/>
         </record>
         <record id="spa_gazeuse_50cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.49</field>
           <field name="name">Spa Barisart 50cl</field>
-          <field name="public_categ_id" ref="sparkling_water"/>
+          <field name="pos_categ_id" ref="sparkling_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/spa_gazeuse_50cl-image.jpg"/>
         </record>
         <record id="spa_gazeuse_1,5l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.00</field>
           <field name="name">Spa Barisart 1.5l</field>
-          <field name="public_categ_id" ref="sparkling_water"/>
+          <field name="pos_categ_id" ref="sparkling_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/spa_gazeuse_1,5l-image.jpg"/>
         </record>
         <record id="chaudfontaine_petillante_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.41</field>
           <field name="name">Chaudfontaine Petillante 33cl</field>
-          <field name="public_categ_id" ref="sparkling_water"/>
+          <field name="pos_categ_id" ref="sparkling_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/chaudfontaine_petillante_33cl-image.jpg"/>
         </record>
         <record id="chaudfontaine_petillante_50cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.57</field>
           <field name="name">Chaudfontaine Petillante 50cl</field>
-          <field name="public_categ_id" ref="sparkling_water"/>
+          <field name="pos_categ_id" ref="sparkling_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/chaudfontaine_petillante_50cl-image.jpg"/>
         </record>
         <record id="chaudfontaine_petillante_1,5l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.98</field>
           <field name="name">Chaudfontaine Petillante 1.5l</field>
-          <field name="public_categ_id" ref="sparkling_water"/>
+          <field name="pos_categ_id" ref="sparkling_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/chaudfontaine_petillante_1,5l-image.jpg"/>
         </record>
         <record id="perrier_50cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.71</field>
           <field name="name">50cl Perrier</field>
-          <field name="public_categ_id" ref="sparkling_water"/>
+          <field name="pos_categ_id" ref="sparkling_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/perrier_50cl-image.jpg"/>
         </record>
         <record id="perrier_1l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.96</field>
           <field name="name">Perrier 1L</field>
-          <field name="public_categ_id" ref="sparkling_water"/>
+          <field name="pos_categ_id" ref="sparkling_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/perrier_1l-image.jpg"/>
         </record>
         <record id="san_pellegrino_1l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.98</field>
           <field name="name">San Pellegrino 1L</field>
-          <field name="public_categ_id" ref="sparkling_water"/>
+          <field name="pos_categ_id" ref="sparkling_water"/>
           <field name="image" type="base64" file="point_of_sale/static/img/san_pellegrino_1l-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">1.19</field>
           <field name="name">Stella Artois 50cl</field>
-          <field name="public_categ_id" ref="pils"/>
+          <field name="pos_categ_id" ref="pils"/>
           <field name="image" type="base64" file="point_of_sale/static/img/stella_50cl-image.jpg"/>
         </record>
         <record id="stella_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.82</field>
           <field name="name">Stella Artois 33cl</field>
-          <field name="public_categ_id" ref="pils"/>
+          <field name="pos_categ_id" ref="pils"/>
           <field name="image" type="base64" file="point_of_sale/static/img/stella_33cl-image.jpg"/>
         </record>
         <record id="maes_50cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.95</field>
           <field name="name">Maes 50cl</field>
-          <field name="public_categ_id" ref="pils"/>
+          <field name="pos_categ_id" ref="pils"/>
           <field name="image" type="base64" file="point_of_sale/static/img/maes_50cl-image.jpg"/>
         </record>
         <record id="maes_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.77</field>
           <field name="name">Maes 33cl</field>
-          <field name="public_categ_id" ref="pils"/>
+          <field name="pos_categ_id" ref="pils"/>
           <field name="image" type="base64" file="point_of_sale/static/img/maes_33cl-image.jpg"/>
         </record>
         <record id="jupiler_50cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.97</field>
           <field name="name">Jupiler 50cl</field>
-          <field name="public_categ_id" ref="pils"/>
+          <field name="pos_categ_id" ref="pils"/>
           <field name="image" type="base64" file="point_of_sale/static/img/jupiler_50cl-image.jpg"/>
         </record>
         <record id="jupiler_33cl" model="product.product">
           <field name="list_price">0.77</field>
           <field name="ean13">5410228142027</field>
           <field name="name">Jupiler 33cl</field>
-          <field name="public_categ_id" ref="pils"/>
+          <field name="pos_categ_id" ref="pils"/>
           <field name="image" type="base64" file="point_of_sale/static/img/jupiler_33cl-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">2.53</field>
           <field name="name">Boon Framboise 37.5cl</field>
-          <field name="public_categ_id" ref="fruity_beers"/>
+          <field name="pos_categ_id" ref="fruity_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/boon_framboise_37,5cl-image.jpg"/>
         </record>
         <record id="timmermans_geuze_37,5cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.54</field>
           <field name="name">Timmermans Geuze 37.5cl</field>
-          <field name="public_categ_id" ref="fruity_beers"/>
+          <field name="pos_categ_id" ref="fruity_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/timmermans_geuze_37,5cl-image.jpg"/>
         </record>
         <record id="timmermans_kriek_37,5cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.7</field>
           <field name="name">Timmermans Kriek 37.5cl</field>
-          <field name="public_categ_id" ref="fruity_beers"/>
+          <field name="pos_categ_id" ref="fruity_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/timmermans_kriek_37,5cl-image.jpg"/>
         </record>
         <record id="timmermans_faro_37,5cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.56</field>
           <field name="name">Timmermans Faro 37.5cl</field>
-          <field name="public_categ_id" ref="fruity_beers"/>
+          <field name="pos_categ_id" ref="fruity_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/timmermans_faro_37,5cl-image.jpg"/>
         </record>
         <record id="lindemans_pecheresse_37,,5cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.94</field>
           <field name="name">Lindemans sinful 37.5cl</field>
-          <field name="public_categ_id" ref="fruity_beers"/>
+          <field name="pos_categ_id" ref="fruity_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lindemans_pecheresse_37,,5cl-image.jpg"/>
         </record>
         <record id="lindemans_kriek_37,5cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.51</field>
           <field name="name">Lindemans Kriek 37.5cl</field>
-          <field name="public_categ_id" ref="fruity_beers"/>
+          <field name="pos_categ_id" ref="fruity_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lindemans_kriek_37,5cl-image.jpg"/>
         </record>
         <record id="grisette_cerise_25cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.04</field>
           <field name="name">Grisette Cherry 25cl</field>
-          <field name="public_categ_id" ref="fruity_beers"/>
+          <field name="pos_categ_id" ref="fruity_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/grisette_cerise_25cl-image.jpg"/>
         </record>
         <record id="belle_vue_kriek_25cl" model="product.product">
           <field name="list_price">0.83</field>
           <field name="name">Belle-Vue Kriek 25cl</field>
           <field name='ean13'>5410228193449</field>
-          <field name="public_categ_id" ref="fruity_beers"/>
+          <field name="pos_categ_id" ref="fruity_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/belle_vue_kriek_25cl-image.jpg"/>
         </record>
 
           <field name="list_price">1.00</field>
           <field name="name">Leffe Brune 33cl</field>
           <field name='ean13'>5410228142164</field>
-          <field name="public_categ_id" ref="special_beers"/>
+          <field name="pos_categ_id" ref="special_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/leffe_brune_33cl-image.jpg"/>
         </record>
         <record id="leffe_blonde_33cl" model="product.product">
           <field name="list_price">1.00</field>
           <field name="name">Leffe Blonde 33cl</field>
           <field name='ean13'>5410228142218</field>
-          <field name="public_categ_id" ref="special_beers"/>
+          <field name="pos_categ_id" ref="special_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/leffe_blonde_33cl-image.jpg"/>
         </record>
         <record id="leffe_9_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.16</field>
           <field name="name">Leffe Brune "9" 33cl</field>
-          <field name="public_categ_id" ref="special_beers"/>
+          <field name="pos_categ_id" ref="special_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/leffe_9_33cl-image.jpg"/>
         </record>
         <record id="orval_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.59</field>
           <field name="name">Orval 33cl</field>
-          <field name="public_categ_id" ref="special_beers"/>
+          <field name="pos_categ_id" ref="special_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/orval_33cl-image.jpg"/>
         </record>
         <record id="rochefort_8_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.75</field>
           <field name="name">Rochefort "8" 33cl</field>
-          <field name="public_categ_id" ref="special_beers"/>
+          <field name="pos_categ_id" ref="special_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/rochefort_8_33cl-image.jpg"/>
         </record>
         <record id="chimay_bleu_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.46</field>
           <field name="name">Chimay Bleu 33cl</field>
-          <field name="public_categ_id" ref="special_beers"/>
+          <field name="pos_categ_id" ref="special_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/chimay_bleu_33cl-image.jpg"/>
         </record>
         <record id="chimay_bleu_75cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">3.57</field>
           <field name="name">Chimay Bleu 75cl</field>
-          <field name="public_categ_id" ref="special_beers"/>
+          <field name="pos_categ_id" ref="special_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/chimay_bleu_75cl-image.jpg"/>
         </record>
         <record id="chimay_rouge_33cl" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.02</field>
           <field name="name">Chimay Red 33cl</field>
-          <field name="public_categ_id" ref="special_beers"/>
+          <field name="pos_categ_id" ref="special_beers"/>
           <field name="image" type="base64" file="point_of_sale/static/img/chimay_rouge_33cl-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">2.86</field>
           <field name="name">Dr. Oetker Ristorante Mozzarella</field>
-          <field name="public_categ_id" ref="pizza"/>
+          <field name="pos_categ_id" ref="pizza"/>
           <field name="image" type="base64" file="point_of_sale/static/img/oetker_mozzarella-image.jpg"/>
         </record>
         <record id="oetker_bolognese" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.86</field>
           <field name="name">Dr. Oetker Ristorante Bolognese</field>
-          <field name="public_categ_id" ref="pizza"/>
+          <field name="pos_categ_id" ref="pizza"/>
           <field name="image" type="base64" file="point_of_sale/static/img/oetker_bolognese-image.jpg"/>
         </record>
         <record id="oetker_funghi" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.86</field>
           <field name="name">Dr. Oetker Ristorante Funghi</field>
-          <field name="public_categ_id" ref="pizza"/>
+          <field name="pos_categ_id" ref="pizza"/>
           <field name="image" type="base64" file="point_of_sale/static/img/oetker_funghi-image.jpg"/>
         </record>
         <record id="oetker_hawaii" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.86</field>
           <field name="name">Dr. Oetker Ristorante Hawaii</field>
-          <field name="public_categ_id" ref="pizza"/>
+          <field name="pos_categ_id" ref="pizza"/>
           <field name="image" type="base64" file="point_of_sale/static/img/oetker_hawaii-image.jpg"/>
         </record>
         <record id="oetker_pollo" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.86</field>
           <field name="name">Dr. Oetker Ristorante Pollo</field>
-          <field name="public_categ_id" ref="pizza"/>
+          <field name="pos_categ_id" ref="pizza"/>
           <field name="image" type="base64" file="point_of_sale/static/img/oetker_pollo-image.jpg"/>
         </record>
         <record id="oetker_prosciutto" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.86</field>
           <field name="name">Dr. Oetker Ristorante Prosciutto</field>
-          <field name="public_categ_id" ref="pizza"/>
+          <field name="pos_categ_id" ref="pizza"/>
           <field name="image" type="base64" file="point_of_sale/static/img/oetker_prosciutto-image.jpg"/>
         </record>
         <record id="oetker_4formaggi" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.86</field>
           <field name="name">Dr. Oetker Ristorante Quattro Formaggi</field>
-          <field name="public_categ_id" ref="pizza"/>
+          <field name="pos_categ_id" ref="pizza"/>
           <field name="image" type="base64" file="point_of_sale/static/img/oetker_4formaggi-image.jpg"/>
         </record>
         <record id="oetker_speciale" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.86</field>
           <field name="name">Dr. Oetker Ristorante Speciale</field>
-          <field name="public_categ_id" ref="pizza"/>
+          <field name="pos_categ_id" ref="pizza"/>
           <field name="image" type="base64" file="point_of_sale/static/img/oetker_speciale-image.jpg"/>
         </record>
         <record id="oetker_spinaci" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.86</field>
           <field name="name">Dr. Oetker Ristorante Spinaci</field>
-          <field name="public_categ_id" ref="pizza"/>
+          <field name="pos_categ_id" ref="pizza"/>
           <field name="image" type="base64" file="point_of_sale/static/img/oetker_spinaci-image.jpg"/>
         </record>
         <record id="oetker_tonno" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.86</field>
           <field name="name">Dr. Oetker Ristorante Tonno</field>
-          <field name="public_categ_id" ref="pizza"/>
+          <field name="pos_categ_id" ref="pizza"/>
           <field name="image" type="base64" file="point_of_sale/static/img/oetker_tonno-image.jpg"/>
         </record>
         <record id="oetker_vegetale" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.86</field>
           <field name="name">Dr. Oetker Ristorante Vegetable</field>
-          <field name="public_categ_id" ref="pizza"/>
+          <field name="pos_categ_id" ref="pizza"/>
           <field name="image" type="base64" file="point_of_sale/static/img/oetker_vegetale-image.jpg"/>
         </record>
         <record id="oetker_margherita" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">2.67</field>
           <field name="name">Dr. Oetker La Margherita</field>
-          <field name="public_categ_id" ref="pizza"/>
+          <field name="pos_categ_id" ref="pizza"/>
           <field name="image" type="base64" file="point_of_sale/static/img/oetker_margherita-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">0.33</field>
           <field name="name">Croky Paprika 45g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/croky_paprika_45g-image.jpg"/>
         </record>
         <record id="croky_naturel_45g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.39</field>
           <field name="name">Croky Natural 45g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/croky_naturel_45g-image.jpg"/>
         </record>
         <record id="croky_bolognaise_250g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.78</field>
           <field name="name">Croky Bolognese 250g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/croky_bolognaise_250g-image.jpg"/>
         </record>
         <record id="lays_pickles_250g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.48</field>
           <field name="name">250g Lays Pickels</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_pickles_250g-image.jpg"/>
         </record>
         <record id="lays_ketchup_250g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.48</field>
           <field name="name">Lays Ketchup 250g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_ketchup_250g-image.jpg"/>
         </record>
         <record id="lays_poivre_sel_oven_150g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.58</field>
           <field name="name">Lays Salt and Pepper Oven Baked 150g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_poivre_sel_oven_150g-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">1.54</field>
           <field name="name">Oven Baked Lays Paprika 150g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_paprika_oven_150g-image.jpg"/>
         </record>
         <record id="lays_paprika_300g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.55</field>
           <field name="name">Lays Paprika XXL 300g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_paprika_300g-image.jpg"/>
         </record>
         <record id="lays_paprika_170g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.48</field>
           <field name="name">Lays Light Paprika 170g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_paprika_170g-image.jpg"/>
         </record>
         <record id="lays_light_paprika_170g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.48</field>
           <field name="name">Lays Light Paprika 170g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_light_paprika_170g-image.jpg"/>
         </record>
         <record id="lays_paprika_45g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.39</field>
           <field name="name">Lays Paprika 45g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_paprika_45g-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">1.54</field>
           <field name="name">Oven Baked Lays Natural 150g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_naturel_oven_150g-image.jpg"/>
         </record>
         <record id="lays_naturel_300g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.55</field>
           <field name="name">Lays Natural XXL 300g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_naturel_300g-image.jpg"/>
         </record>
         <record id="lays_naturel_170g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.48</field>
           <field name="name">Lays Natural Light 170g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_naturel_170g-image.jpg"/>
         </record>
         <record id="lays_light_naturel_170g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">1.48</field>
           <field name="name">Lays Natural Light 170g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_light_naturel_170g-image.jpg"/>
         </record>
         <record id="lays_naturel_45g" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">0.39</field>
           <field name="name">Lays Natural 45g</field>
-          <field name="public_categ_id" ref="chips"/>
+          <field name="pos_categ_id" ref="chips"/>
           <field name="image" type="base64" file="point_of_sale/static/img/lays_naturel_45g-image.jpg"/>
         </record>
 
           <field name="available_in_pos">True</field>
           <field name="list_price">7.60</field>
           <field name="name">IJsboerke Chocolat 2.5L</field>
-          <field name="public_categ_id" ref="ice_cream"/>
+          <field name="pos_categ_id" ref="ice_cream"/>
           <field name="image" type="base64" file="point_of_sale/static/img/ijsboerke_chocolat_2,5l-image.jpg"/>
         </record>
         <record id="ijsboerke_moka_2,5l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">7.60</field>
           <field name="name">IJsboerke Mocha 2.5L</field>
-          <field name="public_categ_id" ref="ice_cream"/>
+          <field name="pos_categ_id" ref="ice_cream"/>
           <field name="image" type="base64" file="point_of_sale/static/img/ijsboerke_moka_2,5l-image.jpg"/>
         </record>
         <record id="ijsboerke_vanille_2,5l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">7.40</field>
           <field name="name">IJsboerke Vanilla 2.5L</field>
-          <field name="public_categ_id" ref="ice_cream"/>
+          <field name="pos_categ_id" ref="ice_cream"/>
           <field name="image" type="base64" file="point_of_sale/static/img/ijsboerke_vanille_2,5l-image.jpg"/>
         </record>
         <record id="ijsboerke_stracciatella_2,5l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">8.40</field>
           <field name="name">IJsboerke Stracciatella 2.5L</field>
-          <field name="public_categ_id" ref="ice_cream"/>
+          <field name="pos_categ_id" ref="ice_cream"/>
           <field name="image" type="base64" file="point_of_sale/static/img/ijsboerke_stracciatella_2,5l-image.jpg"/>
         </record>
         <record id="ijsboerke_dame_blanche_2,5l" model="product.product">
           <field name="available_in_pos">True</field>
           <field name="list_price">7.60</field>
           <field name="name">IJsboerke 2.5L White Lady</field>
-          <field name="public_categ_id" ref="ice_cream"/>
+          <field name="pos_categ_id" ref="ice_cream"/>
           <field name="image" type="base64" file="point_of_sale/static/img/ijsboerke_dame_blanche_2,5l-image.jpg"/>
         </record>
         
index dc8a585..2d8b134 100644 (file)
 
 
 
-        <record id="product_normal_form_view" model="ir.ui.view">
-            <field name="name">product.normal.form.inherit</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="stock.view_normal_procurement_locations_form"/>
+        <!-- Product Public Categories -->
+        <record id="product_pos_category_form_view" model="ir.ui.view">
+            <field name="name">pos.category.form</field>
+            <field name="model">pos.category</field>
             <field name="arch" type="xml">
-                <group name="sale" position="inside">
+                <form string="Pos Categories" version="7.0">
+                    <sheet>
+                        <field name="image_medium" widget='image' class="oe_avatar oe_right"/>
+                        <div class="oe_left">
+                            <group>
+                                <field name="name"/>
+                                <field name="parent_id"/>
+                                <field name="sequence"/>
+                            </group>
+                        </div>
+                    </sheet>
+                </form>
+            </field>
+        </record>
+        <record id="product_pos_category_tree_view" model="ir.ui.view">
+            <field name="name">pos.category.tree</field>
+            <field name="model">pos.category</field>
+            <field name="field_parent" eval="False"/>
+            <field name="arch" type="xml">
+                <tree string="Product Product Categories">
+                    <field name="sequence" invisible="1"/>
+                    <field name="complete_name"/>
+                </tree>
+            </field>
+        </record>
+        <record id="product_pos_category_action" model="ir.actions.act_window">
+            <field name="name">Pos Product Categories</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">pos.category</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" eval="False"/>
+            <field name="help" type="html">
+              <p class="oe_view_nocontent_create">
+                Click to define a new category.
+              </p><p>
+                Categories are used to browse your products through the
+                touchscreen interface.
+              </p><p>
+                If you put a photo on the category, the layout of the
+                touchscreen interface will automatically. We suggest not to put
+                a photo on categories for small (1024x768) screens.
+              </p>
+            </field>
+        </record>
+        <menuitem action="product_pos_category_action" id="menu_product_pos_category" parent="menu_point_of_sale_product" sequence="0" />
+        <!-- END -->
+
+
+        <record id="product_template_form_view" model="ir.ui.view">
+            <field name="name">product.template.form.inherit</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
+            <field name="arch" type="xml">
+                <group name="website_and_pos" position="inside">
                     <group name="pos" string="Point of Sale">
+                        <field name="pos_categ_id"/>
                         <field name="available_in_pos"/>
                         <field name="to_weight" />
                         <field name="income_pdt"/>
                 </field>
             </field>
         </record>
-
-        <!-- Categories tree view -->
-        <menuitem action="product.product_public_category_action" id="menu_product_public_category" parent="menu_point_of_sale_product" sequence="0" />
         <!-- END -->
 
         <menuitem name="Configuration" parent="menu_point_root"
index 0ef1231..faa14f1 100644 (file)
@@ -57,5 +57,5 @@ access_product_pricelist_manager,product.pricelist manager,product.model_product
 access_pos_session_user,pos.session user,model_pos_session,group_pos_user,1,1,1,0\r
 access_pos_config_user,pos.config user,model_pos_config,group_pos_user,1,1,1,0\r
 access_ir_sequence_manager,ir.sequence manager,base.model_ir_sequence,group_pos_manager,1,1,1,1\r
-access_product_category_pos_manager,product.public.category manager,product.model_product_public_category,group_pos_manager,1,1,1,1\r
-access_product_category_pos_user,product.public.category user,product.model_product_public_category,group_pos_user,1,0,0,0\r
+access_product_category_pos_manager,pos.category manager,model_pos_category,group_pos_manager,1,1,1,1\r
+access_product_category_pos_user,pos.category user,model_pos_category,group_pos_user,1,0,0,0\r
index 54aa8d1..95e07a1 100644 (file)
@@ -436,7 +436,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
         },
 
         get_image_url: function(category){
-            return window.location.origin + '/web/binary/image?model=product.public.category&field=image_medium&id='+category.id;
+            return window.location.origin + '/web/binary/image?model=pos.category&field=image_medium&id='+category.id;
         },
 
         render_category: function( category, with_image ){
index 72f1c0e..53b0993 100644 (file)
@@ -188,10 +188,13 @@ class product_pricelist(osv.osv):
 
         products = map(lambda x: x[0], products_by_qty_by_partner)
         currency_obj = self.pool.get('res.currency')
-        product_obj = self.pool.get('product.product')
+        product_obj = self.pool.get('product.template')
         product_uom_obj = self.pool.get('product.uom')
         price_type_obj = self.pool.get('product.price.type')
 
+        if not products:
+            return {}
+
         version = False
         for v in pricelist.version_id:
             if ((v.date_start is False) or (v.date_start <= date)) and ((v.date_end is False) or (v.date_end >= date)):
@@ -207,8 +210,13 @@ class product_pricelist(osv.osv):
                 categ = categ.parent_id
         categ_ids = categ_ids.keys()
 
-        prod_ids = [x.id for x in products]
-        prod_tmpl_ids = [x.product_tmpl_id.id for x in products]
+        is_product_template = products[0]._name == "product.template"
+        if is_product_template:
+            prod_tmpl_ids = [tmpl.id for tmpl in products]
+            prod_ids = [product.id for product in tmpl.product_variant_ids for tmpl in products]
+        else:
+            prod_ids = [product.id for product in products]
+            prod_tmpl_ids = [product.product_tmpl_id.id for product in products]
 
         # Load all rules
         cr.execute(
@@ -234,10 +242,17 @@ class product_pricelist(osv.osv):
             for rule in items:
                 if rule.min_quantity and qty<rule.min_quantity:
                     continue
-                if rule.product_tmpl_id and product.product_tmpl_id.id<>rule.product_tmpl_id.id:
-                    continue
-                if rule.product_id and product.id<>rule.product_id.id:
-                    continue
+                if is_product_template:
+                    if rule.product_tmpl_id and product.id<>rule.product_tmpl_id.id:
+                        continue
+                    if rule.product_id:
+                        continue
+                else:
+                    if rule.product_tmpl_id and product.product_tmpl_id.id<>rule.product_tmpl_id.id:
+                        continue
+                    if rule.product_id and product.id<>rule.product_id.id:
+                        continue
+
                 if rule.categ_id:
                     cat = product.categ_id
                     while cat:
index 2804588..634fb02 100644 (file)
@@ -29,6 +29,7 @@ from openerp import tools
 from openerp.osv import osv, fields
 from openerp.tools.translate import _
 from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
+import psycopg2
 
 import openerp.addons.decimal_precision as dp
 
@@ -316,69 +317,78 @@ class produce_price_history(osv.osv):
     }
 
 
-class product_public_category(osv.osv):
-    _name = "product.public.category"
-    _description = "Public Category"
-    _order = "sequence, name"
-
-    _constraints = [
-        (osv.osv._check_recursion, 'Error ! You cannot create recursive categories.', ['parent_id'])
-    ]
-
-    def name_get(self, cr, uid, ids, context=None):
-        if not len(ids):
-            return []
-        reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
-        res = []
-        for record in reads:
-            name = record['name']
-            if record['parent_id']:
-                name = record['parent_id'][1]+' / '+name
-            res.append((record['id'], name))
-        return res
+#----------------------------------------------------------
+# Attributes / Variants
+#----------------------------------------------------------
+class product_attribute(osv.osv):
+    _name = "product.attribute"
+    _description = "Product Attribute"
+    _columns = {
+        'name': fields.char('Name', translate=True, required=True),
+        'value_ids': fields.one2many('product.attribute.value', 'attribute_id', 'Values'),
+    }
 
-    def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
-        res = self.name_get(cr, uid, ids, context=context)
-        return dict(res)
+class product_attribute_value(osv.osv):
+    _name = "product.attribute.value"
+    _order = 'sequence'
+    def _get_price_extra(self, cr, uid, ids, name, args, context=None):
+        result = dict.fromkeys(ids, 0)
+        if not context.get('active_id'):
+            return result
 
-    def _get_image(self, cr, uid, ids, name, args, context=None):
-        result = dict.fromkeys(ids, False)
         for obj in self.browse(cr, uid, ids, context=context):
-            result[obj.id] = tools.image_get_resized_images(obj.image)
+            for price_id in obj.price_ids:
+                if price_id.product_tmpl_id.id == context.get('active_id'):
+                    result[obj.id] = price_id.price_extra
+                    break
         return result
-    
-    def _set_image(self, cr, uid, id, name, value, args, context=None):
-        return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context)
+
+    def _set_price_extra(self, cr, uid, id, name, value, args, context=None):
+        if 'active_id' not in context:
+            return None
+        p_obj = self.pool['product.attribute.price']
+        p_ids = p_obj.search(cr, uid, [('value_id', '=', id), ('product_tmpl_id', '=', context['active_id'])], context=context)
+        if p_ids:
+            p_obj.write(cr, uid, p_ids, {'price_extra': value}, context=context)
+        else:
+            p_obj.create(cr, uid, p_ids, {
+                    'product_tmpl_id': context['active_id'],
+                    'value_id': id,
+                    'price_extra': value,
+                }, context=context)
 
     _columns = {
-        'name': fields.char('Name', required=True, translate=True),
-        'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
-        'parent_id': fields.many2one('product.public.category','Parent Category', select=True),
-        'child_id': fields.one2many('product.public.category', 'parent_id', string='Children Categories'),
-        'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of product categories."),
-        
-        # NOTE: there is no 'default image', because by default we don't show thumbnails for categories. However if we have a thumbnail
-        # for at least one category, then we display a default image on the other, so that the buttons have consistent styling.
-        # In this case, the default image is set by the js code.
-        # NOTE2: image: all image fields are base64 encoded and PIL-supported
-        'image': fields.binary("Image",
-            help="This field holds the image used as image for the cateogry, limited to 1024x1024px."),
-        'image_medium': fields.function(_get_image, fnct_inv=_set_image,
-            string="Medium-sized image", type="binary", multi="_get_image",
-            store={
-                'product.public.category': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
-            },
-            help="Medium-sized image of the category. It is automatically "\
-                 "resized as a 128x128px image, with aspect ratio preserved. "\
-                 "Use this field in form views or some kanban views."),
-        'image_small': fields.function(_get_image, fnct_inv=_set_image,
-            string="Smal-sized image", type="binary", multi="_get_image",
-            store={
-                'product.public.category': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
-            },
-            help="Small-sized image of the category. It is automatically "\
-                 "resized as a 64x64px image, with aspect ratio preserved. "\
-                 "Use this field anywhere a small image is required."),
+        'sequence': fields.integer('Sequence', help="Determine the display order"),
+        'name': fields.char('Value', translate=True, required=True),
+        'attribute_id': fields.many2one('product.attribute', 'Attribute', required=True),
+        'product_ids': fields.many2many('product.product', id1='att_id', id2='prod_id', string='Variants', readonly=True),
+        'price_extra': fields.function(_get_price_extra, type='float', string='Variant Price Extra',
+            fnct_inv=_set_price_extra,
+            digits_compute=dp.get_precision('Product Price'),
+            help="Price Extra: Extra price for the variant with this attribute value on sale price. eg. 200 price extra, 1000 + 200 = 1200."),
+        'price_ids': fields.one2many('product.attribute.price', 'value_id', string='Variant Prices', readonly=True),
+    }
+    _sql_constraints = [
+        ('value_company_uniq', 'unique (name,attribute_id)', 'This attribute value already exists !')
+    ]
+    _defaults = {
+        'price_extra': lambda *a: 0.0,
+    }
+
+class product_attribute_price(osv.osv):
+    _name = "product.attribute.price"
+    _columns = {
+        'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True),
+        'value_id': fields.many2one('product.attribute.value', 'Product Attribute Value', required=True),
+        'price_extra': fields.float('Price Extra', digits_compute=dp.get_precision('Product Price')),
+    }
+
+class product_attribute_line(osv.osv):
+    _name = "product.attribute.line"
+    _columns = {
+        'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True),
+        'attribute_id': fields.many2one('product.attribute', 'Attribute', required=True),
+        'value_ids': fields.many2many('product.attribute.value', id1='line_id', id2='val_id', string='Product Attribute Value'),
     }
 
 
@@ -399,6 +409,38 @@ class product_template(osv.osv):
     def _set_image(self, cr, uid, id, name, value, args, context=None):
         return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context)
 
+    def _is_product_variant(self, cr, uid, ids, name, arg, context=None):
+        prod = self.pool.get('product.product')
+        res = dict.fromkeys(ids, False)
+        ctx = dict(context, active_test=True)
+        for product in self.browse(cr, uid, ids, context=context):
+            res[product.id] = prod.search(cr, uid, [('product_tmpl_id','=',product.id)], context=ctx, count=True) == 1
+        return res
+
+    def _product_template_price(self, cr, uid, ids, name, arg, context=None):
+        plobj = self.pool.get('product.pricelist')
+        res = {}
+        quantity = context.get('quantity') or 1.0
+        pricelist = context.get('pricelist', False)
+        partner = context.get('partner', False)
+        if pricelist:
+            # Support context pricelists specified as display_name or ID for compatibility
+            if isinstance(pricelist, basestring):
+                pricelist_ids = plobj.name_search(
+                    cr, uid, pricelist, operator='=', context=context, limit=1)
+                pricelist = pricelist_ids[0][0] if pricelist_ids else pricelist
+
+            if isinstance(pricelist, (int, long)):
+                products = self.browse(cr, uid, ids, context=context)
+                qtys = map(lambda x: (x, quantity, partner), products)
+                pl = plobj.browse(cr, uid, pricelist, context=context)
+                price = plobj._price_get_multi(cr,uid, pl, qtys, context=context)
+                for id in ids:
+                    res[id] = price.get(id, 0.0)
+        for id in ids:
+            res.setdefault(id, 0.0)
+        return res
+
     def get_history_price(self, cr, uid, product_tmpl, company_id, date=None, context=None):
         if context is None:
             context = {}
@@ -421,6 +463,12 @@ class product_template(osv.osv):
             'company_id': company_id,
         }, context=context)
 
+    def _get_product_variant_count(self, cr, uid, ids, name, arg, context=None):
+        res = {}
+        for product in self.browse(cr, uid, ids):
+            res[product.id] = len(product.product_variant_ids)
+        return res
+
     _columns = {
         'name': fields.char('Name', required=True, translate=True, select=True),
         'product_manager': fields.many2one('res.users','Product Manager'),
@@ -434,9 +482,10 @@ class product_template(osv.osv):
                  "This description will be copied to every Sale Order, Delivery Order and Customer Invoice/Refund"),
         'type': fields.selection([('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Consumable are product where you don't manage stock, a service is a non-material product provided by a company or an individual."),        
         'rental': fields.boolean('Can be Rent'),
-        'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
-        'public_categ_id': fields.many2one('product.public.category','Public Category', help="Those categories are used to group similar products for public sales (eg.: point of sale, e-commerce)."),
+        'categ_id': fields.many2one('product.category','Internal Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
+        'price': fields.function(_product_template_price, type='float', string='Price', digits_compute=dp.get_precision('Product Price')),
         'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Product Price'), help="Base price to compute the customer price. Sometimes called the catalog price."),
+        'lst_price' : fields.related('list_price', type="float", string='Public Price', digits_compute=dp.get_precision('Product Price')),
         'standard_price': fields.property(type = 'float', digits_compute=dp.get_precision('Product Price'), 
                                           help="Cost price of the product template used for standard stock valuation in accounting and used as a base price on purchase orders.", 
                                           groups="base.group_user", string="Cost Price"),
@@ -445,6 +494,7 @@ class product_template(osv.osv):
         'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."),
         'warranty': fields.float('Warranty'),
         'sale_ok': fields.boolean('Can be Sold', help="Specify if the product can be selected in a sales order line."),
+        'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
         'state': fields.selection([('',''),
             ('draft', 'In Development'),
             ('sellable','Normal'),
@@ -458,13 +508,12 @@ class product_template(osv.osv):
             help='Coefficient to convert default Unit of Measure to Unit of Sale\n'
             ' uos = uom * coeff'),
         'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type'),
-        'seller_ids': fields.one2many('product.supplierinfo', 'product_tmpl_id', 'Supplier'),
         'company_id': fields.many2one('res.company', 'Company', select=1),
         # image: all image fields are base64 encoded and PIL-supported
         'image': fields.binary("Image",
             help="This field holds the image used as image for the product, limited to 1024x1024px."),
         'image_medium': fields.function(_get_image, fnct_inv=_set_image,
-            string="Medium-sized image", type="binary", multi="_get_image",
+            string="Medium-sized image", type="binary", multi="_get_image", 
             store={
                 'product.template': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
             },
@@ -479,13 +528,64 @@ class product_template(osv.osv):
             help="Small-sized image of the product. It is automatically "\
                  "resized as a 64x64px image, with aspect ratio preserved. "\
                  "Use this field anywhere a small image is required."),
-        'product_variant_ids': fields.one2many('product.product', 'product_tmpl_id', 'Product Variants', required=True),
+
+        'packaging' : fields.one2many('product.packaging', 'product_id', 'Logistical Units',
+            help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."),
+        
+        'seller_ids': fields.one2many('product.supplierinfo', 'product_tmpl_id', 'Supplier'),
+        'seller_delay': fields.related('seller_ids','delay', type='integer', string='Supplier Lead Time',
+            help="This is the average delay in days between the purchase order confirmation and the reception of goods for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."),
+        'seller_qty': fields.related('seller_ids','qty', type='float', string='Supplier Quantity',
+            help="This is minimum quantity to purchase from Main Supplier."),
+        'seller_id': fields.related('seller_ids','name', type='many2one', relation='res.partner', string='Main Supplier',
+            help="Main Supplier who has highest priority in Supplier List."),
+
+        'active': fields.boolean('Active', help="If unchecked, it will allow you to hide the product without removing it."),
+        'color': fields.integer('Color Index'),
+        'is_product_variant': fields.function( _is_product_variant, type='boolean', string='Only one product variant'),
+
+        'variant_ids': fields.one2many('product.attribute.line', 'product_tmpl_id', 'Product Variants'),
+        'product_variant_ids': fields.one2many('product.product', 'product_tmpl_id', 'Products', required=True),
+        'product_variant_count': fields.function( _get_product_variant_count, type='integer', string='Product Variant Number'),
+
+        # related to display product product information if is_product_variant
+        'ean13': fields.related('product_variant_ids', 'ean13', type='char', string='EAN13 Barcode'),
+        'default_code': fields.related('product_variant_ids', 'default_code', type='char', string='Internal Reference'),
     }
 
+    def _price_get_list_price(self, product):
+        return 0.0
+
+    def _price_get(self, cr, uid, products, ptype='list_price', context=None):
+        if context is None:
+            context = {}
+
+        if 'currency_id' in context:
+            pricetype_obj = self.pool.get('product.price.type')
+            price_type_id = pricetype_obj.search(cr, uid, [('field','=',ptype)])[0]
+            price_type_currency_id = pricetype_obj.browse(cr,uid,price_type_id).currency_id.id
+
+        res = {}
+        product_uom_obj = self.pool.get('product.uom')
+        for product in products:
+            res[product.id] = product[ptype] or 0.0
+            if ptype == 'list_price':
+                res[product.id] += product._name == "product.product" and product.price_extra or 0.0
+            if 'uom' in context:
+                uom = product.uom_id or product.uos_id
+                res[product.id] = product_uom_obj._compute_price(cr, uid,
+                        uom.id, res[product.id], context['uom'])
+            # Convert from price_type currency to asked one
+            if 'currency_id' in context:
+                # Take the price_type currency from the product field
+                # This is right cause a field cannot be in more than one currency
+                res[product.id] = self.pool.get('res.currency').compute(cr, uid, price_type_currency_id,
+                    context['currency_id'], res[product.id],context=context)
+
+        return res
+
     def _get_uom_id(self, cr, uid, *args):
-        cr.execute('select id from product_uom order by id limit 1')
-        res = cr.fetchone()
-        return res and res[0] or False
+        return self.pool["product.uom"].search(cr, uid, [], limit=1, order='id')[0]
 
     def _default_category(self, cr, uid, context=None):
         if context is None:
@@ -505,9 +605,65 @@ class product_template(osv.osv):
             return {'value': {'uom_po_id': uom_id}}
         return {}
 
+    def create_variant_ids(self, cr, uid, ids, context=None):
+        product_obj = self.pool.get("product.product")
+        ctx = context and context.copy() or {}
+
+        if ctx.get("create_product_variant"):
+            return None
+
+        ctx.update(active_test=False, create_product_variant=True)
+
+        tmpl_ids = self.browse(cr, uid, ids, context=ctx)
+        for tmpl_id in tmpl_ids:
+
+            # list of values combination
+            all_variants = [[]]
+            for variant_id in tmpl_id.variant_ids:
+                if len(variant_id.value_ids) > 1:
+                    temp_variants = []
+                    for value_id in variant_id.value_ids:
+                        for variant in all_variants:
+                            temp_variants.append(variant + [int(value_id)])
+                    all_variants = temp_variants
+
+            # check product
+            variants_active_ids = []
+            variants_inactive = []
+            for product_id in tmpl_id.product_variant_ids:
+                variants = map(int,product_id.variant_ids)
+                if variants in all_variants:
+                    variants_active_ids.append(product_id.id)
+                    all_variants.pop(all_variants.index(variants))
+                    # TODO all write in same time
+                    if product_id.active:
+                        product_id.write({'active': True}, context=ctx)
+                else:
+                    variants_inactive.append(product_id)
+
+            # create new product
+            for variant_ids in all_variants:
+                values = {
+                    'product_tmpl_id': tmpl_id.id,
+                    'variant_ids': [(6, 0, variant_ids)]
+                }
+                id = product_obj.create(cr, uid, values, context=ctx)
+                variants_active_ids.append(id)
+
+            # unlink or inactive product
+            for variant_id in map(int,variants_inactive):
+                try:
+                    with cr.savepoint():
+                        product_obj.unlink(cr, uid, [variant_id], context=ctx)
+                except (psycopg2.Error, osv.except_osv):
+                    product_obj.write(cr, uid, [variant_id], {'active': False}, context=ctx)
+                    pass
+        return True
+
     def create(self, cr, uid, vals, context=None):
         ''' Store the initial standard price in order to be able to retrieve the cost of a product template for a given date'''
         product_template_id = super(product_template, self).create(cr, uid, vals, context=context)
+        self.create_variant_ids(cr, uid, [product_template_id], context=context)
         self._set_standard_price(cr, uid, product_template_id, vals.get('standard_price', 0.0), context=context)
         return product_template_id
 
@@ -524,7 +680,15 @@ class product_template(osv.osv):
         if 'standard_price' in vals:
             for prod_template_id in ids:
                 self._set_standard_price(cr, uid, prod_template_id, vals['standard_price'], context=context)
-        return super(product_template, self).write(cr, uid, ids, vals, context=context)
+        if 'active' in vals:
+            product_ids = []
+            for product in self.browse(cr, uid, ids, context=context):
+                product_ids = map(int, product.product_variant_ids)
+            self.write(cr, uid, product_ids, {'active': vals.get('active')}, context=context)
+        res = super(product_template, self).write(cr, uid, ids, vals, context=context)
+        if 'variant_ids' in vals:
+            self.create_variant_ids(cr, uid, ids, context=context)
+        return res
 
     def copy(self, cr, uid, id, default=None, context=None):
         if default is None:
@@ -544,6 +708,7 @@ class product_template(osv.osv):
         'mes_type': 'fixed',
         'categ_id' : _default_category,
         'type' : 'consu',
+        'active': lambda *a: 1,
     }
 
     def _check_uom(self, cursor, user, ids, context=None):
@@ -579,14 +744,6 @@ class product_product(osv.osv):
     _inherit = ['mail.thread']
     _order = 'default_code,name_template'
 
-    def view_header_get(self, cr, uid, view_id, view_type, context=None):
-        if context is None:
-            context = {}
-        res = super(product_product, self).view_header_get(cr, uid, view_id, view_type, context)
-        if (context.get('categ_id', False)):
-            return _('Products: ') + self.pool.get('product.category').browse(cr, uid, context['categ_id'], context=context).name
-        return res
-
     def _product_price(self, cr, uid, ids, name, arg, context=None):
         plobj = self.pool.get('product.pricelist')
         res = {}
@@ -613,11 +770,19 @@ class product_product(osv.osv):
             res.setdefault(id, 0.0)
         return res
 
+    def view_header_get(self, cr, uid, view_id, view_type, context=None):
+        if context is None:
+            context = {}
+        res = super(product_product, self).view_header_get(cr, uid, view_id, view_type, context)
+        if (context.get('categ_id', False)):
+            return _('Products: ') + self.pool.get('product.category').browse(cr, uid, context['categ_id'], context=context).name
+        return res
+
     def _product_lst_price(self, cr, uid, ids, name, arg, context=None):
         res = {}
         product_uom_obj = self.pool.get('product.uom')
-        for id in ids:
-            res.setdefault(id, 0.0)
+        res = dict.fromkeys(ids, 0.0)
+
         for product in self.browse(cr, uid, ids, context=context):
             if 'uom' in context:
                 uom = product.uos_id or product.uom_id
@@ -625,20 +790,17 @@ class product_product(osv.osv):
                         uom.id, product.list_price, context['uom'])
             else:
                 res[product.id] = product.list_price
-            res[product.id] =  (res[product.id] or 0.0) * (product.price_margin or 1.0) + product.price_extra
+            price_extra = 0.0
+            for variant_id in product.variant_ids:
+                price_extra += variant_id.price_extra
+            res[product.id] =  (res[product.id] or 0.0) + price_extra
         return res
 
-    def _save_product_lst_price(self, cr, uid, product_id, field_name, field_value, arg, context=None):
-        field_value = field_value or 0.0
-        product = self.browse(cr, uid, product_id, context=context)
-        list_price = (field_value - product.price_extra) / (product.price_margin or 1.0)
-        return self.write(cr, uid, [product_id], {'list_price': list_price}, context=context)
-
     def _get_partner_code_name(self, cr, uid, ids, product, partner_id, context=None):
         for supinfo in product.seller_ids:
             if supinfo.name.id == partner_id:
-                return {'code': supinfo.product_code or product.default_code, 'name': supinfo.product_name or product.name, 'variants': ''}
-        res = {'code': product.default_code, 'name': product.name, 'variants': product.variants}
+                return {'code': supinfo.product_code or product.default_code, 'name': supinfo.product_name or product.name}
+        res = {'code': product.default_code, 'name': product.name}
         return res
 
     def _product_code(self, cr, uid, ids, name, arg, context=None):
@@ -655,48 +817,15 @@ class product_product(osv.osv):
             context = {}
         for p in self.browse(cr, uid, ids, context=context):
             data = self._get_partner_code_name(cr, uid, [], p, context.get('partner_id', None), context=context)
-            if not data['variants']:
-                data['variants'] = p.variants
             if not data['code']:
                 data['code'] = p.code
             if not data['name']:
                 data['name'] = p.name
-            res[p.id] = (data['code'] and ('['+data['code']+'] ') or '') + \
-                    (data['name'] or '') + (data['variants'] and (' - '+data['variants']) or '')
-        return res
-
-    def _is_only_child(self, cr, uid, ids, name, arg, context=None):
-        res = dict.fromkeys(ids, True)
-        for product in self.browse(cr, uid, ids, context=context):
-            if product.product_tmpl_id and len(product.product_tmpl_id.product_variant_ids) > 1:
-                res[product.id] = False
+            res[p.id] = (data['code'] and ('['+data['code']+'] ') or '') + (data['name'] or '')
         return res
 
-    def _get_main_product_supplier(self, cr, uid, product, context=None):
-        """Determines the main (best) product supplier for ``product``,
-        returning the corresponding ``supplierinfo`` record, or False
-        if none were found. The default strategy is to select the
-        supplier with the highest priority (i.e. smallest sequence).
-
-        :param browse_record product: product to supply
-        :rtype: product.supplierinfo browse_record or False
-        """
-        sellers = [(seller_info.sequence, seller_info)
-                       for seller_info in product.seller_ids or []
-                       if seller_info and isinstance(seller_info.sequence, (int, long))]
-        return sellers and sellers[0][1] or False
-
-    def _calc_seller(self, cr, uid, ids, fields, arg, context=None):
-        result = {}
-        for product in self.browse(cr, uid, ids, context=context):
-            main_supplier = self._get_main_product_supplier(cr, uid, product, context=context)
-            result[product.id] = {
-                'seller_info_id': main_supplier and main_supplier.id or False,
-                'seller_delay': main_supplier.delay if main_supplier else 1,
-                'seller_qty': main_supplier and main_supplier.qty or 0.0,
-                'seller_id': main_supplier and main_supplier.name.id or False
-            }
-        return result
+    def _is_product_variant(self, cr, uid, ids, name, arg, context=None):
+        return dict.fromkeys(ids, True)
 
     def _get_name_template_ids(self, cr, uid, ids, context=None):
         result = set()
@@ -705,39 +834,69 @@ class product_product(osv.osv):
             result.add(el)
         return list(result)
 
+    def _get_image_variant(self, cr, uid, ids, name, args, context=None):
+        result = dict.fromkeys(ids, False)
+        for obj in self.browse(cr, uid, ids, context=context):
+            result[obj.id] = obj.image_variant or getattr(obj.product_tmpl_id, name)
+        return result
+
+    def _set_image_variant(self, cr, uid, id, name, value, args, context=None):
+        image = tools.image_resize_image_big(value)
+        res = self.write(cr, uid, [id], {'image_variant': image}, context=context)
+        product = self.browse(cr, uid, id, context=context)
+        if not product.product_tmpl_id.image:
+            product.write({'image_variant': None}, context=context)
+            product.product_tmpl_id.write({'image': image}, context=context)
+        return res
+
+    def _get_price_extra(self, cr, uid, ids, name, args, context=None):
+        result = dict.fromkeys(ids, False)
+        for product in self.browse(cr, uid, ids, context=context):
+            price_extra = 0.0
+            for variant_id in product.variant_ids:
+                for price_id in variant_id.price_ids:
+                    if price_id.product_tmpl_id.id == product.product_tmpl_id.id:
+                        price_extra += price_id.price_extra
+            result[product.id] = price_extra
+        return result
+
     _columns = {
-        'price': fields.function(_product_price, fnct_inv=_save_product_lst_price, type='float', string='Price', digits_compute=dp.get_precision('Product Price')),
-        'lst_price' : fields.function(_product_lst_price, fnct_inv=_save_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Product Price')),
+        'price': fields.function(_product_price, type='float', string='Price', digits_compute=dp.get_precision('Product Price')),
+        'price_extra': fields.function(_get_price_extra, type='float', string='Sum of Variant Price Extra'),
+        'lst_price': fields.function(_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Product Price')),
         'code': fields.function(_product_code, type='char', string='Internal Reference'),
         'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),
         'default_code' : fields.char('Internal Reference', select=True),
         'active': fields.boolean('Active', help="If unchecked, it will allow you to hide the product without removing it."),
-        'variants': fields.char('Variants', translate=True),
         'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade", select=True),
-        'is_only_child': fields.function(
-            _is_only_child, type='boolean', string='Sole child of the parent template'),
         'ean13': fields.char('EAN13 Barcode', size=13, help="International Article Number used for product identification."),
+        'is_product_variant': fields.function( _is_product_variant, type='boolean', string='Only one product variant'),
         'packaging': fields.one2many('product.packaging', 'product_id', 'Packaging', help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."),
-        'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Product Price'), help="Price Extra: Extra price for the variant on sale price. eg. 200 price extra, 1000 + 200 = 1200."),
-        'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Product Price'), help="Price Margin: Margin in percentage amount on sale price for the variant. eg. 10 price margin, 1000 * 1.1 = 1100."),
-        'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
         'name_template': fields.related('product_tmpl_id', 'name', string="Template Name", type='char', store={
             'product.template': (_get_name_template_ids, ['name'], 10),
             'product.product': (lambda self, cr, uid, ids, c=None: ids, [], 10),
         }, select=True),
-        'color': fields.integer('Color Index'),
-        'seller_info_id': fields.function(_calc_seller, type='many2one', relation="product.supplierinfo", string="Supplier Info", multi="seller_info"),
-        'seller_delay': fields.function(_calc_seller, type='integer', string='Supplier Lead Time', multi="seller_info", help="This is the average delay in days between the purchase order confirmation and the reception of goods for this product and for the default supplier. It is used by the scheduler to order requests based on reordering delays."),
-        'seller_qty': fields.function(_calc_seller, type='float', string='Supplier Quantity', multi="seller_info", help="This is minimum quantity to purchase from Main Supplier."),
-        'seller_id': fields.function(_calc_seller, type='many2one', relation="res.partner", string='Main Supplier', help="Main Supplier who has highest priority in Supplier List.", multi="seller_info"),
+        'variant_ids': fields.many2many('product.attribute.value',  id1='prod_id', id2='att_id', string='Variants', readonly=True),
+
+        # image: all image fields are base64 encoded and PIL-supported
+        'image_variant': fields.binary("Variant Image",
+            help="This field holds the image used as image for the product variant, limited to 1024x1024px."),
+
+        'image': fields.function(_get_image_variant, fnct_inv=_set_image_variant,
+            string="Big-sized image", type="binary",
+            help="Image of the product variant (Big-sized image of product template if false). It is automatically "\
+                 "resized as a 1024x1024px image, with aspect ratio preserved."),
+        'image_small': fields.function(_get_image_variant, fnct_inv=_set_image_variant,
+            string="Small-sized image", type="binary",
+            help="Image of the product variant (Small-sized image of product template if false)."),
+        'image_medium': fields.function(_get_image_variant, fnct_inv=_set_image_variant,
+            string="Medium-sized image", type="binary",
+            help="Image of the product variant (Medium-sized image of product template if false)."),
     }
 
     _defaults = {
         'active': lambda *a: 1,
-        'price_extra': lambda *a: 0.0,
-        'price_margin': lambda *a: 1.0,
         'color': 0,
-        'is_only_child': True,
     }
 
     def unlink(self, cr, uid, ids, context=None):
@@ -767,8 +926,9 @@ class product_product(osv.osv):
 
     def _check_ean_key(self, cr, uid, ids, context=None):
         for product in self.read(cr, uid, ids, ['ean13'], context=context):
-            res = check_ean(product['ean13'])
-        return res
+            if not check_ean(product['ean13']):
+                return False
+        return True
 
     _constraints = [(_check_ean_key, 'You provided an invalid "EAN13 Barcode" reference. You may use the "Internal Reference" field instead.', ['ean13'])]
 
@@ -782,13 +942,12 @@ class product_product(osv.osv):
             ids = [ids]
         if not len(ids):
             return []
+
         def _name_get(d):
             name = d.get('name','')
             code = d.get('default_code',False)
             if code:
                 name = '[%s] %s' % (code,name)
-            if d.get('variants'):
-                name = name + ' - %s' % (d['variants'],)
             return (d['id'], name)
 
         partner_id = context.get('partner_id', False)
@@ -800,6 +959,8 @@ class product_product(osv.osv):
 
         result = []
         for product in self.browse(cr, SUPERUSER_ID, ids, context=context):
+            variant = ", ".join([v.name for v in product.variant_ids])
+            name = variant and "%s (%s)" % (product.name, variant) or product.name
             sellers = []
             if partner_id:
                 sellers = filter(lambda x: x.name.id == partner_id, product.seller_ids)
@@ -807,17 +968,15 @@ class product_product(osv.osv):
                 for s in sellers:
                     mydict = {
                               'id': product.id,
-                              'name': s.product_name or product.name,
+                              'name': s.product_name or name,
                               'default_code': s.product_code or product.default_code,
-                              'variants': product.variants
                               }
                     result.append(_name_get(mydict))
             else:
                 mydict = {
                           'id': product.id,
-                          'name': product.name,
+                          'name': name,
                           'default_code': product.default_code,
-                          'variants': product.variants
                           }
                 result.append(_name_get(mydict))
         return result
@@ -855,44 +1014,7 @@ class product_product(osv.osv):
     #
     def price_get(self, cr, uid, ids, ptype='list_price', context=None):
         products = self.browse(cr, uid, ids, context=context)
-        return self._price_get(cr, uid, products, ptype=ptype, context=context)
-
-    def _price_get(self, cr, uid, products, ptype='list_price', context=None):
-        if context is None:
-            context = {}
-
-        if 'currency_id' in context:
-            pricetype_obj = self.pool.get('product.price.type')
-            price_type_id = pricetype_obj.search(cr, uid, [('field','=',ptype)])[0]
-            price_type_currency_id = pricetype_obj.browse(cr,uid,price_type_id).currency_id.id
-
-        res = {}
-        # standard_price field can only be seen by users in base.group_user
-        # Thus, in order to compute the sale price from the cost price for users not in this group
-        # We fetch the standard price as the superuser
-        for product in products:
-            if ptype != 'standard_price':
-                res[product.id] = product[ptype] or 0.0
-            else: 
-                res[product.id] = self.read(cr, SUPERUSER_ID, product.id, [ptype], context=context)[ptype] or 0.0
-
-        product_uom_obj = self.pool.get('product.uom')
-        for product in products:
-            if ptype == 'list_price':
-                res[product.id] = (res[product.id] * (product.price_margin or 1.0)) + \
-                        product.price_extra
-            if 'uom' in context:
-                uom = product.uom_id or product.uos_id
-                res[product.id] = product_uom_obj._compute_price(cr, uid,
-                        uom.id, res[product.id], context['uom'])
-            # Convert from price_type currency to asked one
-            if 'currency_id' in context:
-                # Take the price_type currency from the product field
-                # This is right cause a field cannot be in more than one currency
-                res[product.id] = self.pool.get('res.currency').compute(cr, uid, price_type_currency_id,
-                    context['currency_id'], res[product.id],context=context)
-
-        return res
+        return self.pool.get("product.template")._price_get(cr, uid, products, ptype=ptype, context=context)
 
     def copy(self, cr, uid, id, default=None, context=None):
         if context is None:
@@ -948,8 +1070,9 @@ class product_packaging(osv.osv):
 
     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)
-        return res
+            if not check_ean(pack.ean):
+                return False
+        return True
 
     _constraints = [(_check_ean_key, 'Error: Invalid ean code', ['ean'])]
 
index 85462bb..54e6fac 100644 (file)
@@ -255,10 +255,5 @@ parameter) will see those record just disappear.
             <field name="type">service</field>
             <field name="sale_ok" eval="False"/>
         </record>
-
-        <!-- Product Public Categories -->
-        <record id="categ_others" model="product.public.category">
-            <field name="name">Others</field>
-        </record>
     </data>
 </openerp>
index 20d3777..160e5e2 100644 (file)
             <field name="type">box</field>
         </record>
 
-
-    <!-- product.public.category -->
-
-        <record id="computers" model="product.public.category">
-          <field name="name">Computers</field>
-        </record>
-        
-        <record id="Components" model="product.public.category">
-          <field name="parent_id" ref="computers"/>
-          <field name="name">Components</field>
-        </record>
-
-        <record id="case" model="product.public.category">
-          <field name="parent_id" ref="Components"/>
-          <field name="name">Case</field>
-        </record>
-        <record id="HDD" model="product.public.category">
-          <field name="parent_id" ref="Components"/>
-          <field name="name">Hard Drive</field>
-        </record>
-        <record id="motherboard" model="product.public.category">
-          <field name="parent_id" ref="Components"/>
-          <field name="name">Motherboard</field>
-        </record>
-        <record id="graphics_card" model="product.public.category">
-          <field name="parent_id" ref="Components"/>
-          <field name="name">Graphics Card</field>
-        </record>
-        <record id="Memory" model="product.public.category">
-          <field name="parent_id" ref="Components"/>
-          <field name="name">Memory</field>
-        </record>
-        <record id="processor" model="product.public.category">
-          <field name="parent_id" ref="Components"/>
-          <field name="name">Processor</field>
-        </record>
-        <record id="video_acquisition" model="product.public.category">
-          <field name="parent_id" ref="Components"/>
-          <field name="name">Video Acquisition</field>
-        </record>
-
-        <record id="devices" model="product.public.category">
-          <field name="parent_id" ref="computers"/>
-          <field name="name">Devices</field>
-        </record>
-
-        <record id="Screen" model="product.public.category">
-          <field name="parent_id" ref="devices"/>
-          <field name="name">Screen</field>
-        </record>
-        <record id="Pen_Drive" model="product.public.category">
-          <field name="parent_id" ref="devices"/>
-          <field name="name">Pen Drive</field>
-        </record>
-        <record id="External_Hard_Drive" model="product.public.category">
-          <field name="parent_id" ref="devices"/>
-          <field name="name">External Hard Drive</field>
-        </record>
-        <record id="Keyboard_Mouse" model="product.public.category">
-          <field name="parent_id" ref="devices"/>
-          <field name="name">Keyboard / Mouse</field>
-        </record>
-        <record id="printer" model="product.public.category">
-          <field name="parent_id" ref="devices"/>
-          <field name="name">Printer</field>
-        </record>
-        <record id="Speakers" model="product.public.category">
-          <field name="parent_id" ref="devices"/>
-          <field name="name">Speakers</field>
-        </record>
-        <record id="Headset" model="product.public.category">
-          <field name="parent_id" ref="devices"/>
-          <field name="name">Headset</field>
-        </record>
-        <record id="Software" model="product.public.category">
-          <field name="parent_id" ref="devices"/>
-          <field name="name">Software</field>
-        </record>
-
-        <record id="laptops" model="product.public.category">
-          <field name="parent_id" ref="computers"/>
-          <field name="name">Laptops</field>
-        </record>
-
-        <record id="sub_computers" model="product.public.category">
-          <field name="parent_id" ref="computers"/>
-          <field name="name">Computers</field>
-        </record>
-
-        <record id="Computer_all_in_one" model="product.public.category">
-          <field name="parent_id" ref="sub_computers"/>
-          <field name="name">Computer all-in-one</field>
-        </record>
-        <record id="server" model="product.public.category">
-          <field name="parent_id" ref="sub_computers"/>
-          <field name="name">Server</field>
-        </record>
-
-        <record id="network" model="product.public.category">
-          <field name="parent_id" ref="computers"/>
-          <field name="name">Network</field>
-        </record>
-
-        <record id="Switch" model="product.public.category">
-          <field name="parent_id" ref="network"/>
-          <field name="name">Switch</field>
-        </record>
-        <record id="Modem_Router" model="product.public.category">
-          <field name="parent_id" ref="network"/>
-          <field name="name">Modem &amp; Router</field>
-        </record>
-        <record id="Switch" model="product.public.category">
-          <field name="parent_id" ref="network"/>
-          <field name="name">Switch</field>
-        </record>
-        
-        <record id="services" model="product.public.category">
-          <field name="parent_id" ref="computers"/>
-          <field name="name">Services</field>
-        </record>
-
     <!-- Apple Products -->
     <record id="apple" model="product.category">
           <field name="name">Apple Products</field>
             <field name="sale_ok" eval="True"/>
         </record>
 
-        <record id="product_template_1" model="product.template">
+        <record id="product_product_1" model="product.product">
             <field name="name">On Site Monitoring</field>
             <field name="categ_id" ref="product_category_5"/>
-            <field name="public_categ_id" ref="services"/>
             <field name="standard_price">20.5</field>
             <field name="list_price">30.75</field>
             <field name="type">service</field>
             <field name="description">This type of service include basic monitoring of products.</field>
             <field name="description_sale">This type of service include basic monitoring of products.</field>
         </record>
-        <record id="product_product_1" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_1"/>
-        </record>
 
 
-        <record id="product_template_2" model="product.template">
+        <record id="product_product_2" model="product.product">
             <field name="name">On Site Assistance</field>
             <field name="categ_id" ref="product_category_5"/>
-            <field name="public_categ_id" ref="services"/>
             <field name="standard_price">25.5</field>
             <field name="list_price">38.25</field>
             <field name="type">service</field>
             <field name="uom_po_id" ref="product_uom_hour"/>
             <field name="description">This type of service include assistance for security questions, system configuration requirements, implementation or special needs.</field>
         </record>
-        <record id="product_product_2" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_2"/>
-        </record>
 
 
-        <record id="product_template_3" model="product.template">
+        <record id="product_product_3" model="product.product">
             <field name="name">PC Assemble SC234</field>
             <field name="categ_id" ref="product_category_4"/>
-            <field name="public_categ_id" ref="Computer_all_in_one"/>
             <field name="list_price">450.0</field>
             <field name="standard_price">300.0</field>
             <field name="type">consu</field>
 Processor AMD 8-Core
 512MB RAM
 HDD SH-1</field>
-        </record>
-        <record id="product_product_3" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_3"/>
             <field name="default_code">PCSC234</field>
         </record>
 
 
-        <record id="product_template_4" model="product.template">
+        <record id="product_product_4" model="product.product">
             <field name="name">iPad Retina Display</field>
             <field name="categ_id" ref="ipad"/>
-            <field name="public_categ_id" ref="Computer_all_in_one"/>
             <field name="standard_price">500.0</field>
             <field name="list_price">750.0</field>
             <field name="type">consu</field>
@@ -275,17 +141,13 @@ HDD SH-1</field>
             <field name="description_sale">7.9‑inch (diagonal) LED-backlit, 128Gb
 Dual-core A5 with quad-core graphics
 FaceTime HD Camera, 1.2 MP Photos</field>
-        </record>
-        <record id="product_product_4" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_4"/>
             <field name="default_code">A2323</field>
         </record>
 
 
-        <record id="product_template_5" model="product.template">
+        <record id="product_product_5" model="product.product">
             <field name="name">Bose Mini Bluetooth Speaker</field>
             <field name="categ_id" ref="accessories"/>
-            <field name="public_categ_id" ref="Speakers"/>
             <field name="standard_price">600.0</field>
             <field name="list_price">147.0</field>
             <field name="type">consu</field>
@@ -293,44 +155,33 @@ FaceTime HD Camera, 1.2 MP Photos</field>
             <field name="uom_po_id" ref="product_uom_unit"/>
             <field name="description">Custom computer assembled on order based on customer's requirement.</field>
             <field name="description_sale">Bose's smallest portable Bluetooth speaker</field>
-        </record>
-        <record id="product_product_5" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_5"/>
             <field name="default_code">B3423</field>
         </record>
 
 
-        <record id="product_template_6" model="product.template">
+        <record id="product_product_6" model="product.product">
             <field name="name">iPad Mini</field>
             <field name="categ_id" ref="ipad"/>
-            <field name="public_categ_id" ref="Screen"/>
             <field name="standard_price">800.0</field>
             <field name="list_price">320.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_6" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_6"/>
             <field name="default_code">A1232</field>
         </record>
 
-        <record id="product_template_7" model="product.template">
+        <record id="product_product_7" model="product.product">
             <field name="name">Apple In-Ear Headphones</field>
             <field name="categ_id" ref="accessories"/>
-            <field name="public_categ_id" ref="Screen"/>
             <field name="standard_price">70.0</field>
             <field name="list_price">79.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_7" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_7"/>
             <field name="default_code">A8767</field>
         </record>
 
-        <record id="product_template_8" model="product.template">
+        <record id="product_product_8" model="product.product">
             <field name="name">iMac</field>
             <field name="categ_id" ref="imac"/>
             <field name="standard_price">1299.0</field>
@@ -338,272 +189,227 @@ FaceTime HD Camera, 1.2 MP Photos</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_8" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_8"/>
             <field name="default_code">A1090</field>
         </record>
 
-        <record id="product_template_9" model="product.template">
+        <record id="product_product_9" model="product.product">
             <field name="name">Apple Wireless Keyboard</field>
             <field name="categ_id" ref="accessories"/>
-            <field name="public_categ_id" ref="Keyboard_Mouse"/>
             <field name="standard_price">10.0</field>
             <field name="list_price">47.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_9" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_9"/>
             <field name="default_code">AK789</field>
         </record>
 
-        <record id="product_template_10" model="product.template">
+        <record id="product_product_10" model="product.product">
             <field name="name">Mouse, Optical</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="Keyboard_Mouse"/>
             <field name="standard_price">12.50</field>
             <field name="list_price">14</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_10" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_10"/>
             <field name="default_code">M-Opt</field>
         </record>
 
-        <record id="product_template_11" model="product.template">
-            <field name="name">iPod</field>
-            <field name="categ_id" ref="ipod"/>
-            <field name="public_categ_id" ref="Keyboard_Mouse"/>
-            <field name="standard_price">14</field>
-            <field name="list_price">16.50</field>
-            <field name="type">consu</field>
-            <field name="uom_id" ref="product_uom_unit"/>
-            <field name="uom_po_id" ref="product_uom_unit"/>
+        <!-- -->
+
+        <record id="product_attribute_1" model="product.attribute">
+            <field name="name">Memory</field>
+        </record>
+        <record id="product_attribute_value_1" model="product.attribute.value">
+            <field name="name">16 Go</field>
+            <field name="attribute_id" ref="product_attribute_1"/>
         </record>
+        <record id="product_attribute_value_2" model="product.attribute.value">
+            <field name="name">32 Go</field>
+            <field name="attribute_id" ref="product_attribute_1"/>
+        </record>
+
         <record id="product_product_11" model="product.product">
             <field name="name">iPod</field>
-            <field name="variants">16 Gb</field>
-            <field name="default_code">A6678</field>
             <field name="categ_id" ref="ipod"/>
-            <field name="public_categ_id" ref="Keyboard_Mouse"/>
             <field name="standard_price">14</field>
             <field name="list_price">16.50</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-            <field name="product_tmpl_id" ref="product_template_11"/>
             <field name="default_code">A6678</field>
+            <field name="variant_ids" eval="[(6,0,[ref('product.product_attribute_value_1')])]"/>
         </record>
-        <record id="product_product_11_b" model="product.product">
-            <field name="variants">32 Gb</field>
-            <field name="price_extra">12</field>
-            <field name="product_tmpl_id" ref="product_template_11"/>
+        <record id="product_product_11b" model="product.product">
+            <field name="default_code">A6679</field>
+            <field name="product_tmpl_id" ref="product_product_11_product_template"/>
+            <field name="variant_ids" eval="[(6,0,[ref('product.product_attribute_value_2')])]"/>
+        </record>
+
+        <record id="product_attribute_line_1" model="product.attribute.line">
+            <field name="product_tmpl_id" ref="product_product_11_product_template"/>
+            <field name="attribute_id" ref="product_attribute_1"/>
+            <field name="value_ids" eval="[(6,0,[ref('product.product_attribute_value_1'), ref('product.product_attribute_value_2')])]"/>
+        </record>
+
+        <record id="product_product_11_product_template" model="product.template">
+            <field name="variant_ids" eval="[(6,0,[ref('product.product_attribute_line_1')])]"/>
+        </record>
+        
+        <record id="product_attribute_price_1" model="product.attribute.price">
+            <field name="product_tmpl_id" ref="product_product_11_product_template"/>
+            <field name="value_id" ref="product_attribute_value_2"/>
+            <field name="price_extra">6.40</field>
         </record>
 
-        <record id="product_template_12" model="product.template">
+        <!-- -->
+
+        <record id="product_product_12" model="product.product">
             <field name="name">Mouse, Wireless</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="Keyboard_Mouse"/>
             <field name="standard_price">18</field>
             <field name="list_price">12.50</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_12" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_12"/>
             <field name="default_code">M-Wir</field>
         </record>
 
-        <record id="product_template_13" model="product.template">
+        <record id="product_product_13" model="product.product">
             <field name="name">RAM SR5</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="Memory"/>
             <field name="standard_price">78.0</field>
             <field name="list_price">85.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_13" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_13"/>
             <field name="default_code">RAM-SR5</field>
         </record>
 
-        <record id="product_template_14" model="product.template">
+        <record id="product_product_14" model="product.product">
             <field name="name">RAM SR2</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="Memory"/>
             <field name="standard_price">87.0</field>
             <field name="list_price">95.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_14" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_14"/>
             <field name="default_code">RAM-SR2</field>
         </record>
 
-        <record id="product_template_15" model="product.template">
+        <record id="product_product_15" model="product.product">
             <field name="name">RAM SR3</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="Memory"/>
             <field name="standard_price">80.0</field>
             <field name="list_price">85.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_15" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_15"/>
             <field name="default_code">RAM-SR3</field>
         </record>
 
-        <record id="product_template_16" model="product.template">
+        <record id="product_product_16" model="product.product">
             <field name="name">Computer Case</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="case"/>
             <field name="standard_price">20.0</field>
             <field name="list_price">25.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_16" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_16"/>
             <field name="default_code">C-Case</field>
         </record>
 
-        <record id="product_template_17" model="product.template">
+        <record id="product_product_17" model="product.product">
             <field name="name">HDD SH-1</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="HDD"/>
             <field name="standard_price">860.0</field>
             <field name="list_price">975.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_17" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_17"/>
             <field name="default_code">HDD-SH1</field>
         </record>
 
-        <record id="product_template_18" model="product.template">
+        <record id="product_product_18" model="product.product">
             <field name="name">HDD SH-2</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="HDD"/>
             <field name="standard_price">1020.0</field>
             <field name="list_price">1150.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_18" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_18"/>
             <field name="default_code">HDD-SH2</field>
         </record>
 
-        <record id="product_template_19" model="product.template">
+        <record id="product_product_19" model="product.product">
             <field name="name">HDD on Demand</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="HDD"/>
             <field name="standard_price">1100.0</field>
             <field name="list_price">1250.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
             <field name="description">On demand hard-disk having capacity based on requirement.</field>
-        </record>
-        <record id="product_product_19" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_19"/>
             <field name="default_code">HDD-DEM</field>
         </record>
 
-        <record id="product_template_20" model="product.template">
+        <record id="product_product_20" model="product.product">
             <field name="name">Motherboard I9P57</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="motherboard"/>
             <field name="standard_price">1700.0</field>
             <field name="list_price">1950.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_20" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_20"/>
             <field name="default_code">MBi9</field>
         </record>
 
-        <record id="product_template_21" model="product.template">
+        <record id="product_product_21" model="product.product">
             <field name="name">Motherboard A20Z7</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="motherboard"/>
             <field name="standard_price">1790.0</field>
             <field name="list_price">2000.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_21" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_21"/>
             <field name="default_code">MBa20</field>
         </record>
 
-        <record id="product_template_22" model="product.template">
+        <record id="product_product_22" model="product.product">
             <field name="name">Processor Core i5 2.70 Ghz</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="processor"/>
             <field name="standard_price">2010.0</field>
             <field name="list_price">2100.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_22" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_22"/>
             <field name="default_code">CPUi5</field>
         </record>
 
-        <record id="product_template_23" model="product.template">
+        <record id="product_product_23" model="product.product">
             <field name="name">Processor AMD 8-Core</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="processor"/>
             <field name="standard_price">1910.0</field>
             <field name="list_price">1980.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_23" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_23"/>
             <field name="default_code">CPUa8</field>
         </record>
 
-        <record id="product_template_24" model="product.template">
+        <record id="product_product_24" model="product.product">
             <field name="name">Graphics Card</field>
             <field name="categ_id" ref="product_category_8"/>
-            <field name="public_categ_id" ref="graphics_card"/>
             <field name="standard_price">876.0</field>
             <field name="list_price">885.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_24" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_24"/>
             <field name="default_code">CARD</field>
         </record>
 
-        <record id="product_template_25" model="product.template">
+        <record id="product_product_25" model="product.product">
             <field name="name">Laptop E5023</field>
             <field name="categ_id" ref="product_category_4"/>
-            <field name="public_categ_id" ref="laptops"/>
             <field name="standard_price">2870.0</field>
             <field name="list_price">2950.0</field>
             <field name="type">consu</field>
@@ -613,16 +419,12 @@ FaceTime HD Camera, 1.2 MP Photos</field>
 4GB RAM
 Standard-1294P Processor
 QWERTY keyboard</field>
-        </record>
-        <record id="product_product_25" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_25"/>
             <field name="default_code">LAP-E5</field>
         </record>
 
-        <record id="product_template_26" model="product.template">
+        <record id="product_product_26" model="product.product">
             <field name="name">Laptop S3450</field>
             <field name="categ_id" ref="product_category_4"/>
-            <field name="public_categ_id" ref="laptops"/>
             <field name="standard_price">3000.0</field>
             <field name="list_price">3245.0</field>
             <field name="type">consu</field>
@@ -632,141 +434,106 @@ QWERTY keyboard</field>
 6GB RAM
 Hi-Speed 234Q Processor
 QWERTY keyboard</field>
-        </record>
-        <record id="product_product_26" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_26"/>
             <field name="default_code">LAP-S3</field>
         </record>
 
-        <record id="product_template_27" model="product.template">
+        <record id="product_product_27" model="product.product">
             <field name="name">Laptop Customized</field>
             <field name="categ_id" ref="product_category_4"/>
-            <field name="public_categ_id" ref="laptops"/>
             <field name="standard_price">3300.0</field>
             <field name="list_price">3645.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
             <field name="description">Custom Laptop based on customer's requirement.</field>
-        </record>
-        <record id="product_product_27" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_27"/>
             <field name="default_code">LAP-CUS</field>
         </record>
 
-        <record id="product_template_28" model="product.template">
+        <record id="product_product_28" model="product.product">
             <field name="name">External Hard disk</field>
             <field name="categ_id" ref="product_category_6"/>
-            <field name="public_categ_id" ref="External_Hard_Drive"/>
             <field name="standard_price">390.0</field>
             <field name="list_price">405.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_28" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_28"/>
             <field name="default_code">EXT-HDD</field>
         </record>
 
 
-        <record id="product_template_29" model="product.template">
+        <record id="product_product_29" model="product.product">
             <field name="name">Pen drive, SP-2</field>
             <field name="categ_id" ref="product_category_7"/>
-            <field name="public_categ_id" ref="Pen_Drive"/>
             <field name="standard_price">90.0</field>
             <field name="list_price">100.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_29" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_29"/>
             <field name="default_code">PD-SP2</field>
         </record>
 
 
-        <record id="product_template_30" model="product.template">
+        <record id="product_product_30" model="product.product">
             <field name="name">Pen drive, SP-4</field>
             <field name="categ_id" ref="product_category_7"/>
-            <field name="public_categ_id" ref="Pen_Drive"/>
             <field name="standard_price">126.0</field>
             <field name="list_price">145.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_30" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_30"/>
             <field name="default_code">PD-SP4</field>
         </record>
 
-        <record id="product_template_31" model="product.template">
+        <record id="product_product_31" model="product.product">
             <field name="name">Multimedia Speakers</field>
             <field name="categ_id" ref="product_category_7"/>
-            <field name="public_categ_id" ref="Speakers"/>
             <field name="standard_price">134.0</field>
             <field name="list_price">150.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
             <field name="description">.</field>
-        </record>
-        <record id="product_product_31" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_31"/>
             <field name="default_code">MM-SPK</field>
         </record>
 
-        <record id="product_template_32" model="product.template">
+        <record id="product_product_32" model="product.product">
             <field name="name">Headset standard</field>
             <field name="categ_id" ref="product_category_7"/>
-            <field name="public_categ_id" ref="Headset"/>
             <field name="standard_price">57.0</field>
             <field name="list_price">62.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
             <field name="description">Hands free headset for laptop PC with in-line microphone and headphone plug.</field>
-        </record>
-        <record id="product_product_32" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_32"/>
             <field name="default_code">HEAD</field>
         </record>
 
-        <record id="product_template_33" model="product.template">
+        <record id="product_product_33" model="product.product">
             <field name="name">Headset USB</field>
             <field name="categ_id" ref="product_category_7"/>
-            <field name="public_categ_id" ref="Headset"/>
             <field name="standard_price">60.0</field>
             <field name="list_price">65.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
             <field name="description">Headset for laptop PC with USB connector.</field>
-        </record>
-        <record id="product_product_33" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_33"/>
             <field name="default_code">HEAD-USB</field>
         </record>
 
 
-        <record id="product_template_34" model="product.template">
+        <record id="product_product_34" model="product.product">
             <field name="name">Webcam</field>
             <field name="categ_id" ref="product_category_7"/>
-            <field name="public_categ_id" ref="video_acquisition"/>
             <field name="standard_price">38.0</field>
             <field name="list_price">45.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_34" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_34"/>
             <field name="default_code">WCAM</field>
         </record>
 
 
-        <record id="product_template_35" model="product.template">
+        <record id="product_product_35" model="product.product">
             <field name="name">Blank CD</field>
             <field name="categ_id" ref="product_category_7"/>
             <field name="standard_price">18.40</field>
@@ -774,14 +541,11 @@ QWERTY keyboard</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_dozen"/>
             <field name="uom_po_id" ref="product_uom_dozen"/>
-        </record>
-        <record id="product_product_35" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_35"/>
             <field name="default_code">CD</field>
         </record>
 
 
-        <record id="product_template_36" model="product.template">
+        <record id="product_product_36" model="product.product">
             <field name="name">Blank DVD-RW</field>
             <field name="categ_id" ref="product_category_7"/>
             <field name="standard_price">21.60</field>
@@ -789,193 +553,146 @@ QWERTY keyboard</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_dozen"/>
             <field name="uom_po_id" ref="product_uom_dozen"/>
-        </record>
-        <record id="product_product_36" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_36"/>
             <field name="default_code">DVD</field>
         </record>
 
 
-        <record id="product_template_37" model="product.template">
+        <record id="product_product_37" model="product.product">
             <field name="name">Printer, All-in-one</field>
             <field name="categ_id" ref="product_category_6"/>
-            <field name="public_categ_id" ref="printer"/>
             <field name="standard_price">4258.0</field>
             <field name="list_price">4410.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
             <field name="description">All in one hi-speed printer with fax and scanner.</field>
-        </record>
-        <record id="product_product_37" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_37"/>
             <field name="default_code">PRINT</field>
         </record>
 
 
-        <record id="product_template_38" model="product.template">
+        <record id="product_product_38" model="product.product">
             <field name="name">Ink Cartridge</field>
             <field name="categ_id" ref="product_category_6"/>
-            <field name="public_categ_id" ref="printer"/>
             <field name="standard_price">60.0</field>
             <field name="list_price">65.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_38" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_38"/>
             <field name="default_code">INK</field>
         </record>
 
 
-        <record id="product_template_39" model="product.template">
+        <record id="product_product_39" model="product.product">
             <field name="name">Toner Cartridge</field>
             <field name="categ_id" ref="product_category_6"/>
-            <field name="public_categ_id" ref="printer"/>
             <field name="standard_price">66.0</field>
             <field name="list_price">70.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_39" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_39"/>
             <field name="default_code">TONER</field>
         </record>
 
 
-        <record id="product_template_40" model="product.template">
+        <record id="product_product_40" model="product.product">
             <field name="name">Windows 7 Professional</field>
             <field name="categ_id" ref="product_category_9"/>
-            <field name="public_categ_id" ref="Software"/>
             <field name="standard_price">330.0</field>
             <field name="list_price">470.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_40" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_40"/>
             <field name="default_code">Win7</field>
         </record>
 
 
-        <record id="product_template_41" model="product.template">
+        <record id="product_product_41" model="product.product">
             <field name="name">Windows Home Server 2011</field>
             <field name="categ_id" ref="product_category_9"/>
-            <field name="public_categ_id" ref="Software"/>
             <field name="standard_price">540.0</field>
             <field name="list_price">620.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_41" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_41"/>
             <field name="default_code">WServer</field>
         </record>
 
 
-        <record id="product_template_42" model="product.template">
+        <record id="product_product_42" model="product.product">
             <field name="name">Office Suite</field>
             <field name="categ_id" ref="product_category_9"/>
-            <field name="public_categ_id" ref="Software"/>
             <field name="standard_price">110.0</field>
             <field name="list_price">170.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
             <field name="description_sale">Office Editing Software with word processing, spreadsheets, presentations, graphics, and databases...</field>
-        </record>
-        <record id="product_product_42" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_42"/>
             <field name="default_code">OSuite</field>
         </record>
 
 
-        <record id="product_template_43" model="product.template">
+        <record id="product_product_43" model="product.product">
             <field name="name">Zed+ Antivirus</field>
             <field name="categ_id" ref="product_category_9"/>
-            <field name="public_categ_id" ref="Software"/>
             <field name="standard_price">235.0</field>
             <field name="list_price">280.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_43" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_43"/>
             <field name="default_code">Zplus</field>
         </record>
 
 
-        <record id="product_template_44" model="product.template">
+        <record id="product_product_44" model="product.product">
             <field name="name">GrapWorks Software</field>
             <field name="categ_id" ref="product_category_9"/>
-            <field name="public_categ_id" ref="Software"/>
             <field name="standard_price">155.0</field>
             <field name="list_price">173.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
             <field name="description_sale">Full featured image editing software.</field>
-        </record>
-        <record id="product_product_44" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_44"/>
             <field name="default_code">GRAPs/w</field>
         </record>
 
 
-        <record id="product_template_45" model="product.template">
+        <record id="product_product_45" model="product.product">
             <field name="name">Router R430</field>
             <field name="categ_id" ref="product_category_6"/>
-            <field name="public_categ_id" ref="Modem_Router"/>
             <field name="standard_price">55.0</field>
             <field name="list_price">60.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_45" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_45"/>
             <field name="default_code">ROUT_430</field>
         </record>
 
 
-        <record id="product_template_46" model="product.template">
+        <record id="product_product_46" model="product.product">
             <field name="name">Datacard</field>
             <field name="categ_id" ref="product_category_6"/>
-            <field name="public_categ_id" ref="Pen_Drive"/>
             <field name="standard_price">35.0</field>
             <field name="list_price">40.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_46" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_46"/>
             <field name="default_code">DC</field>
         </record>
 
 
-        <record id="product_template_47" model="product.template">
+        <record id="product_product_47" model="product.product">
             <field name="name">Switch, 24 ports</field>
             <field name="categ_id" ref="product_category_6"/>
-            <field name="public_categ_id" ref="Switch"/>
             <field name="standard_price">55.0</field>
             <field name="list_price">70.0</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_47" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_47"/>
             <field name="default_code">SW24</field>
         </record>
 
 
-        <record id="product_template_48" model="product.template">
+        <record id="product_product_48" model="product.product">
             <field name="name">USB Adapter</field>
             <field name="categ_id" ref="product_category_6"/>
             <field name="standard_price">13.0</field>
@@ -983,9 +700,6 @@ QWERTY keyboard</field>
             <field name="type">consu</field>
             <field name="uom_id" ref="product_uom_unit"/>
             <field name="uom_po_id" ref="product_uom_unit"/>
-        </record>
-        <record id="product_product_48" model="product.product">
-            <field name="product_tmpl_id" ref="product_template_48"/>
             <field name="default_code">ADPT</field>
         </record>
 
@@ -995,315 +709,315 @@ QWERTY keyboard</field>
     -->
 
         <record id="product_supplierinfo_1" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_6"/>
+            <field name="product_tmpl_id" ref="product_product_6_product_template"/>
             <field name="name" ref="base.res_partner_1"/>
             <field name="delay">3</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_2" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_6"/>
+            <field name="product_tmpl_id" ref="product_product_6_product_template"/>
             <field name="name" ref="base.res_partner_4"/>
             <field name="delay">3</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_3" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_7"/>
+            <field name="product_tmpl_id" ref="product_product_7_product_template"/>
             <field name="name" ref="base.res_partner_1"/>
             <field name="delay">3</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_4" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_7"/>
+            <field name="product_tmpl_id" ref="product_product_7_product_template"/>
             <field name="name" ref="base.res_partner_4"/>
             <field name="delay">3</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_5" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_8"/>
+            <field name="product_tmpl_id" ref="product_product_8_product_template"/>
             <field name="name" ref="base.res_partner_16"/>
             <field name="delay">2</field>
             <field name="min_qty">5</field>
         </record>
 
         <record id="product_supplierinfo_6" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_8"/>
+            <field name="product_tmpl_id" ref="product_product_8_product_template"/>
             <field name="name" ref="base.res_partner_8"/>
             <field name="delay">4</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_7" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_10"/>
+            <field name="product_tmpl_id" ref="product_product_10_product_template"/>
             <field name="name" ref="base.res_partner_16"/>
             <field name="delay">2</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_8" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_11"/>
+            <field name="product_tmpl_id" ref="product_product_11_product_template"/>
             <field name="name" ref="base.res_partner_16"/>
             <field name="delay">2</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_9" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_13"/>
+            <field name="product_tmpl_id" ref="product_product_13_product_template"/>
             <field name="name" ref="base.res_partner_4"/>
             <field name="delay">5</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_10" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_14"/>
+            <field name="product_tmpl_id" ref="product_product_14_product_template"/>
             <field name="name" ref="base.res_partner_4"/>
             <field name="delay">5</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_11" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_15"/>
+            <field name="product_tmpl_id" ref="product_product_15_product_template"/>
             <field name="name" ref="base.res_partner_4"/>
             <field name="delay">5</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_12" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_15"/>
+            <field name="product_tmpl_id" ref="product_product_15_product_template"/>
             <field name="name" ref="base.res_partner_1"/>
             <field name="delay">1</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_13" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_16"/>
+            <field name="product_tmpl_id" ref="product_product_16_product_template"/>
             <field name="name" ref="base.res_partner_3"/>
             <field name="delay">1</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_14" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_17"/>
+            <field name="product_tmpl_id" ref="product_product_17_product_template"/>
             <field name="name" ref="base.res_partner_19"/>
             <field name="delay">3</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_15" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_20"/>
+            <field name="product_tmpl_id" ref="product_product_20_product_template"/>
             <field name="name" ref="base.res_partner_4"/>
             <field name="delay">3</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_16" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_20"/>
+            <field name="product_tmpl_id" ref="product_product_20_product_template"/>
             <field name="name" ref="base.res_partner_16"/>
             <field name="delay">4</field>
             <field name="min_qty">5</field>
         </record>
 
         <record id="product_supplierinfo_17" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_21"/>
+            <field name="product_tmpl_id" ref="product_product_21_product_template"/>
             <field name="name" ref="base.res_partner_4"/>
             <field name="delay">3</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_18" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_21"/>
+            <field name="product_tmpl_id" ref="product_product_21_product_template"/>
             <field name="name" ref="base.res_partner_16"/>
             <field name="delay">2</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_19" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_22"/>
+            <field name="product_tmpl_id" ref="product_product_22_product_template"/>
             <field name="name" ref="base.res_partner_19"/>
             <field name="delay">3</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_20" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_23"/>
+            <field name="product_tmpl_id" ref="product_product_23_product_template"/>
             <field name="name" ref="base.res_partner_19"/>
             <field name="delay">3</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_21" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_24"/>
+            <field name="product_tmpl_id" ref="product_product_24_product_template"/>
             <field name="name" ref="base.res_partner_19"/>
             <field name="delay">3</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_22" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_25"/>
+            <field name="product_tmpl_id" ref="product_product_25_product_template"/>
             <field name="name" ref="base.res_partner_1"/>
             <field name="delay">8</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_23" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_26"/>
+            <field name="product_tmpl_id" ref="product_product_26_product_template"/>
             <field name="name" ref="base.res_partner_1"/>
             <field name="delay">8</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_24" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_28"/>
+            <field name="product_tmpl_id" ref="product_product_28_product_template"/>
             <field name="name" ref="base.res_partner_19"/>
             <field name="delay">4</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_25" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_28"/>
+            <field name="product_tmpl_id" ref="product_product_28_product_template"/>
             <field name="name" ref="base.res_partner_1"/>
             <field name="delay">5</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_26" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_29"/>
+            <field name="product_tmpl_id" ref="product_product_29_product_template"/>
             <field name="name" ref="base.res_partner_3"/>
             <field name="delay">2</field>
             <field name="min_qty">12</field>
         </record>
 
         <record id="product_supplierinfo_27" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_30"/>
+            <field name="product_tmpl_id" ref="product_product_30_product_template"/>
             <field name="name" ref="base.res_partner_3"/>
             <field name="delay">2</field>
             <field name="min_qty">12</field>
         </record>
 
         <record id="product_supplierinfo_28" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_31"/>
+            <field name="product_tmpl_id" ref="product_product_31_product_template"/>
             <field name="name" ref="base.res_partner_3"/>
             <field name="delay">2</field>
             <field name="min_qty">5</field>
         </record>
 
         <record id="product_supplierinfo_29" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_32"/>
+            <field name="product_tmpl_id" ref="product_product_32_product_template"/>
             <field name="name" ref="base.res_partner_3"/>
             <field name="delay">2</field>
             <field name="min_qty">12</field>
         </record>
 
         <record id="product_supplierinfo_30" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_34"/>
+            <field name="product_tmpl_id" ref="product_product_34_product_template"/>
             <field name="name" ref="base.res_partner_16"/>
             <field name="delay">2</field>
             <field name="min_qty">5</field>
         </record>
 
         <record id="product_supplierinfo_31" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_35"/>
+            <field name="product_tmpl_id" ref="product_product_35_product_template"/>
             <field name="name" ref="base.res_partner_8"/>
             <field name="delay">2</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_32" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_36"/>
+            <field name="product_tmpl_id" ref="product_product_36_product_template"/>
             <field name="name" ref="base.res_partner_8"/>
             <field name="delay">2</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_33" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_38"/>
+            <field name="product_tmpl_id" ref="product_product_38_product_template"/>
             <field name="name" ref="base.res_partner_22"/>
             <field name="delay">4</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_34" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_39"/>
+            <field name="product_tmpl_id" ref="product_product_39_product_template"/>
             <field name="name" ref="base.res_partner_22"/>
             <field name="delay">4</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_35" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_45"/>
+            <field name="product_tmpl_id" ref="product_product_45_product_template"/>
             <field name="name" ref="base.res_partner_22"/>
             <field name="delay">5</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_36" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_46"/>
+            <field name="product_tmpl_id" ref="product_product_46_product_template"/>
             <field name="name" ref="base.res_partner_22"/>
             <field name="delay">5</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_37" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_47"/>
+            <field name="product_tmpl_id" ref="product_product_47_product_template"/>
             <field name="name" ref="base.res_partner_8"/>
             <field name="delay">7</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_39" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_18"/>
+            <field name="product_tmpl_id" ref="product_product_18_product_template"/>
             <field name="name" ref="base.res_partner_19"/>
             <field name="delay">4</field>
             <field name="min_qty">1</field>
         </record>
 
         <record id="product_supplierinfo_40" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_19"/>
+            <field name="product_tmpl_id" ref="product_product_19_product_template"/>
             <field name="name" ref="base.res_partner_1"/>
             <field name="delay">4</field>
             <field name="min_qty">0</field>
         </record>
 
         <record id="product_supplierinfo_41" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_19"/>
+            <field name="product_tmpl_id" ref="product_product_19_product_template"/>
             <field name="name" ref="base.res_partner_8"/>
             <field name="delay">5</field>
             <field name="min_qty">0</field>
         </record>
 
         <record id="product_supplierinfo_42" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_33"/>
+            <field name="product_tmpl_id" ref="product_product_33_product_template"/>
             <field name="name" ref="base.res_partner_3"/>
             <field name="delay">2</field>
             <field name="min_qty">0</field>
         </record>
 
         <record id="product_supplierinfo_43" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_9"/>
+            <field name="product_tmpl_id" ref="product_product_9_product_template"/>
             <field name="name" ref="base.res_partner_8"/>
             <field name="delay">4</field>
             <field name="min_qty">0</field>
         </record>
 
         <record id="product_supplierinfo_44" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_27"/>
+            <field name="product_tmpl_id" ref="product_product_27_product_template"/>
             <field name="name" ref="base.res_partner_1"/>
             <field name="delay">10</field>
             <field name="min_qty">0</field>
         </record>
 
         <record id="product_supplierinfo_45" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_12"/>
+            <field name="product_tmpl_id" ref="product_product_12_product_template"/>
             <field name="name" ref="base.res_partner_16"/>
             <field name="delay">3</field>
             <field name="min_qty">0</field>
         </record>
 
         <record id="product_supplierinfo_46" model="product.supplierinfo">
-            <field name="product_tmpl_id" ref="product_template_37"/>
+            <field name="product_tmpl_id" ref="product_product_37_product_template"/>
             <field name="name" ref="base.res_partner_22"/>
             <field name="delay">5</field>
             <field name="min_qty">0</field>
index 6983fe4..1b059c4 100644 (file)
 <?xml version="1.0" encoding="utf-8"?>
 <openerp>
     <data>
-        <menuitem id="prod_config_main" name="Products" parent="base.menu_base_config" sequence="70"/>
+        <menuitem id="base.menu_product" name="Product Variants" parent="base.menu_base_partner" sequence="9"/>
 
-        <record id="product_search_form_view" model="ir.ui.view">
-            <field name="name">product.search.form</field>
-            <field name="model">product.product</field>
+        <!-- templates -->
+
+        <record id="product_template_search_view" model="ir.ui.view">
+            <field name="name">product.template.search</field>
+            <field name="model">product.template</field>
             <field name="arch" type="xml">
                 <search string="Product">
-                   <field name="name" string="Product" filter_domain="['|','|',('name','ilike',self),('default_code','ilike',self),('variants','ilike',self)]"/>
-                   <filter string="Services" icon="terp-accessories-archiver" domain="[('type','=','service')]"/>
-                   <filter string="Consumable" name="consumable" icon="terp-accessories-archiver" domain="[('type','=','consu')]" help="Consumable products"/>
-                   <separator/>
-                   <filter string="Can be Sold" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/>
-                   <field name="categ_id" operator="child_of"/>
-                   <group expand="0" string="Context...">
-                       <field name="pricelist_id" widget="selection" context="{'pricelist': self}" filter_domain="[]" groups="product.group_sale_pricelist"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
-                       <field name="company_id" groups="base.group_multi_company"/>
-                   </group>
-                   <group  expand='0' string='Group by...'>
-                       <filter string='Category' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'categ_id'}"/>
+                    <field name="name" string="Product"/>
+                    <filter string="Services" icon="terp-accessories-archiver" domain="[('type','=','service')]"/>
+                    <filter string="Consumable" name="consumable" icon="terp-accessories-archiver" domain="[('type','=','consu')]" help="Consumable products"/>
+                    <separator/>
+                    <filter string="Can be Sold" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/>
+                    <field string="Product Variant" name="product_variant_ids" filter_domain="['|', ('product_variant_ids.name','ilike',self), ('product_variant_ids.variant_ids.name','ilike',self)]"/>
+                    <field name="company_id"/>
+                    <field name="pricelist_id" widget="selection" context="{'pricelist': self}" filter_domain="[]" groups="product.group_sale_pricelist"/> <!-- Keep widget=selection on this field to pass numeric `self` value, which is not the case for regular m2o widgets! -->
+                    <group  expand='0' string='Group by...'>
                        <filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'uom_id'}"/>
                        <filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}"/>
-                       <filter string='Company' icon="terp-go-home" domain="[]" context="{'group_by' : 'company_id'}" groups="base.group_multi_company"/>
-                       <filter string='Template' name="template_id" domain="[]" context="{'group_by' : 'product_tmpl_id'}" groups="product.group_product_variant"/>
-                   </group>
+                    </group>
                 </search>
             </field>
         </record>
 
-        <record id="product_product_tree_view" model="ir.ui.view">
-            <field name="name">product.product.tree</field>
-            <field name="model">product.product</field>
-            <field eval="7" name="priority"/>
+        <record id="product_template_tree_view" model="ir.ui.view">
+            <field name="name">product.template.product.tree</field>
+            <field name="model">product.template</field>
             <field name="arch" type="xml">
-                <tree string="Products">
-                    <field name="default_code"/>
+                <tree string="Product">
                     <field name="name"/>
-                    <field name="variants" groups="product.group_product_variant"/>
-                    <field name="categ_id" invisible="1"/>
-                    <field name="type" invisible="1"/>
-                    <field name="uom_id" string="Unit of Measure" groups="product.group_uom"/>
-                    <field name="lst_price"/>
-                    <field name="price" invisible="not context.get('pricelist',False)"/>
-                    <field name="standard_price" invisible="1"/>
+                    <field name="categ_id"/>
+                    <field name="type"/>
                     <field name="state"/>
-                    <field name="company_id" groups="base.group_multi_company" invisible="1"/>
-                    <field name="product_tmpl_id" invisible="1"/>
+                    <field name="uom_id" invisible="1"/>
                 </tree>
             </field>
         </record>
 
-        <record id="product_normal_form_view" model="ir.ui.view">
-            <field name="name">product.normal.form</field>
-            <field name="model">product.product</field>
-            <field eval="7" name="priority"/>
+        <record id="product_template_form_view" model="ir.ui.view">
+            <field name="name">product.template.product.form</field>
+            <field name="model">product.template</field>
             <field name="arch" type="xml">
                 <form string="Product" version="7.0">
+                    <field name="is_product_variant" invisible="1"/>
                     <sheet>
-                        <field name="is_only_child" invisible="1"/>
-                        <field name="image_medium" widget="image" class="oe_avatar oe_left"
-                            attrs="{'readonly': [('is_only_child', '=', False)]}"/>
-                        <div class="oe_title">
-                            <div class="oe_edit_only">
-                                <label for="name" name='label_name' string="Product Name"
-                                    attrs="{'invisible': [('is_only_child', '=', False)]}"/>
-                                <label for="name" name='label_name' string="Product Template"
-                                    attrs="{'invisible': [('is_only_child', '=', True)]}"/>
+                        <field name="id" invisible="True"/>
+                        <div class="oe_right oe_button_box" style="width: 300px;" name="buttons">
+                        </div>
+                        <div class="oe_left" style="width: 500px;">
+                            <field name="image_medium" widget="image" class="oe_avatar oe_left"/>
+                            <div class="oe_title" style="width: 390px;">
+                                <label class="oe_edit_only" for="name" string="Product Name"/>
+                                <h1><field name="name" class="oe_inline"/></h1>
                             </div>
-                            <h1>
-                                <field name="name" class="oe_inline"
-                                    attrs="{'required': [('is_only_child', '=', True)],
-                                            'invisible': [('is_only_child', '=', False)]}"/>
-                                <field name="product_tmpl_id" class="oe_inline" readonly="1" required="0"
-                                    attrs="{'invisible': [('is_only_child', '=', True)]}"/>
-                                <span groups="product.group_product_variant"
-                                    attrs="{'invisible': [('is_only_child', '=', True), ('variants', '=', False)]}">
-                                    - <field name="variants" placeholder="Variant Name" class="oe_inline"/>
-                                </span>
-                            </h1>
-                            <span attrs="{'invisible': [('is_only_child', '=', True)]}">
-                                <p>Generic product settings are managed on
-                                    <button name="open_product_template" type="object" string="the template" class="oe_link"/>
-                                </p>
-                            </span>
-                            <label for="categ_id" class="oe_edit_only"/>
-                            <h2><field name="categ_id" attrs="{'readonly': [('is_only_child', '=', False)]}"/></h2>
-                            <label for="public_categ_id" class="oe_edit_only"/>
-                            <h3><field name="public_categ_id" attrs="{'readonly': [('is_only_child', '=', False)]}"/></h3>
-                            <div name="options" groups="base.group_user">
-                                <field name="sale_ok"/>
-                                <label for="sale_ok"/>
+                            <div class="oe_left" name="options" groups="base.group_user">
+                                <div>
+                                    <field name="sale_ok"/>
+                                    <label for="sale_ok"/>
+                                </div>
                             </div>
                         </div>
-                        <div class="oe_right oe_button_box" name="buttons">
-                        </div>
                         <notebook>
                             <page string="Information">
-                                <group>
+                                <group colspan="4">
                                     <group>
-                                        <field name="type"
-                                            attrs="{'invisible': [('is_only_child', '=', False)]}"/>
-                                        <field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" groups="product.group_uom"
-                                            attrs="{'invisible': [('is_only_child', '=', False)]}"/>
-                                        <field name="lst_price" string="Public Sale Price"
-                                            attrs="{'readonly': [('is_only_child', '=', False)]}"/>
-                                        <field name="price_extra"
-                                            attrs="{'invisible': [('is_only_child', '=', True)]}"/>
+                                        <field name="type"/>
+                                        <field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" groups="product.group_uom"/>
+                                        <field name="lst_price"/>
                                     </group>
                                     <group>
+                                        <field name="active"/>
+                                        <field name="ean13"/>
                                         <field name="default_code"/>
-                                        <label for="ean13"/>
-                                        <div name="ean">
-                                            <field name="ean13" placeholder="e.g. 5901234123457"/>
-                                        </div>
-                                        <field name="company_id" groups="base.group_multi_company" widget="selection"
-                                            attrs="{'invisible': [('is_only_child', '=', False)]}"/>
-                                        <field name="active" />
                                     </group>
                                 </group>
-                                <field name="description" placeholder="describe the product characteristics..."
-                                    attrs="{'readonly': [('is_only_child', '=', False)]}"/>
+                                <group colspan="4">
+                                    <field name="company_id" groups="base.group_multi_company" widget="selection"/>
+                                </group>
+                                <field name="description" placeholder="describe the product characteristics..."/>
                             </page>
                             <page string="Procurements" groups="base.group_user">
                                 <group name="procurement">
                                     <group name="general">
-                                        <field name="standard_price" attrs="{'readonly': [('is_only_child', '=', False)]}"/>
+                                        <field name="standard_price"/>
                                     </group>
                                     <group name="procurement_uom" groups="product.group_uom" string="Purchase">
-                                        <field name="uom_po_id"
-                                            attrs="{'readonly': [('is_only_child', '=', False)]}"/>
+                                        <field name="uom_po_id"/>
                                     </group>
                                 </group>
+                                <separator string="Suppliers"/>
+                                <field name="seller_ids"/>
                                 <separator string="Description for Suppliers"/>
                                 <field name="description_purchase" placeholder="This note will be displayed on requests for quotation..."/>
                             </page>
-                            <page string="Inventory" groups="base.group_user">
+                            <page string="Inventory">
                                 <group name="inventory">
-                                    <group name="status" string="Status">
-                                        <field name="state"
-                                            attrs="{'readonly': [('is_only_child', '=', False)]}"/>
-                                        <field name="product_manager"
-                                            attrs="{'readonly': [('is_only_child', '=', False)]}"
-                                            context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_manager']}"/>
+                                     <group name="status" string="Status">
+                                        <field name="state"/>
+                                        <field name="product_manager"/>
                                     </group>
-                                    <group name="Weights" groups="product.group_stock_packaging" string="Weights">
-                                        <field digits="(14, 3)" name="volume"
-                                            attrs="{'readonly': ['|', ('type','=','service'), ('is_only_child', '=', False)]}"/>
-                                        <field name="weight"
-                                            attrs="{'readonly': ['|', ('type','=','service'), ('is_only_child', '=', False)]}"/>
-                                        <field name="weight_net" 
-                                            attrs="{'readonly': ['|', ('type','=','service'), ('is_only_child', '=', False)]}"/>
+                                    <group name="weight" string="Weights">
+                                        <field digits="(14, 3)" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
+                                        <field digits="(14, 3)" name="weight" attrs="{'readonly':[('type','=','service')]}"/>
+                                        <field digits="(14, 3)" name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
                                     </group>
                                 </group>
                             </page>
                             <page string="Sales" attrs="{'invisible':[('sale_ok','=',False)]}">
                                 <group name="sale">
-                                    <group string="Sale Conditions">
+                                    <group name="sale_condition" string="Sale Conditions" colspan="3">
                                         <label for="warranty"/>
-                                        <div attrs="{'readonly': [('is_only_child', '=', False)]}">
+                                        <div>
                                             <field name="warranty" class="oe_inline"/> months
                                         </div>
                                     </group>
                                     <group groups="product.group_uos" string="Unit of Measure">
-                                        <field name="uos_id"
-                                            attrs="{'readonly': [('is_only_child', '=', False)]}"/>
-                                        <field name="uos_coeff"
-                                            attrs="{'readonly': [('is_only_child', '=', False)]}"/>
-                                        <field name="mes_type"
-                                            attrs="{'readonly': [('is_only_child', '=', False)]}"/>
+                                        <field name="uos_id"/>
+                                        <field name="uos_coeff"/>
+                                        <field name="mes_type"/>
                                     </group>
                                 </group>
-                                <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"/>
-                                            <field name="sequence" invisible="1"/>
-                                            <newline/>
-                                            <field name="qty"/>
-                                            <field name="ul"/>
-                                            <separator colspan="4" string="Palletization"/>
-                                            <field name="ul_qty"/>
-                                            <field name="ul_container" domain="[('type', '=', 'pallet')]" context="{'default_type': 'pallet'}"/>
-                                            <field name="rows"/>
-                                            <field name="weight"/>
-                                        </group>
-                                        <separator colspan="4" string="Description"/>
-                                        <field name="name"/>
-                                    </form>
-                                </field>
+                                <group name="website_and_pos" col="2">
+                                </group>
                                 <separator string="Description for Quotations"/>
-                                <field name="description_sale" placeholder="note to be displayed on quotations..."
-                                    attrs="{'readonly': [('is_only_child', '=', False)]}"/>
+                                <field name="description_sale" placeholder="note to be displayed on quotations..."/>
+                            </page>
+                            <page name="variants" string="Variants">
+                                <field name="variant_ids" widget="one2many_list">
+                                    <tree string="Variants" editable="bottom">
+                                        <field name="attribute_id"/>
+                                        <field name="value_ids" widget="many2many_tags" domain="[('attribute_id', '=', attribute_id)]" context="{'default_attribute_id': attribute_id}"/>
+                                    </tree>
+                                </field>
                             </page>
                         </notebook>
                     </sheet>
             </field>
         </record>
 
-        <!-- Product Kanban View  -->
-
-        <record model="ir.ui.view" id="product.product_kanban_view">
-            <field name="name">Product Kanban</field>
-            <field name="model">product.product</field>
+        <record id="product_template_kanban_view" model="ir.ui.view">
+            <field name="name">Product.template.product.kanban</field>
+            <field name="model">product.template</field>
             <field name="arch" type="xml">
                 <kanban>
-                    <field name="color"/>
-                    <field name="type"/>
-                    <field name="list_price"/>
+                    <field name="image_small"/>
+                    <field name="lst_price"/>
                     <templates>
                         <t t-name="kanban-box">
                             <div class="oe_kanban_vignette oe_semantic_html_override">
-                                <a type="open"><img t-att-src="kanban_image('product.product', 'image_small', record.id.value)" class="oe_kanban_image"/></a>
+                                <a type="open"><img t-att-src="kanban_image('product.template', 'image_small', record.id.value)" class="oe_kanban_image"/></a>
                                 <div class="oe_kanban_details">
                                     <h4>
                                         <a type="open">
-                                             <t t-if="record.code.raw_value">[<field name="code"/>]</t> <field name="name"/> <t t-if="record.variants.raw_value">(<field name="variants"/>)</t>
+                                             <field name="name"/> 
                                         </a>
                                     </h4>
                                     <div name="tags"/>
             </field>
         </record>
 
-        <record id="product_normal_action" model="ir.actions.act_window">
+        <record id="product_template_action" model="ir.actions.act_window">
             <field name="name">Products</field>
             <field name="type">ir.actions.act_window</field>
-            <field name="res_model">product.product</field>
+            <field name="res_model">product.template</field>
+            <field name="view_mode">kanban,tree,form</field>
+            <field name="view_type">form</field>
+            <field name="view_id" ref="product_template_kanban_view"/>
+        </record>
+
+        <menuitem action="product_template_action"
+            id="menu_product_template_action"
+            parent="base.menu_product" sequence="1" />
+
+        <!-- variants -->
+
+        <record id="variants_template_tree_view" model="ir.ui.view">
+            <field name="name">variants.template.tree</field>
+            <field name="model">product.attribute.value</field>
+            <field name="arch" type="xml">
+                <tree string="Variant Values" editable="top">
+                    <field name="sequence" widget="handle"/>
+                    <field name="attribute_id"/>
+                    <field name="name"/>
+                    <field name="price_extra"/>
+                </tree>
+            </field>
+        </record>
+        <record id="variants_template_action" model="ir.actions.act_window">
+            <field name="name">Variant Values</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">product.attribute.value</field>
+            <field name="view_mode">tree</field>
             <field name="view_type">form</field>
+            <field name="domain">[('product_ids.product_tmpl_id', '=', active_id)]</field>
+            <field name="context">{'default_product_tmpl_id': active_id}</field>
+        </record>
+
+        <!-- product product -->
+
+        <menuitem id="prod_config_main" name="Product Variants" parent="base.menu_base_config" sequence="70" groups="base.group_no_one"/>
+
+        <record id="product_search_form_view" model="ir.ui.view">
+            <field name="name">product.product.search</field>
+            <field name="model">product.product</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="product.product_template_search_view"/>
+            <field name="arch" type="xml">
+                <field name="name" position="replace">
+                   <field name="name" string="Product" filter_domain="['|',('default_code','ilike',self),('name','ilike',self)]"/>
+                </field>
+                <field name="product_variant_ids" position="replace">
+                    <field name="variant_ids"/>
+                </field>
+                <field name="name" position="after">
+                   <field name="product_tmpl_id" string="Product Template"/>
+                </field>
+                <xpath expr="//group[@string='Group by...']" position="inside">
+                    <filter string='Product Template' name="template_id" domain="[]" context="{'group_by' : 'product_tmpl_id'}"/>
+                </xpath>
+            </field>
+        </record>
+
+        <record id="product_product_tree_view" model="ir.ui.view">
+            <field name="name">product.product.tree</field>
+            <field name="model">product.product</field>
+            <field eval="7" name="priority"/>
+            <field name="arch" type="xml">
+
+                <tree string="Product Variants">
+                    <field name="default_code"/>
+                    <field name="name"/>
+                    <field name="variant_ids" widget="many2many_tags"/>
+                    <field name="lst_price"/>
+                    <field name="price" invisible="not context.get('pricelist',False)"/>
+                    <field name="uom_id"/>
+                    <field name="ean13"/>
+                    <field name="state" invisible="1"/>
+                    <field name="product_tmpl_id" invisible="1"/>
+                </tree>
+
+            </field>
+        </record>
+
+        <record id="product_normal_form_view" model="ir.ui.view">
+            <field name="name">product.product.form</field>
+            <field name="model">product.product</field>
+            <field name="mode">primary</field>
+            <field eval="7" name="priority"/>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
+            <field name="arch" type="xml">
+                <form position="attributes">
+                    <attribute name="string">Product Variant</attribute>
+                </form>
+                <field name="name" position="replace">
+                    <field name="name" attrs="{'invisible': [('id', '!=', False)]}"/>
+                    <field name="product_tmpl_id" class="oe_inline" readonly="1" attrs="{'invisible': [('id', '=', False)]}"/>
+                </field>
+                <xpath expr="//div[@class='oe_title']" position="inside">
+                    <field name="variant_ids" widget="many2many_tags"/>
+                </xpath>
+                <page name="variants" position="replace">
+                </page>
+            </field>
+        </record>
+
+        <record id="product_kanban_view" model="ir.ui.view">
+            <field name="name">Product Kanban</field>
+            <field name="model">product.product</field>
+            <field name="mode">primary</field>
+            <field name="inherit_id" ref="product.product_template_kanban_view"/>
+            <field name="arch" type="xml">
+                <field name="name" position="after">
+                    <field name="variant_ids"/>
+                </field>
+                <xpath expr="//img[@class='oe_kanban_image']" position="replace">
+                    <img t-att-src="kanban_image('product.product', 'image_small', record.id.value)" class="oe_kanban_image"/>
+                </xpath>
+            </field>
+        </record>
+
+        <!--  -->
+
+        <record id="product_normal_action" model="ir.actions.act_window">
+            <field name="name">Product Variants</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">product.product</field>
             <field name="view_mode">tree,form,kanban</field>
-            <field name="view_id" ref="product_product_tree_view"/>
+            <field name="view_type">form</field>
             <field name="search_view_id" ref="product_search_form_view"/>
             <field name="help" type="html">
               <p class="oe_view_nocontent_create">
               </p>
             </field>
         </record>
-        <record id="product_normal_action_sell" model="ir.actions.act_window">
-            <field name="name">Products</field>
+
+        <!--  -->
+
+        <record id="product_variant_action" model="ir.actions.act_window">
+            <field name="name">Product Variants</field>
             <field name="type">ir.actions.act_window</field>
             <field name="res_model">product.product</field>
-            <field name="view_mode">kanban,tree,form</field>
+            <field name="view_mode">tree,form,kanban</field>
             <field name="view_type">form</field>
-            <field name="context">{"search_default_filter_to_sell":1}</field>
-            <field name="view_id" ref="product_product_tree_view"/>
+            <field name="context">{'search_default_product_tmpl_id': [active_id], 'default_product_tmpl_id': active_id}</field>
             <field name="search_view_id" ref="product_search_form_view"/>
             <field name="help" type="html">
               <p class="oe_view_nocontent_create">
                 Click to define a new product.
               </p><p>
-                You must define a product for everything you sell, whether it's
-                a physical product, a consumable or a service you offer to
-                customers.
-              </p><p>
-                The product form contains information to simplify the sale
-                process: price, notes in the quotation, accounting data,
-                procurement methods, etc.
+                You must define a product for everything you buy or sell,
+                whether it's a physical product, a consumable or service.
               </p>
             </field>
         </record>
 
-        <record id="open_view_product_tree1" model="ir.actions.act_window.view">
-            <field name="sequence" eval="2"/>
-            <field name="view_mode">tree</field>
-            <field name="view_id" ref="product_product_tree_view"/>
-            <field name="act_window_id" ref="product_normal_action_sell"/>
-        </record>
-
-        <record id="open_view_product_form1" model="ir.actions.act_window.view">
-            <field name="sequence" eval="3"/>
-            <field name="view_mode">form</field>
-            <field name="view_id" ref="product_normal_form_view"/>
-            <field name="act_window_id" ref="product_normal_action_sell"/>
+        <record id="product_template_form_view_variant_button" model="ir.ui.view">
+            <field name="name">product.template.form</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
+            <field name="arch" type="xml">
+                <field name="variant_ids" position="before">
+                    <div class="oe_right">
+                        <button class="oe_inline oe_stat_button" string="Variant Prices"  name="%(product.variants_template_action)d" type="action" icon="fa-strikethrough"/>
+                        <button class="oe_inline oe_stat_button" name="%(product.product_variant_action)d" type="action" icon="fa-sitemap">
+                            <field string="List of Variants" name="product_variant_count" widget="statinfo" />
+                        </button>
+                    </div>
+                </field>
+            </field>
         </record>
 
-        <record id="open_view_product_kanban1" model="ir.actions.act_window.view">
-            <field name="sequence" eval="1"/>
-            <field name="view_mode">kanban</field>
-            <field name="view_id" ref="product_kanban_view"/>
-            <field name="act_window_id" ref="product_normal_action_sell"/>
+        <record id="product_template_kanban_view_variant_button" model="ir.ui.view">
+            <field name="name">product.template.form</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_kanban_view"/>
+            <field name="arch" type="xml">
+                <field name="lst_price" position="after">
+                    <field name="is_product_variant"/>
+                    <field name="product_variant_count"/>
+                    <field name="product_variant_ids"/>
+                </field>
+                <h4 position="after">
+                    <a name="%(product.product_variant_action)d" type="action" t-if="!record.is_product_variant.raw_value &amp; record.product_variant_count.raw_value&gt;1">
+                        <t t-esc="record.product_variant_count.value"/> Variants
+                    </a>
+                </h4>
+            </field>
         </record>
 
-        <menuitem id="base.menu_product" name="Products" parent="base.menu_base_partner" sequence="9"/>
-        <menuitem id="product.menu_products" action="product.product_normal_action_sell" parent="base.menu_product" sequence="1"/>
+        <!--  -->
 
-        <record id="product_normal_action_puchased" model="ir.actions.act_window">
-            <field name="name">Products</field>
+        <record id="product_normal_action_sell" model="ir.actions.act_window">
+            <field name="name">Product Variants</field>
             <field name="type">ir.actions.act_window</field>
             <field name="res_model">product.product</field>
-            <field name="view_type">form</field>
             <field name="view_mode">kanban,tree,form</field>
-            <field name="context">{"search_default_filter_to_purchase":1}</field>
-            <field name="view_id" ref="product_kanban_view"/>
+            <field name="view_type">form</field>
+            <field name="context">{"search_default_filter_to_sell":1}</field>
+            <field name="view_id" ref="product_product_tree_view"/>
             <field name="search_view_id" ref="product_search_form_view"/>
             <field name="help" type="html">
               <p class="oe_view_nocontent_create">
                 Click to define a new product.
               </p><p>
-                You must define a product for everything you purchase, whether
-                it's a physical product, a consumable or services you buy to
-                subcontractants.
+                You must define a product for everything you sell, whether it's
+                a physical product, a consumable or a service you offer to
+                customers.
               </p><p>
-                The product form contains detailed information to improve the
-                purchase process: prices, procurement logistics, accounting data,
-                available suppliers, etc.
+                The product form contains information to simplify the sale
+                process: price, notes in the quotation, accounting data,
+                procurement methods, etc.
               </p>
             </field>
         </record>
 
+        <menuitem id="product.menu_products" action="product.product_normal_action_sell" parent="base.menu_product" groups="base.group_no_one" sequence="10"/>
+
         <record id="product_category_search_view" model="ir.ui.view">
             <field name="name">product.category.search</field>
             <field name="model">product.category</field>
 
 
         <record id="product_normal_action_tree" model="ir.actions.act_window">
-            <field name="name">Products</field>
+            <field name="name">Product Variants</field>
             <field name="type">ir.actions.act_window</field>
             <field name="res_model">product.product</field>
             <field name="view_type">form</field>
             <field eval="'ir.actions.act_window,%d'%product_normal_action_tree" name="value"/>
         </record>
 
-
-        <!-- Product Public Categories -->
-        <record id="product_public_category_form_view" model="ir.ui.view">
-            <field name="name">product.public.category.form</field>
-            <field name="model">product.public.category</field>
-            <field name="arch" type="xml">
-                <form string="Pos/Public Categories" version="7.0">
-                    <sheet>
-                        <field name="image_medium" widget='image' class="oe_avatar oe_right"/>
-                        <div class="oe_left">
-                            <group>
-                                <field name="name"/>
-                                <field name="parent_id"/>
-                                <field name="sequence"/>
-                            </group>
-                        </div>
-                    </sheet>
-                </form>
-            </field>
-        </record>
-        <record id="product_public_category_tree_view" model="ir.ui.view">
-            <field name="name">product.public.category.tree</field>
-            <field name="model">product.public.category</field>
-            <field name="field_parent" eval="False"/>
-            <field name="arch" type="xml">
-                <tree string="Product Product Categories">
-                    <field name="sequence" invisible="1"/>
-                    <field name="complete_name"/>
-                </tree>
-            </field>
-        </record>
-        <record id="product_public_category_action" model="ir.actions.act_window">
-            <field name="name">Pos/Public Product Categories</field>
-            <field name="type">ir.actions.act_window</field>
-            <field name="res_model">product.public.category</field>
-            <field name="view_type">form</field>
-            <field name="view_mode">tree,form</field>
-            <field name="view_id" eval="False"/>
-            <field name="help" type="html">
-              <p class="oe_view_nocontent_create">
-                Click to define a new category.
-              </p><p>
-                Categories are used to browse your products through the
-                touchscreen interface.
-              </p><p>
-                If you put a photo on the category, the layout of the
-                touchscreen interface will automatically. We suggest not to put
-                a photo on categories for small (1024x768) screens.
-              </p>
-            </field>
-        </record>
-        <menuitem action="product_public_category_action" id="menu_product_public_category" parent="prod_config_main" sequence="10" />
-        <!-- END -->
-
         <!-- Unit of Measure -->
 
         <record id="product_uom_tree_view" model="ir.ui.view">
             </field>
         </record>
 
-        <!-- Variants -->
-        <record id="product_variant_search_form_view" model="ir.ui.view">
-            <field name="name">product.variant.search.form</field>
-            <field name="model">product.product</field>
-            <field name="arch" type="xml">
-                <search string="Product Variant">
-                   <field name="product_tmpl_id"/>
-                   <field name="name" string="Product" filter_domain="['|','|',('name','ilike',self),('default_code','ilike',self),('variants','ilike',self)]"/>
-                   <group  expand='0' string='Group by...'>
-                       <filter string='Template' name="template_id" domain="[]" context="{'group_by' : 'product_tmpl_id'}"/>
-                   </group>
-                </search>
-            </field>
-        </record>
-        <record id="product_variant_form_view" model="ir.ui.view">
-            <field name="name">product.variant.form</field>
-            <field name="model">product.product</field>
-            <field name="arch" type="xml">
-                <form string="Product Variant" version="7.0">
-                    <group col="4">
-                        <field name="product_tmpl_id"/>
-                        <field name="active"/>
-                        <field name="variants" required="1"/>
-                        <field name="default_code"/>
-                        <field name="price_margin"/>
-                        <field name="price_extra"/>
-                    </group>
-                </form>
-            </field>
-        </record>
-        <record id="product_variant_tree_view" model="ir.ui.view">
-            <field name="name">product.variant.tree</field>
-            <field name="model">product.product</field>
-            <field name="arch" type="xml">
-                <tree string="Product Variant">
-                    <field name="product_tmpl_id"/>
-                    <field name="variants"/>
-                    <field name="default_code"/>
-                    <field name="price_margin"/>
-                    <field name="price_extra"/>
-                    <field name="company_id" invisible="1"/>
-                    <field name="type" invisible="1"/>
-                    <field name="uom_id" invisible="1"/>
-                    <field name="categ_id" invisible="1"/>
-                </tree>
-            </field>
-        </record>
-        <record id="product_variant_action" model="ir.actions.act_window">
-            <field name="name">Product Variants</field>
-            <field name="type">ir.actions.act_window</field>
-            <field name="domain">[('variants','!=', '')]</field>
-            <field name="res_model">product.product</field>
-            <field name="view_type">form</field>
-            <field name="view_mode">tree,form,kanban</field>
-            <field name="view_id" ref="product_variant_tree_view"/>
-            <field name="search_view_id" ref="product_variant_search_form_view"/>
-            <field name="help" type="html">
-              <p class="oe_view_nocontent_create">
-                Click to define a new variant of product.
-              </p>
-            </field>
-        </record>
-        <record id="tree_view_product_variant" model="ir.actions.act_window.view">
-            <field name="sequence" eval="10"/>
-            <field name="view_mode">tree</field>
-            <field name="view_id" ref="product_variant_tree_view"/>
-            <field name="act_window_id" ref="product_variant_action"/>
-        </record>
-        <record id="form_view_product_variant" model="ir.actions.act_window.view">
-            <field name="sequence" eval="20"/>
-            <field name="view_mode">form</field>
-            <field name="view_id" ref="product_variant_form_view"/>
-            <field name="act_window_id" ref="product_variant_action"/>
-        </record>
-        <menuitem action="product.product_variant_action" id="product.menu_variant_product" parent="prod_config_main" sequence="4" groups="product.group_product_variant"/>
-
-        <!-- templates -->
-
-        <record id="product_template_search_view" model="ir.ui.view">
-            <field name="name">product.template.search</field>
-            <field name="model">product.template</field>
-            <field name="arch" type="xml">
-                <search string="Product Template">
-                    <field name="name" string="Product"/>
-                    <filter string="Services" icon="terp-accessories-archiver" domain="[('type','=','service')]"/>
-                    <filter string="Consumable" name="consumable" icon="terp-accessories-archiver" domain="[('type','=','consu')]" help="Consumable products"/>
-                    <separator/>
-                    <filter string="Can be Sold" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/>
-                    <field name="categ_id"/>
-                    <group  expand='0' string='Group by...'>
-                       <filter string='Category' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'categ_id'}"/>
-                       <filter string='Default Unit of Measure' icon="terp-mrp" domain="[]" context="{'group_by' : 'uom_id'}"/>
-                       <filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}"/>
-                    </group>
-                </search>
-            </field>
-        </record>
-
-        <record id="product_template_tree_view" model="ir.ui.view">
-            <field name="name">product.template.product.tree</field>
-            <field name="model">product.template</field>
-            <field name="arch" type="xml">
-                <tree string="Product Template">
-                    <field name="name"/>
-                    <field name="categ_id"/>
-                    <field name="type"/>
-                    <field name="state"/>
-                    <field name="uom_id" invisible="1"/>
-                </tree>
-            </field>
-        </record>
-
-        <record id="product_template_form_view" model="ir.ui.view">
-            <field name="name">product.template.product.form</field>
-            <field name="model">product.template</field>
-            <field name="arch" type="xml">
-                <form string="Product Template" version="7.0">
-                    <sheet>
-                        <field name="image_medium" widget="image" class="oe_avatar oe_left"/>
-                        <div class="oe_title">
-                            <div class="oe_edit_only">
-                                <label for="name" string="Product Name"/>
-                            </div>
-                            <h1>
-                                <field name="name"/>
-                            </h1>
-                            <label for="categ_id" class="oe_edit_only"/>
-                            <h2><field name="categ_id"/></h2>
-                            <label for="public_categ_id" class="oe_edit_only"/>
-                            <h3><field name="public_categ_id"/></h3>
-                            <div name="options" groups="base.group_user">
-                                <field name="sale_ok"/>
-                                <label for="sale_ok"/>
-                            </div>
-                        </div>
-                        <notebook>
-                            <page string="Information">
-                                <group  colspan="4">
-                                    <group>
-                                        <field name="type"/>
-                                        <field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" groups="product.group_uom"/>
-                                        <field name="list_price"/>
-                                    </group>
-                                    <group>
-                                        <field name="company_id" groups="base.group_multi_company" widget="selection"/>
-                                    </group>
-                                </group>
-                                <group colspan="4" string="Product Variants" groups="product.group_product_variant">
-                                    <field colspan="4" name="product_variant_ids" nolabel="1" >
-                                        <tree string="Product Variants" editable="bottom">
-                                            <field name="variants" required="1"/>
-                                            <field name="price_margin" string="Variant Price Margin"/>
-                                            <field name="price_extra"/>
-                                            <field name="lst_price" string="Sale Price" readonly="1"/>
-                                        </tree>
-                                    </field>
-                                </group>
-                                <field name="description" placeholder="describe the product characteristics..."/>
-                            </page>
-                            <page string="Procurements" groups="base.group_user">
-                                <group name="procurement">
-                                    <group name="general">
-                                        <field name="standard_price" attrs="{'readonly': [('is_only_child', '=', False)]}"/>
-                                    </group>
-                                    <group name="procurement_uom" groups="product.group_uom" string="Purchase">
-                                        <field name="uom_po_id"/>
-                                    </group>
-                                </group>
-                                <separator string="Suppliers"/>
-                                <field name="seller_ids"/>
-                                <separator string="Description for Suppliers"/>
-                                <field name="description_purchase" placeholder="This note will be displayed on requests for quotation..."/>
-                            </page>
-                            <page string="Inventory">
-                                <group name="inventory">
-                                     <group name="status" string="Status">
-                                        <field name="state"/>
-                                        <field name="product_manager"/>
-                                    </group>
-                                    <group name ="weight" string="Weights">
-                                        <field digits="(14, 3)" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
-                                        <field digits="(14, 3)" name="weight" attrs="{'readonly':[('type','=','service')]}"/>
-                                        <field digits="(14, 3)" name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
-                                    </group>
-                                </group>
-                            </page>
-                            <page string="Sales" attrs="{'invisible':[('sale_ok','=',False)]}">   
-                                <group name="sale">
-                                    <group name="sale_condition" string="Sale Conditions">
-                                        <label for="warranty"/>
-                                        <div>
-                                            <field name="warranty" class="oe_inline" style="vertical-align:baseline"/> months
-                                        </div>
-                                    </group>
-                                    <group groups="product.group_uos" string="Unit of Measure">
-                                        <field name="uos_id"/>
-                                        <field name="uos_coeff"/>
-                                        <field name="mes_type"/>
-                                    </group>
-                                </group>
-                                <separator string="Description for Quotations"/>
-                                <field name="description_sale" placeholder="note to be displayed on quotations..."/>
-                            </page>
-                        </notebook>
-                    </sheet>
-                    <div class="oe_chatter">
-                        <field name="message_follower_ids" widget="mail_followers"/>
-                        <field name="message_ids" widget="mail_thread"/>
-                    </div>
-                </form>
-            </field>
-        </record>
-
-        <record model="ir.ui.view" id="product_template_kanban_view">
-            <field name="name">Product Template Kanban</field>
-            <field name="model">product.template</field>
-            <field name="arch" type="xml">
-                <kanban>
-                    <field name="image_small"/>
-                    <field name="list_price"/>
-                    <templates>
-                        <t t-name="kanban-box">
-                            <div class="oe_kanban_vignette oe_semantic_html_override">
-                                <a type="open"><img t-att-src="kanban_image('product.template', 'image_small', record.id.value)" class="oe_kanban_image"/></a>
-                                <div class="oe_kanban_details">
-                                    <h4>
-                                        <a type="open">
-                                             <field name="name"/> 
-                                        </a>
-                                    </h4>
-                                    <div name="tags"/>
-                                    <ul>
-                                        <li>Price: <field name="list_price"></field></li>
-                                    </ul>
-                                </div>
-                            </div>
-                        </t>
-                    </templates>
-                </kanban>
-            </field>
-        </record>
-
-        <record id="product_template_action" model="ir.actions.act_window">
-            <field name="name">Templates</field>
-            <field name="type">ir.actions.act_window</field>
-            <field name="res_model">product.template</field>
-            <field name="view_mode">kanban,tree,form</field>
-            <field name="view_type">form</field>
-            <field name="view_id" ref="product_template_kanban_view"/>
-        </record>
-
-        <menuitem action="product_template_action"
-            id="menu_product_template_action"
-            parent="base.menu_product" sequence="20" 
-            groups="product.group_product_variant"/>
-
     </data>
 </openerp>
index beb8d22..74fd481 100644 (file)
@@ -3,7 +3,7 @@
     <lot-line type="fields" name="id">
         <code type="field" name="code"/>
         <product type="field" name="name"/>
-        <variant type="field" name="variants"/>
+        <variant type="field" name="variant_ids"/>
         <price type="field" name="list_price"/>
         <ean13 type="field" name="ean13"/>
         <currency type="field" name="company_id.currency_id.name"/>
index 7919e3a..e8c9bfd 100644 (file)
@@ -19,5 +19,11 @@ access_product_price_history_employee,prices.history employee,model_product_pric
 access_product_template_sale_manager,product.template salemanager,model_product_template,base.group_sale_manager,1,1,1,1\r
 access_product_product_sale_manager,product.product salemanager,model_product_product,base.group_sale_manager,1,1,1,1\r
 access_product_category_sale_manager,product.category salemanager,product.model_product_category,base.group_sale_manager,1,1,1,1\r
-access_product_category_pos_manager,product.public.category manager,model_product_public_category,base.group_sale_manager,1,1,1,1\r
-access_product_category_pos_user,product.public.category user,model_product_public_category,base.group_user,1,0,0,0\r
+access_product_attribute,product.attribute,model_product_attribute,base.group_user,1,0,0,0\r
+access_product_attribute_value,product.attribute value,model_product_attribute_value,base.group_user,1,0,0,0\r
+access_product_attribute_price,product.attribute price,model_product_attribute_price,base.group_user,1,0,0,0\r
+access_product_attribute_line,product.attribute line,model_product_attribute_line,base.group_user,1,0,0,0\r
+access_product_attribute_sale_manager,product.attribute manager,model_product_attribute,base.group_sale_manager,1,1,1,1\r
+access_product_attribute_value_sale_manager,product.attribute manager value,model_product_attribute_value,base.group_sale_manager,1,1,1,1\r
+access_product_attribute_price_sale_manager,product.attribute manager price,model_product_attribute_price,base.group_sale_manager,1,1,1,1\r
+access_product_attribute_line_sale_manager,product.attribute manager line,model_product_attribute_line,base.group_sale_manager,1,1,1,1\r
index 94fb456..6a3718e 100644 (file)
@@ -1,21 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <openerp>
 <data noupdate="0">
-    <!-- Change name of group for 7.0 users since product variant module doesn't exist anymore
-    DO NOT CHANGE IT IN TRUNK -->
-
-    <record id="group_product_variant" model="res.groups">
-        <field name="name">Manage Product Variants</field>
-        <field name="category_id" ref="base.module_category_hidden"/>
-    </record>
-
-    <record id="group_product_mono" model="res.groups">
-        <field name="name">Do Not Manage Product Variants</field>
-        <field name="category_id" ref="base.module_category_hidden"/>
-    </record>
-    <record id="base.group_user" model="res.groups">
-        <field name="implied_ids" eval="[(4, ref('product.group_product_mono'))]"/>
-    </record>
 
     <record id="group_sale_pricelist" model="res.groups">
         <field name="name">Sales Pricelists</field>
index 60a4a4b..53fa22d 100644 (file)
@@ -6,19 +6,19 @@
   !python {model: product.product}: |
     context.update({'pricelist': ref("customer_pricelist"), 'quantity':1})
     product = self.browse(cr, uid, ref("product_product_4"), context=context)
-    assert product.price == (product.lst_price-product.lst_price*(0.10)), "Wrong sale price."
+    assert product.price == (product.lst_price-product.lst_price*(0.10)), "Wrong sale price: Assemble Computer."
 -
   I check sale price of Laptop.
 -
   !python {model: product.product}: |
     product = self.browse(cr, uid, ref("product_product_25"), context=context)
-    assert product.price == product.lst_price + 1, "Wrong sale price."
+    assert product.price == product.lst_price + 1, "Wrong sale price: Laptop."
 -
   I check sale price of IT component.
 -
   !python {model: product.product}: |
     product = self.browse(cr, uid, ref("product_product_7"), context=context)
-    assert product.price == product.lst_price, "Wrong sale price."
+    assert product.price == product.lst_price, "Wrong sale price: IT component."
 
 -
   I check sale price of IT component if more than 3 Unit.
   !python {model: product.product}: |
     context.update({'quantity':5})
     product = self.browse(cr, uid, ref("product_product_26"), context=context)
-    assert product.price == product.lst_price-product.lst_price*(0.05), "Wrong sale price."
+    assert product.price == product.lst_price-product.lst_price*(0.05), "Wrong sale price: IT component if more than 3 Unit."
 -
   I check sale price of LCD Monitor.
 -
   !python {model: product.product}: |
     context.update({'quantity':1})
     product = self.browse(cr, uid, ref("product_product_6"), context=context)
-    assert product.price == product.lst_price, "Wrong sale price."
+    assert product.price == product.lst_price, "Wrong sale price: LCD Monitor."
 
 -
   I check sale price of LCD Monitor on end of year.
@@ -41,7 +41,7 @@
   !python {model: product.product}: |
     context.update({'quantity':1, 'date': '2011-12-31'})
     product = self.browse(cr, uid, ref("product_product_6"), context=context)
-    assert product.price == product.lst_price-product.lst_price*(0.30), "Wrong sale price."
+    assert product.price == product.lst_price-product.lst_price*(0.30), "Wrong sale price: LCD Monitor on end of year."
 
 -
   I check cost price of LCD Monitor.
   !python {model: product.product}: |
     context.update({'quantity':1, 'date': False, 'partner': ref('base.res_partner_4'), 'pricelist': ref("supplier_pricelist")})
     product = self.browse(cr, uid, ref("product_product_6"), context=context)
-    assert product.price == 792, "wrong cost price."
+    assert product.price == 792, "wrong cost price: LCD Monitor."
 -
   I check cost price of LCD Monitor if more than 3 Unit.
 -
   !python {model: product.product}: |
     context.update({'quantity':3})
     product = self.browse(cr, uid, ref("product_product_6"), context=context)
-    assert product.price == 787, "wrong cost price."
+    assert product.price == 787, "wrong cost price: LCD Monitor if more than 3 Unit."
 
 -
  I print the sale prices report.
index a52eeb8..3c98d8f 100644 (file)
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <openerp>
     <data>
-        <record id="product_normal_form_view_template" model="ir.ui.view">
-            <field name="name">product.normal.procurement.locations.inherit</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
+        <record id="product_template_form_view" model="ir.ui.view">
+            <field name="name">product.template.form.inherit</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
                 <field name="company_id" position="after">
                     <field name="email_template_id"
@@ -15,7 +15,7 @@
                             'default_subject': name,
                             'default_name': name,
                         }"
-                        attrs="{'invisible': [('is_only_child', '=', False)]}"
+                        attrs="{'invisible': [('is_product_variant', '=', False)]}"
                     />
                 </field>
             </field>
index 2b20d05..e311356 100644 (file)
@@ -98,7 +98,7 @@ class stock_quant(osv.osv):
 
 
 class product_product(osv.osv):
-    _inherit = 'product.product'
+    _inherit = 'product.template'
     _columns = {
         'life_time': fields.integer('Product Life Time',
             help='When a new a Serial Number is issued, this is the number of days before the goods may become dangerous and must not be consumed.'),
index b28b644..e5f3c5f 100644 (file)
 
         <record model="ir.ui.view" id="view_product_form_expiry">
             <field name="name">product.normal.form</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="stock.view_normal_procurement_locations_form" />
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view" />
             <field name="arch" type="xml">
-                <group name="Weights" position="after">
+                <group name="weight" position="after">
                     <group string="Dates">
                         <field name="life_time" />
                         <field name="use_time" />
index e8adcba..6ed71c6 100644 (file)
@@ -36,7 +36,7 @@ class product_product(osv.osv):
         testdict = {}
         for prod_id in ids:
             bom_obj = self.pool.get('mrp.bom')
-            bom_ids = bom_obj.search(cr, uid, [('bom_id', '=', False), ('product_id','=', prod_id), ('bom_lines', '!=', False)], context=context)
+            bom_ids = bom_obj.search(cr, uid, [('product_id','=', prod_id), ('bom_line_ids', '!=', False)], context=context)
             if bom_ids:
                 bom_id = bom_ids[0]
                 # In recursive mode, it will first compute the prices of child boms
@@ -63,9 +63,9 @@ class product_product(osv.osv):
             context={}
         price = 0
         uom_obj = self.pool.get("product.uom")
-        if bom.bom_lines:
-            for sbom in bom.bom_lines:
-                my_qty = sbom.bom_lines and 1.0 or sbom.product_qty
+        if bom.bom_line_ids:
+            for sbom in bom.bom_line_ids:
+                my_qty = sbom.bom_line_ids and 1.0 or sbom.product_qty
                 price += uom_obj._compute_price(cr, uid, sbom.product_id.uom_id.id, sbom.product_id.standard_price, sbom.product_uom.id) * my_qty
 
         if bom.routing_id:
@@ -98,7 +98,7 @@ class product_bom(osv.osv):
     _inherit = 'mrp.bom'
             
     _columns = {
-        'standard_price': fields.related('product_id','standard_price',type="float",relation="product.product",string="Standard Price",store=False)
+        'standard_price': fields.related('product_tmpl_id','standard_price',type="float",relation="product.product",string="Standard Price",store=False)
     }
 
 product_bom()
diff --git a/addons/product_manufacturer/__init__.py b/addons/product_manufacturer/__init__.py
deleted file mode 100644 (file)
index 9b2446b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 of the
-#    License, or (at your option) any later version.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU Affero General Public License for more details.
-#
-#    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-import product_manufacturer
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/product_manufacturer/__openerp__.py b/addons/product_manufacturer/__openerp__.py
deleted file mode 100644 (file)
index f43ed92..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 of the
-#    License, or (at your option) any later version.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU Affero General Public License for more details.
-#
-#    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-{
-    'name': 'Products Manufacturers',
-    'version': '1.0',
-    'author': 'OpenERP SA',
-    'category': 'Purchase Management',
-    'depends': ['stock'],
-    'demo': [],
-    'description': """
-A module that adds manufacturers and attributes on the product form.
-====================================================================
-
-You can now define the following for a product:
------------------------------------------------
-    * Manufacturer
-    * Manufacturer Product Name
-    * Manufacturer Product Code
-    * Product Attributes
-    """,
-    'data': [
-        'security/ir.model.access.csv',
-        'product_manufacturer_view.xml'
-    ],
-    'auto_install': False,
-    'installable': True,
-    'images': ['images/products_manufacturer.jpeg'],
-}
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/product_manufacturer/i18n/ar.po b/addons/product_manufacturer/i18n/ar.po
deleted file mode 100644 (file)
index 4b3af93..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-# Arabic translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2012-01-12 22:07+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Arabic <ar@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "كود تصنيع المنتج"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "المنتج"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "اسم قالب المنتج"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "سمات المنتج"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "سمات المنتج"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "الخاصية"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "قيمة"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "صفات"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "اسم مصنع المنتج"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "مصنّع"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "خطأ: كود إين غير صالح"
diff --git a/addons/product_manufacturer/i18n/bg.po b/addons/product_manufacturer/i18n/bg.po
deleted file mode 100644 (file)
index 3c9c83d..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-# Bulgarian translation for openobject-addons
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-02-10 23:42+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Bulgarian <bg@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Код на производител"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Продукт"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Име на шаблона на продукта"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Атрибути на продукта"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Атрибути на продукта"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Атрибут"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Стойност"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Атрибути"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Име на производител"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Производител"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Грешка: Невалиден европейски баркод"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr "Модул, който добавя производители и атрибути във формата на продукта"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Продуктови атрибути и производители"
diff --git a/addons/product_manufacturer/i18n/bs.po b/addons/product_manufacturer/i18n/bs.po
deleted file mode 100644 (file)
index 35919a3..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Bosnian translation for openobject-addons
-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2013-10-30 00:09+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Bosnian <bs@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Proizvođačka šifra artikla"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Proizvod"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Naziv predloška proizvoda"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atributi proizvoda"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Atributi proizvoda"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atribut"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Vrijednost"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Atributi"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Proizvođački naziv proizvoda"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Proizvođač"
diff --git a/addons/product_manufacturer/i18n/ca.po b/addons/product_manufacturer/i18n/ca.po
deleted file mode 100644 (file)
index 870d9a5..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-# Catalan translation for openobject-addons
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-02-12 21:08+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Catalan <ca@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Codi de producte del fabricant"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Producte"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Nom de plantilla de producte"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atributs de producte"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Atributs del producte"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atribut"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Valor"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Atributs"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Nom del producte del fabricant"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Fabricant"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr ""
-#~ "Un mòdul que afegeix fabricants i atributs en el formulari de producte"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Error: Codi EAN no vàlid"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Fabricants i atributs dels productes"
diff --git a/addons/product_manufacturer/i18n/cs.po b/addons/product_manufacturer/i18n/cs.po
deleted file mode 100644 (file)
index b149f15..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Czech translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2012-12-31 10:46+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Czech <cs@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Kód výrobku od výrobce"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Výrobek"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Název šalony výrobku"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Vlastnosti výrobku"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Vlastnosti výrobku"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Vlastnost"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Hodnota"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Vlastnosti"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Název výrobku od výrobce"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Výrobce"
diff --git a/addons/product_manufacturer/i18n/da.po b/addons/product_manufacturer/i18n/da.po
deleted file mode 100644 (file)
index d2cb246..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Danish translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2012-01-27 06:25+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Danish <da@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Producent varenummer"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Vare"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Vare skabelon navn"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Vare egenskaber"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Vare Egenskaber"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Egenskab"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Værdi"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Egenskaber"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Producent Vare Navn"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Producent"
diff --git a/addons/product_manufacturer/i18n/de.po b/addons/product_manufacturer/i18n/de.po
deleted file mode 100644 (file)
index 4a90991..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-# German translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-02-12 20:19+0000\n"
-"Last-Translator: Steffi Frank (Bremskerl, DE) <Unknown>\n"
-"Language-Team: German <de@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Hersteller-Artikelnummer"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Produkt"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Produkt Vorlagenname"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Produkteigenschaften"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Produkteigenschaften"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Eigenschaft"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Wert"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Eigenschaften"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Hersteller-Produktname"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Hersteller"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Fehler: Falscher EAN code"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Produkt-Eigenschaften und -Produzenten"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr ""
-#~ "Ein Modul, durch das einem Produkt Produzenten und Merkmale hinzgefügt "
-#~ "werden können"
diff --git a/addons/product_manufacturer/i18n/el.po b/addons/product_manufacturer/i18n/el.po
deleted file mode 100644 (file)
index 95ad9cc..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-# Greek translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-11-11 15:58+0000\n"
-"Last-Translator: Dimitris Andavoglou <dimitrisand@gmail.com>\n"
-"Language-Team: Greek <el@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Κωδικός Κατασκευαστή"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Προϊόν"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Όνομα Προτύπου Προϊόντος"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Ιδιότητες προϊόντος"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Χαρακτηριστικά Προϊόντος"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Χαρακτηριστικό"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Τιμή"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Ιδιότητες"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Όνομα Προϊόντος Κατασκευαστή"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Κατασκευαστής"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Ιδιότητες Προϊόντος και Κατασκευαστές"
diff --git a/addons/product_manufacturer/i18n/es.po b/addons/product_manufacturer/i18n/es.po
deleted file mode 100644 (file)
index 1f9490e..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-# Spanish translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-12-08 21:40+0000\n"
-"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
-"<jesteve@zikzakmedia.com>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Código producto fabricante"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Producto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Nombre de plantilla de producto"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atributos de producto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Atributos del producto"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atributo"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Valor"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Atributos"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Nombre producto fabricante"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Fabricante"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr ""
-#~ "Un módulo que añade fabricantes y atributos en el formulario de producto"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Fabricantes y atributos de los productos"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Error: Código EAN no válido"
diff --git a/addons/product_manufacturer/i18n/es_CR.po b/addons/product_manufacturer/i18n/es_CR.po
deleted file mode 100644 (file)
index 39f64dd..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-# Spanish translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2012-02-17 00:27+0000\n"
-"Last-Translator: Carlos Vásquez (CLEARCORP) "
-"<carlos.vasquez@clearcorp.co.cr>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-"Language: es\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Código producto fabricante"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Producto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Nombre de plantilla de producto"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atributos de producto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Atributos del producto"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atributo"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Valor"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Atributos"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Nombre producto fabricante"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Fabricante"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Error: Código EAN no válido"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr ""
-#~ "Un módulo que añade fabricantes y atributos en el formulario de producto"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Fabricantes y atributos de los productos"
diff --git a/addons/product_manufacturer/i18n/es_EC.po b/addons/product_manufacturer/i18n/es_EC.po
deleted file mode 100644 (file)
index 576687f..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-# Spanish translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-09-19 00:08+0000\n"
-"Last-Translator: Borja López Soilán (NeoPolus) <borjalopezsoilan@gmail.com>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr ""
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Producto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Nombre de plantilla de producto"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atributos de producto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atributo"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Valor"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Atributos"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Fabricante"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr ""
-#~ "Un módulo que añade fabricantes y atributos en el formulario de producto"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Fabricantes y atributos de los productos"
diff --git a/addons/product_manufacturer/i18n/es_MX.po b/addons/product_manufacturer/i18n/es_MX.po
deleted file mode 100644 (file)
index 25bd32d..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-# Spanish translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2011-01-11 11:15+0000\n"
-"PO-Revision-Date: 2010-12-08 21:40+0000\n"
-"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
-"<jesteve@zikzakmedia.com>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-09-05 05:46+0000\n"
-"X-Generator: Launchpad (build 13830)\n"
-
-#. module: product_manufacturer
-#: model:ir.module.module,description:product_manufacturer.module_meta_information
-msgid "A module that add manufacturers and attributes on the product form"
-msgstr ""
-"Un módulo que añade fabricantes y atributos en el formulario de producto"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Código producto fabricante"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Producto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Nombre de plantilla de producto"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atributos de producto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Atributos del producto"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atributo"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Valor"
-
-#. module: product_manufacturer
-#: constraint:product.product:0
-msgid "Error: Invalid ean code"
-msgstr "Error: Código EAN no válido"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Atributos"
-
-#. module: product_manufacturer
-#: model:ir.module.module,shortdesc:product_manufacturer.module_meta_information
-msgid "Products Attributes & Manufacturers"
-msgstr "Fabricantes y atributos de los productos"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Nombre producto fabricante"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Fabricante"
diff --git a/addons/product_manufacturer/i18n/es_VE.po b/addons/product_manufacturer/i18n/es_VE.po
deleted file mode 100644 (file)
index 25bd32d..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-# Spanish translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2011-01-11 11:15+0000\n"
-"PO-Revision-Date: 2010-12-08 21:40+0000\n"
-"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
-"<jesteve@zikzakmedia.com>\n"
-"Language-Team: Spanish <es@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2011-09-05 05:46+0000\n"
-"X-Generator: Launchpad (build 13830)\n"
-
-#. module: product_manufacturer
-#: model:ir.module.module,description:product_manufacturer.module_meta_information
-msgid "A module that add manufacturers and attributes on the product form"
-msgstr ""
-"Un módulo que añade fabricantes y atributos en el formulario de producto"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Código producto fabricante"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Producto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Nombre de plantilla de producto"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atributos de producto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Atributos del producto"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atributo"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Valor"
-
-#. module: product_manufacturer
-#: constraint:product.product:0
-msgid "Error: Invalid ean code"
-msgstr "Error: Código EAN no válido"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Atributos"
-
-#. module: product_manufacturer
-#: model:ir.module.module,shortdesc:product_manufacturer.module_meta_information
-msgid "Products Attributes & Manufacturers"
-msgstr "Fabricantes y atributos de los productos"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Nombre producto fabricante"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Fabricante"
diff --git a/addons/product_manufacturer/i18n/et.po b/addons/product_manufacturer/i18n/et.po
deleted file mode 100644 (file)
index c6526be..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Estonian translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-06-25 18:10+0000\n"
-"Last-Translator: lyyser <Unknown>\n"
-"Language-Team: Estonian <et@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Tootja tootekood"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Toode"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Toote malli nimi"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Toote omadused"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Toote omadused"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atribuut"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Väärtus"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Omadused"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Tootja tootenimi"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Tootja"
diff --git a/addons/product_manufacturer/i18n/fi.po b/addons/product_manufacturer/i18n/fi.po
deleted file mode 100644 (file)
index f6ddcec..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-# Finnish translation for openobject-addons
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-06-20 10:09+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Finnish <fi@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Valmistajan tuotekoodi"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Tuote"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Tuotemallipohjan nimi"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Tuotteen attribuutit"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Tuotteen attribuutit"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Attribuutti"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Arvo"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Attribuutit"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Valmistajan tuotenimi"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Valmistaja"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr "Moduuli jo lisää valmistajia ja attribuutteja tuotelomakkeelle"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Virhe: Väärä EAN-koodi"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Tuotteen attribuutit ja valmistajat"
diff --git a/addons/product_manufacturer/i18n/fr.po b/addons/product_manufacturer/i18n/fr.po
deleted file mode 100644 (file)
index 619e264..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-# French translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-12-29 07:38+0000\n"
-"Last-Translator: Aline (OpenERP) <Unknown>\n"
-"Language-Team: French <fr@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Code produit du fabriquant"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Produit"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Nom du modèle de produit"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Attributs du produit"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Attributs du produit"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Attribut"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Valeur"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Caractéristiques"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Nom du produit chez le fabricant"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Fabricant"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr ""
-#~ "Un module qui ajoute des fabricants et des attributs sur la fiche Produit"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Attributs et fabricants des produits"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Erreur : code EAN incorrect"
diff --git a/addons/product_manufacturer/i18n/gl.po b/addons/product_manufacturer/i18n/gl.po
deleted file mode 100644 (file)
index 4178e3a..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-# Galician translation for openobject-addons
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-03-22 18:14+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Galician <gl@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Código produto fabricante"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Produto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Nome do modelo de produto"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atributos do produto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Atributos do produto"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atributo"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Valor"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Atributos"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Nome produto fabricante"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Fabricante"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr ""
-#~ "Un módulo que engade fabricantes e atributos no formulario de produto"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Erro: Código EAN non válido"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Fabricantes e atributos dos produtos"
diff --git a/addons/product_manufacturer/i18n/hr.po b/addons/product_manufacturer/i18n/hr.po
deleted file mode 100644 (file)
index bf9f48e..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-# Croatian translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-09-10 08:27+0000\n"
-"Last-Translator: Dejan Radočaj <Unknown>\n"
-"Language-Team: Croatian <hr@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Proizvođačka šifra artikla"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Proizvod"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Naziv predloška proizvoda"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Značajke proizvoda"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Značajke proizvoda"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Značajka"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Vrijednost"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Značajke"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Proizvođački naziv artikla"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Proizvođač"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr "Modul koji dodaje proizvođače i značajke  na proizvodnu formu"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Značajke i proizvođači proizvoda"
diff --git a/addons/product_manufacturer/i18n/hu.po b/addons/product_manufacturer/i18n/hu.po
deleted file mode 100644 (file)
index f816a72..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-#    * product_manufacturer
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: OpenERP Server 6.0dev\n"
-"Report-Msgid-Bugs-To: support@openerp.com\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-01-25 21:42+0000\n"
-"Last-Translator: Krisztian Eyssen <krisz@eyssen.hu>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Gyártói termékkód"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Termék"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Terméksablon neve"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Termék tulajdonságok"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Termék tulajdonságok"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Tulajdonság"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Érték"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Tulajdonságok"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Gyártói termék megnevezés"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Gyártó"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Hiba: Érvénytelen vonalkód"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Termékek tulajdonságai és gyártók"
diff --git a/addons/product_manufacturer/i18n/it.po b/addons/product_manufacturer/i18n/it.po
deleted file mode 100644 (file)
index 5982a1e..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-# Italian translation for openobject-addons
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-01-13 22:51+0000\n"
-"Last-Translator: Nicola Riolini - Micronaet <Unknown>\n"
-"Language-Team: Italian <it@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Codice prodotto del produttore"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Prodotto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Nome modello prodotto"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Attributi prodotto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Attributi prodotto"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Attributo"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Valore"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Attributi"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Nome prodotto del produttore"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Produttore"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Errore: Codice EAN non valido"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr "Un modulo che aggiunge produttori e attributi al form del prodotto"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Attributi & Produttori dei prodotti"
diff --git a/addons/product_manufacturer/i18n/ja.po b/addons/product_manufacturer/i18n/ja.po
deleted file mode 100644 (file)
index c638799..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-# Japanese translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2012-06-08 17:13+0000\n"
-"Last-Translator: Akira Hiyama <Unknown>\n"
-"Language-Team: Japanese <ja@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "製造者製品コード"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "製品"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "製品テンプレート名"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "製品属性"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "製品属性"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "属性"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "値"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "属性"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "製造者製品名"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "製造者"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "エラー:無効な商品識別番号です。"
diff --git a/addons/product_manufacturer/i18n/lt.po b/addons/product_manufacturer/i18n/lt.po
deleted file mode 100644 (file)
index cc57ccb..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Lithuanian translation for openobject-addons
-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2013-01-26 14:43+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Lithuanian <lt@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Produkto kodas"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Produktas"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr ""
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Reikšmė"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Produkto pavadinimas"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Gamintojas"
diff --git a/addons/product_manufacturer/i18n/lv.po b/addons/product_manufacturer/i18n/lv.po
deleted file mode 100644 (file)
index 3a9747f..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Latvian translation for openobject-addons
-# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2014-02-14 10:44+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Latvian <lv@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr ""
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr ""
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr ""
diff --git a/addons/product_manufacturer/i18n/mk.po b/addons/product_manufacturer/i18n/mk.po
deleted file mode 100644 (file)
index 0f7487f..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Macedonian translation for openobject-addons
-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2013-03-01 15:51+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Macedonian <mk@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Код на производителот на производот"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Производ"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Име на урнек на производ"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Атрибути на производ"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Атрибути на производ"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Атрибут"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Вредност"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Атрибути"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Име на производител на производ"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Производител"
diff --git a/addons/product_manufacturer/i18n/mn.po b/addons/product_manufacturer/i18n/mn.po
deleted file mode 100644 (file)
index fa4ae70..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-# Mongolian translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-12-16 12:39+0000\n"
-"Last-Translator: ub121 <ubs121@gmail.com>\n"
-"Language-Team: Mongolian <mn@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Үйлдвэрлэгчийн барааны код"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Бараа"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Барааны загварын нэр"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Барааны онцлог"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Барааны онцлогууд"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Аттрибут"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Утга"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Атрибут"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Үйлдвэрлэгчийн барааны нэр"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Үйлдвэрлэгч"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr ""
-#~ "Бүтээгдэхүүний дэлгэц дээр үйлдвэрлэгчийн мэдээлэл болон бусад атрибутуу "
-#~ "нэмэх модуль"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Барааны атрибут & Үйлдвэрлэгч"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Алдаа: Буруу зураасан код"
diff --git a/addons/product_manufacturer/i18n/nb.po b/addons/product_manufacturer/i18n/nb.po
deleted file mode 100644 (file)
index 9172425..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-# Norwegian Bokmal translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2012-07-22 21:31+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Norwegian Bokmal <nb@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Produsent produktkode"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Produkt"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Produkt template navn"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Produkt attributter"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Produktattributter"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Attributt"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Verdi"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Attributter"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Produsents produktnavn"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Produsent"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Feil: Ugyldig ean kode"
diff --git a/addons/product_manufacturer/i18n/nl.po b/addons/product_manufacturer/i18n/nl.po
deleted file mode 100644 (file)
index b643411..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-# Dutch translation for openobject-addons
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-01-17 10:12+0000\n"
-"Last-Translator: Douwe Wullink (Dypalio) <Unknown>\n"
-"Language-Team: Dutch <nl@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Productcode fabrikant"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Product"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Product Sjabloon Naam"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Product kenmerken"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Product kenmerken"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Kenmerk"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Waarde"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Kenmerken"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Productomschrijving fabrikant"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Fabrikant"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr ""
-#~ "Een module die fabrikanten en kenmerken op het product formulier toevoegen"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Fout: ongeldige ean code"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Producten Kenmerken & Fabrikanten"
diff --git a/addons/product_manufacturer/i18n/pl.po b/addons/product_manufacturer/i18n/pl.po
deleted file mode 100644 (file)
index 6b9961b..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-# Polish translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2012-01-31 11:44+0000\n"
-"Last-Translator: djtms <Unknown>\n"
-"Language-Team: Polish <pl@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Kod producenta produktu"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Produkt"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Nazwa szablonu produktu"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atrybuty produktu"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Atrybuty produktu"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atrybut"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Wartość"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Atrybuty"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Nazwa produktu u producenta"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Producent"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr "Moduł do dodawania producentów i atrybutów w formularzu produktu"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Atrybuty i producenci produktu"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Błąd: Niedozwolony kod EAN"
diff --git a/addons/product_manufacturer/i18n/product_manufacturer.pot b/addons/product_manufacturer/i18n/product_manufacturer.pot
deleted file mode 100644 (file)
index 404d226..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-# Translation of OpenERP Server.
-# This file contains the translation of the following modules:
-#      * product_manufacturer
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: OpenERP Server 7.0alpha\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2012-12-21 17:06+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr ""
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr ""
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr ""
-
diff --git a/addons/product_manufacturer/i18n/pt.po b/addons/product_manufacturer/i18n/pt.po
deleted file mode 100644 (file)
index d23b885..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-# Portuguese translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-12-03 17:58+0000\n"
-"Last-Translator: Rui Franco (multibase.pt) <Unknown>\n"
-"Language-Team: Portuguese <pt@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Código do artigo (fabricante)"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Artigo"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Nome do modelo do artigo"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atributos do artigo"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Atributos do artigo"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atributo"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Valor"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Atributos"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Nome do artigo (fabricante)"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Fabricante"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Erro: Código EAN inválido"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr "A module that add manufacturers and attributes on the product form"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Atributos dos artigos e Fabricantes"
diff --git a/addons/product_manufacturer/i18n/pt_BR.po b/addons/product_manufacturer/i18n/pt_BR.po
deleted file mode 100644 (file)
index ba1f1e6..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-# Brazilian Portuguese translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-01-08 18:30+0000\n"
-"Last-Translator: Emerson <Unknown>\n"
-"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Código de Fabricação do Produto"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Produto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Nome do Modelo de Produto"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atributos do produto"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Atributos de Produto"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atributo"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Valor"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Atributos"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Nome de Fabricação do Produto"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Fabricante"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Atributos de Produto e Fabricantes"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Erro: Código EAN inválido"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr "Um módulo que adiciona fabricantes e atributos na tela de produtos."
diff --git a/addons/product_manufacturer/i18n/ro.po b/addons/product_manufacturer/i18n/ro.po
deleted file mode 100644 (file)
index 4b4bfb3..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-# Romanian translation for openobject-addons
-# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2012-01-11 19:30+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Romanian <ro@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Codul Producatorului Produsului"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Produs"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Numele Sablonului Produsului"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atribute produs"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Atribute Produs"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atribut (caracteristica)"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Valoare"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Atribute"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Numele Producatorului Produsului"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Producator"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr ""
-#~ "Un modul care adaugă producători si atribute in formularul produsului"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Atribute Produse & Producători"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Eroare: Cod ean invalid"
diff --git a/addons/product_manufacturer/i18n/ru.po b/addons/product_manufacturer/i18n/ru.po
deleted file mode 100644 (file)
index 8399571..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-# Russian translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-03-09 15:59+0000\n"
-"Last-Translator: Stanislav Hanzhin <Unknown>\n"
-"Language-Team: Russian <ru@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Код продукта у производителя"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Продукция"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Шаблон имени продукта"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Атрибуты продукта"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Атрибуты ТМЦ"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Атрибут"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Значение"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Атрибуты"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Название используемое производителем"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Производитель"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Ошибка: Неправильный штрих-код"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Атрибуты и производители ТМЦ"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr "Модуль добавить производителей и атрибуты в форму ввода ТМЦ"
diff --git a/addons/product_manufacturer/i18n/sl.po b/addons/product_manufacturer/i18n/sl.po
deleted file mode 100644 (file)
index d8a9d63..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Slovenian translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-07-28 12:29+0000\n"
-"Last-Translator: Simon Vidmar <Unknown>\n"
-"Language-Team: Slovenian <sl@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Dobaviteljeva koda izdelka"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Izdelek"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Ime predloge produkta"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Lasnosti izdelka"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Lasnosti izdelka"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Lastnost"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Vrednost"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Lastnosti"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Dobaviteljevo ime izdelka"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Proizvajalec"
diff --git a/addons/product_manufacturer/i18n/sr.po b/addons/product_manufacturer/i18n/sr.po
deleted file mode 100644 (file)
index a54d350..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-# Serbian translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-10-14 16:37+0000\n"
-"Last-Translator: zmmaj <Unknown>\n"
-"Language-Team: Serbian <sr@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Proizvođačka šifra artikla"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Proizvod"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Naziv predloška proizvoda"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Atributi Proizvoda"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Atributi Proizvoda"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Atribut"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Vrednost"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Aтрибути"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Proizvođačev Naziv Proizvoda"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Proizvođač"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr "Modul koji dodaje proizvođače i atribute na proizvodnu formu"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Atributi i Proizvođači Proizvoda"
diff --git a/addons/product_manufacturer/i18n/sr@latin.po b/addons/product_manufacturer/i18n/sr@latin.po
deleted file mode 100644 (file)
index aac5c21..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Serbian latin translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-12-10 18:55+0000\n"
-"Last-Translator: Milan Milosevic <Unknown>\n"
-"Language-Team: Serbian latin <sr@latin@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr ""
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr ""
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Osobine Proizvoda"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr ""
diff --git a/addons/product_manufacturer/i18n/sv.po b/addons/product_manufacturer/i18n/sv.po
deleted file mode 100644 (file)
index 40800dd..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-# Swedish translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2010-12-13 20:52+0000\n"
-"Last-Translator: Anders Eriksson, Mobila System <ae@mobilasystem.se>\n"
-"Language-Team: Swedish <sv@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Tillverkarens produktnummer"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Produkt"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Produktmallnamn"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Produktattribut"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Produktattribut"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Attribut"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Värde"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Attribut"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Tillverkarens produktnamn"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Tillverkare"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Fel: Felaktig EAN kod"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Produktattribut och tillverkare"
diff --git a/addons/product_manufacturer/i18n/tr.po b/addons/product_manufacturer/i18n/tr.po
deleted file mode 100644 (file)
index 62794cb..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-# Turkish translation for openobject-addons
-# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2011-01-09 16:45+0000\n"
-"Last-Translator: Arif Aydogmus <arifaydogmus@gmail.com>\n"
-"Language-Team: Turkish <tr@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "Üreticinin Ürün Kodu"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "Ürün"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "Ürün Şablonu Adı"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "Ürün öznitelikleri"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "Ürün Öznitelikleri"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "Öznitelik"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "Değer"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "Öznitelikler"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "Üreticinin Ürün Adı"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "Üretici"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr "Ürüm kartına üretici firma ve özelliklerini ekleyen modül."
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "Hata: Geçersiz barkod"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "Ürün Özellikleri & Üreticiler"
diff --git a/addons/product_manufacturer/i18n/zh_CN.po b/addons/product_manufacturer/i18n/zh_CN.po
deleted file mode 100644 (file)
index d175f84..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-# Chinese (Simplified) translation for openobject-addons
-# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2012-11-25 16:14+0000\n"
-"Last-Translator: 盈通 ccdos <ccdos@intoerp.com>\n"
-"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr "制造商产品代码"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr "产品"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr "产品模板名称"
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr "产品属性"
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr "产品属性"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr "属性"
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr "值"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr "属性"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr "制造商产品名称"
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr "制造商"
-
-#~ msgid "Products Attributes & Manufacturers"
-#~ msgstr "产品属性和制造商"
-
-#~ msgid "Error: Invalid ean code"
-#~ msgstr "错误:无效EAN编码"
-
-#~ msgid "A module that add manufacturers and attributes on the product form"
-#~ msgstr "用于在产品表单中添加制造商与其他属性的模块。"
diff --git a/addons/product_manufacturer/i18n/zh_TW.po b/addons/product_manufacturer/i18n/zh_TW.po
deleted file mode 100644 (file)
index c62f8e6..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# Chinese (Traditional) translation for openobject-addons
-# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
-# This file is distributed under the same license as the openobject-addons package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: openobject-addons\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
-"POT-Creation-Date: 2012-12-21 17:06+0000\n"
-"PO-Revision-Date: 2013-02-01 04:37+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Chinese (Traditional) <zh_TW@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-04-22 07:26+0000\n"
-"X-Generator: Launchpad (build 16985)\n"
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pref:0
-msgid "Manufacturer Product Code"
-msgstr ""
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_product
-#: field:product.manufacturer.attribute,product_id:0
-msgid "Product"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-msgid "Product Template Name"
-msgstr ""
-
-#. module: product_manufacturer
-#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute
-msgid "Product attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.manufacturer.attribute:0
-#: view:product.product:0
-msgid "Product Attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,name:0
-msgid "Attribute"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.manufacturer.attribute,value:0
-msgid "Value"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,attribute_ids:0
-msgid "Attributes"
-msgstr ""
-
-#. module: product_manufacturer
-#: field:product.product,manufacturer_pname:0
-msgid "Manufacturer Product Name"
-msgstr ""
-
-#. module: product_manufacturer
-#: view:product.product:0
-#: field:product.product,manufacturer:0
-msgid "Manufacturer"
-msgstr ""
diff --git a/addons/product_manufacturer/product_manufacturer.py b/addons/product_manufacturer/product_manufacturer.py
deleted file mode 100644 (file)
index ea7acf6..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 of the
-#    License, or (at your option) any later version.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU Affero General Public License for more details.
-#
-#    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-from openerp.osv import fields, osv
-
-class product_product(osv.osv):
-    _inherit = 'product.product'
-    _columns = {
-        'manufacturer' : fields.many2one('res.partner', 'Manufacturer'),
-        'manufacturer_pname' : fields.char('Manufacturer Product Name', size=64),
-        'manufacturer_pref' : fields.char('Manufacturer Product Code', size=64),
-        'attribute_ids': fields.one2many('product.manufacturer.attribute', 'product_id', 'Attributes'),
-    }
-
-class product_attribute(osv.osv):
-    _name = "product.manufacturer.attribute"
-    _description = "Product attributes"
-    _columns = {
-        'name' : fields.char('Attribute', size=64, required=True),
-        'value' : fields.char('Value', size=64),
-        'product_id': fields.many2one('product.product', 'Product', ondelete='cascade'),
-    }
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/product_manufacturer/product_manufacturer_view.xml b/addons/product_manufacturer/product_manufacturer_view.xml
deleted file mode 100644 (file)
index fb4aac9..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" ?>
-<openerp>
-    <data>
-
-        <record model="ir.ui.view" id="view_product_form_expiry">
-            <field name="name">product.normal.form</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view" />
-            <field name="arch" type="xml">
-                <group name="procurement" position="inside">
-                    <group string="Manufacturer">
-                        <field name="manufacturer" context="{'default_supplier':True, 'default_customer':False}"/>
-                        <field name="manufacturer_pname"/>
-                        <field name="manufacturer_pref"/>
-                    </group>
-                    <group string="Attributes">
-                        <field name="attribute_ids" colspan="4" nolabel="1">
-                            <tree string="Product Attributes" editable="bottom">
-                                <field name="name"/>
-                                <field name="value"/>
-                            </tree>
-                        </field>
-                    </group>
-                </group>
-            </field>
-        </record>
-
-        <record model="ir.ui.view" id="product_manufacturer_attribute_tree_view">
-            <field name="name">product.manufacturer.attribute.tree</field>
-            <field name="model">product.manufacturer.attribute</field>
-            <field name="arch" type="xml">
-                <tree string="Product Attributes" editable="bottom">
-                    <field name="name"/>
-                    <field name="value"/>
-                </tree>
-            </field>
-        </record>
-        <record model="ir.ui.view" id="product_manufacturer_attribute_form_view">
-            <field name="name">product.manufacturer.attribute.form</field>
-            <field name="model">product.manufacturer.attribute</field>
-            <field name="arch" type="xml">
-                <form string="Product Template Name" version="7.0">
-                    <group>
-                        <field name="name"/>
-                        <field name="value"/>
-                    </group>
-                </form>
-            </field>
-        </record>
-
-    </data>
-</openerp>
-
diff --git a/addons/product_manufacturer/security/ir.model.access.csv b/addons/product_manufacturer/security/ir.model.access.csv
deleted file mode 100644 (file)
index aab8e07..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink\r
-access_product_manufacturer_attribute,product.manufacturer.attribute,model_product_manufacturer_attribute,base.group_user,1,1,1,1\r
index c0df0a8..651aa7d 100644 (file)
@@ -140,7 +140,7 @@ class project_task(osv.osv):
         return res
 
 class product_product(osv.osv):
-    _inherit = "product.product"
+    _inherit = "product.template"
     _columns = {
         'project_id': fields.many2one('project.project', 'Project', ondelete='set null',),
         'auto_create_task': fields.boolean('Create Task Automatically', help="Thick this option if you want to create a task automatically each time this product is sold"),
index 51ccc73..90ab668 100644 (file)
         </record>
         <record id="view_product_task_form" model="ir.ui.view">
             <field name="name">product.form.view.inherit</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="stock.view_template_property_form"/>
             <field name="arch" type="xml">
-                <xpath expr="//group[@name='procurement_uom']" position="after">
+                <group name="procurement_uom" position="after">
                     <group string="Project Management Information" attrs="{'invisible': [('type', '!=', 'service')]}">
                         <field name="auto_create_task"/>
                         <field name="project_id" attrs="{'invisible':['|', ('type','!=','service'), ('auto_create_task', '=', False)]}"/>
                     </group>
-                </xpath>
+                </group>
             </field>
         </record>
         <record id="task_type_edit_mrp_inherit" model="ir.ui.view">
index 6ff6fea..6855c08 100644 (file)
@@ -1358,8 +1358,14 @@ class product_template(osv.Model):
     _name = 'product.template'
     _inherit = 'product.template'
     
+    def _purchase_count(self, cr, uid, ids, field_name, arg, context=None):
+        res = dict.fromkeys(ids, 0)
+        for template in self.browse(cr, uid, ids, context=context):
+            res[template.id] = sum([p.purchase_count for p in template.product_variant_ids])
+        return res
     _columns = {
         'purchase_ok': fields.boolean('Can be Purchased', help="Specify if the product can be selected in a purchase order line."),
+        'purchase_count': fields.function(_purchase_count, string='# Purchases', type='integer'),
     }
     _defaults = {
         'purchase_ok': 1,
index 499308e..2f88439 100644 (file)
         </field>
     </record>
 
+
+    <record id="product_normal_action_puchased" model="ir.actions.act_window">
+        <field name="name">Products</field>
+        <field name="type">ir.actions.act_window</field>
+        <field name="res_model">product.product</field>
+        <field name="view_type">form</field>
+        <field name="view_mode">kanban,tree,form</field>
+        <field name="context">{"search_default_filter_to_purchase":1}</field>
+        <field name="view_id" ref="product.product_kanban_view"/>
+        <field name="search_view_id" ref="product.product_search_form_view"/>
+        <field name="help" type="html">
+          <p class="oe_view_nocontent_create">
+            Click to define a new product.
+          </p><p>
+            You must define a product for everything you purchase, whether
+            it's a physical product, a consumable or services you buy to
+            subcontractants.
+          </p><p>
+            The product form contains detailed information to improve the
+            purchase process: prices, procurement logistics, accounting data,
+            available suppliers, etc.
+          </p>
+        </field>
+    </record>
+
+
      <menuitem
           id="menu_procurement_management_pending_invoice"
           action="action_invoice_pending"
       <menuitem name="Products by Category" id="menu_product_by_category_purchase_form" action="product.product_category_action"
            parent="menu_procurement_management_product" sequence="10"/>
 
-      <menuitem name="Products" id="menu_procurement_partner_contact_form" action="product.product_normal_action_puchased"
+      <menuitem name="Products" id="menu_procurement_partner_contact_form" action="product_normal_action_puchased"
           parent="menu_procurement_management_product"/>
 
         <record model="ir.ui.view" id="purchase_order_calendar">
         <!-- Product Suppliers-->
         
         <record id="view_product_supplier_inherit" model="ir.ui.view">
-            <field name="name">product.normal.supplier.form.inherit</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
+            <field name="name">product.template.supplier.form.inherit</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
                 <div name="options" position="inside">
-                    <field name="purchase_ok" attrs="{'readonly': [('is_only_child', '=', False)]}"/>
-                    <label for="purchase_ok"/>
+                    <div>
+                        <field name="purchase_ok" attrs="{'readonly': [('is_product_variant', '=', False)]}"/>
+                        <label for="purchase_ok"/>
+                    </div>
                 </div>
-                <group name="procurement" position="after">
-                     <separator string="Suppliers"/>
-                     <field name="seller_ids" context="{'uom_id': uom_id}"/>
-                </group>
             </field>
         </record>
 
-        <record id="product_search_form_view_purchase" model="ir.ui.view">
-            <field name="name">product.search.purchase.form</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_search_form_view"/>
+        <record id="product_template_search_view_purchase" model="ir.ui.view">
+            <field name="name">product.template.search.purchase.form</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_search_view"/>
             <field name="arch" type="xml">
                 <filter name="filter_to_sell" position="before">
                     <filter name="filter_to_purchase" string="To Purchase" icon="terp-accessories-archiver+" domain="[('purchase_ok', '=', 1)]"/>
             </field>
         </record>
 
-        <record id="product_template_search_view_purchase" model="ir.ui.view">
-            <field name="name">product.template.search.purchase</field>
-            <field name="model">product.template</field>
-            <field name="inherit_id" ref="product.product_template_search_view"/>
-            <field name="arch" type="xml">
-                <filter name="filter_to_sell" position="after">
-                    <filter name="filter_to_purchase" string="Can be Purchased" icon="terp-accessories-archiver+" domain="[('purchase_ok', '=', 1)]"/>
-                </filter>
-            </field>
-        </record>
-
-        <record id="view_template_purchase_ok_form" model="ir.ui.view">
-            <field name="name">product.template.purchase.ok.form.inherit</field>
-            <field name="model">product.template</field>
-            <field name="inherit_id" ref="product.product_template_form_view"/>
-            <field name="arch" type="xml">
-                <div name="options" position="inside">
-                    <field name="purchase_ok"/>
-                    <label for="purchase_ok"/>
-                </div>
-            </field>
-        </record>
         <record model="ir.actions.act_window" id="action_purchase_line_product_tree">
             <field name="context">{'search_default_product_id': active_id, 'default_product_id': active_id}</field>
             <field name="name">Purchases</field>
             <field name="res_model">purchase.order.line</field>
             <field name="view_id" ref="purchase_order_line_tree"/>
         </record>
+
         <record id="view_product_account_purchase_ok_form" model="ir.ui.view">
-            <field name="name">product.account.purchase.ok.form.inherit</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="account.product_normal_form_view"/>
+            <field name="name">product.template.account.purchase.ok.form.inherit</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="account.product_template_form_view"/>
             <field name="arch" type="xml">
                 <xpath expr="//div[@name='buttons']" position="inside">
                    <button class="oe_inline oe_stat_button" name="%(action_purchase_line_product_tree)d" type="action" 
index cdc56e3..5aecc39 100644 (file)
@@ -392,8 +392,8 @@ class purchase_order_line(osv.osv):
         return self.pool.get('purchase.requisition').generate_po(cr, uid, [tender_id], context=context)
 
 
-class product_product(osv.osv):
-    _inherit = 'product.product'
+class product_template(osv.osv):
+    _inherit = 'product.template'
 
     _columns = {
         'purchase_requisition': fields.boolean('Call for Bids', help="Check this box to generate Call for Bids instead of generating requests for quotation from procurement.")
index 2145052..862f6e0 100644 (file)
         parent="purchase.menu_procurement_management"
         action="action_purchase_requisition"/>
 
-    <record model="ir.ui.view" id="product_normal_form_view_inherit">
-        <field name="name">product.form.inherit</field>
-        <field name="model">product.product</field>
-        <field name="inherit_id" ref="stock.product_form_view_procurement_button"/>
+    <record model="ir.ui.view" id="product_template_form_view_inherit">
+        <field name="name">product.template.form.inherit</field>
+        <field name="model">product.template</field>
+        <field name="inherit_id" ref="stock.view_template_property_form"/>
         <field name="arch" type="xml">
             <field name="route_ids" position="after">
                 <field name="purchase_requisition"/>
index 17ce939..1159e18 100644 (file)
@@ -32,7 +32,7 @@
             <field name="arch" type="xml">
                 <field name="product_manager" position="after">
                     <field name="intrastat_id"
-                        attrs="{'readonly': [('is_only_child', '=', False)]}"/>
+                        attrs="{'readonly': [('is_product_variant', '=', False)]}"/>
                 </field>
             </field>
         </record>
index 88f7b24..94fd74e 100644 (file)
@@ -30,33 +30,6 @@ _logger = logging.getLogger(__name__)
 class sale_configuration(osv.TransientModel):
     _inherit = 'sale.config.settings'
 
-    def set_group_product_variant(self, cr, uid, ids, context=None):
-        """ This method is automatically called by res_config as it begins
-            with set. It is used to implement the 'one group or another'
-            behavior. We have to perform some group manipulation by hand
-            because in res_config.execute(), set_* methods are called
-            after group_*; therefore writing on an hidden res_config file
-            could not work.
-            If group_product_variant is checked: remove group_product_mono
-            from group_user, remove the users. Otherwise, just add
-            group_product_mono in group_user.
-            The inverse logic about group_product_variant is managed by the
-            normal behavior of 'group_product_variant' field.
-        """
-        def ref(xml_id):
-            mod, xml = xml_id.split('.', 1)
-            return self.pool['ir.model.data'].get_object(cr, uid, mod, xml, context)
-
-        for obj in self.browse(cr, uid, ids, context=context):
-            config_group = ref('product.group_product_mono')
-            base_group = ref('base.group_user')
-            if obj.group_product_variant:
-                base_group.write({'implied_ids': [(3, config_group.id)]})
-                config_group.write({'users': [(3, u.id) for u in base_group.users]})
-            else:
-                base_group.write({'implied_ids': [(4, config_group.id)]})
-        return True
-
     _columns = {
         'group_invoice_so_lines': fields.boolean('Generate invoices based on the sales order lines',
             implied_group='sale.group_invoice_so_lines',
@@ -82,9 +55,6 @@ Example: 10% for retailers, promotion of 5 EUR on this product, etc."""),
         'group_discount_per_so_line': fields.boolean("Allow setting a discount on the sales order lines",
             implied_group='sale.group_discount_per_so_line',
             help="Allows you to apply some discount per sales order line."),
-        'group_product_variant': fields.boolean("Support multiple variants per products  ",
-            implied_group='product.group_product_variant',
-            help="""Allow to manage several variants per product. As an example, if you  sell T-Shirts, for the same "Linux T-Shirt", you may have variants on  sizes or colors; S, M, L, XL, XXL."""),
         'module_warning': fields.boolean("Allow configuring alerts by customer or products",
             help='Allow to configure notification on products and trigger them when a user wants to sell a given product or a given customer.\n'
                  'Example: Product: this product is deprecated, do not purchase more than 5.\n'
index 641b161..e499af7 100644 (file)
                                 <field name="group_discount_per_so_line" class="oe_inline"/>
                                 <label for="group_discount_per_so_line"/>
                             </div>
-                            <div>
-                                <field name="group_product_variant" class="oe_inline"/>
-                                <label for="group_product_variant"/>
-                            </div>
                         </div>
                     </group>
                 </group>
index e3b59c0..70dece2 100644 (file)
@@ -880,7 +880,7 @@ class sale_order_line(osv.osv):
         'order_id': fields.many2one('sale.order', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, states={'draft':[('readonly',False)]}),
         'name': fields.text('Description', required=True, readonly=True, states={'draft': [('readonly', False)]}),
         'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of sales order lines."),
-        'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True, readonly=True, states={'draft': [('readonly', False)]}),
+        'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True, readonly=True, states={'draft': [('readonly', False)]}, ondelete='restrict'),
         'invoice_lines': fields.many2many('account.invoice.line', 'sale_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),
         'invoiced': fields.function(_fnct_line_invoiced, string='Invoiced', type='boolean',
             store={
index 0005e15..6a5c557 100644 (file)
     uom_id: product.product_uom_unit
     uom_po_id: product.product_uom_unit
 -
-  I create a bom for this product 
+  I create a bom for this product
 -
   !record {model: mrp.bom, id: mrp_bom_test1}:
     company_id: base.main_company
     name: My BOM
+    product_tmpl_id: product_manu_product_template
     product_id: product_manu
+    product_uom: product.product_uom_unit
     product_qty: 1.0
     type: normal
-    bom_lines:
-      - company_id: base.main_company
-        name: GrapWorks Software
-        product_id: product.product_product_44
+    bom_line_ids:
+      - product_id: product.product_product_44
+        product_uom: product.product_uom_unit
         product_qty: 1.0
 -
   And set routes on product to be MTO and manufacture
index 85e25b5..11b0af8 100644 (file)
     company_id: base.main_company
     name: Slider Mobile
     product_efficiency: 1.0
+    product_tmpl_id: product_product_slidermobile0_product_template
     product_id: product_product_slidermobile0
     product_qty: 1.0
     product_uom: product.product_uom_unit
-    product_uos_qty: 0.0
     sequence: 0.0
     type: normal
 -
index 5bb8e85..496e07a 100644 (file)
@@ -37,7 +37,7 @@ class TestMoveExplode(common.TransactionCase):
         #product that has a phantom bom
         self.product_bom_id = self.ir_model_data.get_object_reference(cr, uid, 'product', 'product_product_4')[1]
         #bom with that product
-        self.bom_id = self.ir_model_data.get_object_reference(cr, uid, 'mrp', 'mrp_bom_24')[1]
+        self.bom_id = self.ir_model_data.get_object_reference(cr, uid, 'mrp', 'mrp_bom_9')[1]
         #partner agrolait
         self.partner_id = self.ir_model_data.get_object_reference(cr, uid, 'base', 'res_partner_1')[1]
 
@@ -55,5 +55,5 @@ class TestMoveExplode(common.TransactionCase):
         move_ids = [x.id for x in browse_move_ids]
         #we should have same amount of move as the component in the phatom bom
         bom = self.mrp_bom.browse(cr, uid, self.bom_id, context=context)
-        bom_component_length = self.mrp_bom._bom_explode(cr, uid, bom, 1, [])
+        bom_component_length = self.mrp_bom._bom_explode(cr, uid, bom, self.product_bom_id, 1, [])
         self.assertEqual(len(move_ids), len(bom_component_length[0]))
index 54353cd..732ab25 100644 (file)
@@ -222,14 +222,9 @@ class product_product(osv.osv):
                  "any of its children.\n"
                  "Otherwise, this includes goods leaving any Stock "
                  "Location with 'internal' type."),
-        'track_incoming': fields.boolean('Track Incoming Lots', help="Forces to specify a Serial Number for all moves containing this product and coming from a Supplier Location"),
-        'track_outgoing': fields.boolean('Track Outgoing Lots', help="Forces to specify a Serial Number for all moves containing this product and going to a Customer Location"),
-        'track_all': fields.boolean('Full Lots Traceability', help="Forces to specify a Serial Number on each and every operation related to this product"),
         'location_id': fields.dummy(string='Location', relation='stock.location', type='many2one'),
         'warehouse_id': fields.dummy(string='Warehouse', relation='stock.warehouse', type='many2one'),
         'orderpoint_ids': fields.one2many('stock.warehouse.orderpoint', 'product_id', 'Minimum Stock Rules'),
-        'route_ids': fields.many2many('stock.location.route', 'stock_route_product', 'product_id', 'route_id', 'Routes', domain="[('product_selectable', '=', True)]",
-                                    help="Depending on the modules installed, this will allow you to define the route of the product: whether it will be bought, manufactured, MTO/MTS,..."),
     }
 
     def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
@@ -275,25 +270,52 @@ class product_product(osv.osv):
                         res['fields']['qty_available']['string'] = _('Produced Qty')
         return res
 
-    def action_view_routes(self, cr, uid, ids, context=None):
-        route_obj = self.pool.get("stock.location.route")
-        act_obj = self.pool.get('ir.actions.act_window')
-        mod_obj = self.pool.get('ir.model.data')
-        product_route_ids = set()
-        for product in self.browse(cr, uid, ids, context=context):
-            product_route_ids |= set([r.id for r in product.route_ids])
-            product_route_ids |= set([r.id for r in product.categ_id.total_route_ids])
-        route_ids = route_obj.search(cr, uid, ['|', ('id', 'in', list(product_route_ids)), ('warehouse_selectable', '=', True)], context=context)
-        result = mod_obj.get_object_reference(cr, uid, 'stock', 'action_routes_form')
-        id = result and result[1] or False
-        result = act_obj.read(cr, uid, [id], context=context)[0]
-        result['domain'] = "[('id','in',[" + ','.join(map(str, route_ids)) + "])]"
-        return result
-
 class product_template(osv.osv):
     _name = 'product.template'
     _inherit = 'product.template'
+    
+    def _product_available(self, cr, uid, ids, name, arg, context=None):
+        res = dict.fromkeys(ids, 0)
+        for product in self.browse(cr, uid, ids, context=context):
+            res[product.id] = {
+                # "reception_count": sum([p.reception_count for p in product.product_variant_ids]),
+                # "delivery_count": sum([p.delivery_count for p in product.product_variant_ids]),
+                "qty_available": sum([p.qty_available for p in product.product_variant_ids]),
+                "virtual_available": sum([p.virtual_available for p in product.product_variant_ids]),
+                "incoming_qty": sum([p.incoming_qty for p in product.product_variant_ids]),
+                "outgoing_qty": sum([p.outgoing_qty for p in product.product_variant_ids]),
+            }
+        return res
+
+    def _search_product_quantity(self, cr, uid, obj, name, domain, context):
+        prod = self.pool.get("product.product")
+        res = []
+        for field, operator, value in domain:
+            #to prevent sql injections
+            assert field in ('qty_available', 'virtual_available', 'incoming_qty', 'outgoing_qty'), 'Invalid domain left operand'
+            assert operator in ('<', '>', '=', '<=', '>='), 'Invalid domain operator'
+            assert isinstance(value, (float, int)), 'Invalid domain right operand'
+
+            if operator == '=':
+                operator = '=='
+
+            product_ids = prod.search(cr, uid, [], context=context)
+            ids = []
+            if product_ids:
+                #TODO: use a query instead of this browse record which is probably making the too much requests, but don't forget
+                #the context that can be set with a location, an owner...
+                for element in prod.browse(cr, uid, product_ids, context=context):
+                    if eval(str(element[field]) + operator + str(value)):
+                        ids.append(element.id)
+            res.append(('product_variant_ids', 'in', ids))
+        return res
+
     _columns = {
+        'valuation':fields.selection([('manual_periodic', 'Periodical (manual)'),
+            ('real_time','Real Time (automated)'),], 'Inventory Valuation',
+            help="If real-time valuation is enabled for a product, the system will automatically write journal entries corresponding to stock moves." \
+                 "The inventory variation account set on the product category will represent the current inventory value, and the stock input and stock output account will hold the counterpart moves for incoming and outgoing products."
+            , required=True),
         'type': fields.selection([('product', 'Stockable Product'), ('consu', 'Consumable'), ('service', 'Service')], 'Product Type', required=True, help="Consumable: Will not imply stock management for this product. \nStockable product: Will imply stock management for this product."),
         'property_stock_procurement': fields.property(
             type='many2one',
@@ -317,12 +339,47 @@ class product_template(osv.osv):
         'loc_rack': fields.char('Rack', size=16),
         'loc_row': fields.char('Row', size=16),
         'loc_case': fields.char('Case', size=16),
+        'track_incoming': fields.boolean('Track Incoming Lots', help="Forces to specify a Serial Number for all moves containing this product and coming from a Supplier Location"),
+        'track_outgoing': fields.boolean('Track Outgoing Lots', help="Forces to specify a Serial Number for all moves containing this product and going to a Customer Location"),
+        'track_all': fields.boolean('Full Lots Traceability', help="Forces to specify a Serial Number on each and every operation related to this product"),
+        
+        # sum of product variant qty
+        # 'reception_count': fields.function(_product_available, multi='qty_available',
+        #     fnct_search=_search_product_quantity, type='float', string='Quantity On Hand'),
+        # 'delivery_count': fields.function(_product_available, multi='qty_available',
+        #     fnct_search=_search_product_quantity, type='float', string='Quantity On Hand'),
+        'qty_available': fields.function(_product_available, multi='qty_available',
+            fnct_search=_search_product_quantity, type='float', string='Quantity On Hand'),
+        'virtual_available': fields.function(_product_available, multi='qty_available',
+            fnct_search=_search_product_quantity, type='float', string='Quantity Available'),
+        'incoming_qty': fields.function(_product_available, multi='qty_available',
+            fnct_search=_search_product_quantity, type='float', string='Incoming'),
+        'outgoing_qty': fields.function(_product_available, multi='qty_available',
+            fnct_search=_search_product_quantity, type='float', string='Outgoing'),
+        
+        'route_ids': fields.many2many('stock.location.route', 'stock_route_product', 'product_id', 'route_id', 'Routes', domain="[('product_selectable', '=', True)]",
+                                    help="Depending on the modules installed, this will allow you to define the route of the product: whether it will be bought, manufactured, MTO/MTS,..."),
     }
 
     _defaults = {
         'sale_delay': 7,
+        'valuation': 'manual_periodic',
     }
 
+    def action_view_routes(self, cr, uid, ids, context=None):
+        route_obj = self.pool.get("stock.location.route")
+        act_obj = self.pool.get('ir.actions.act_window')
+        mod_obj = self.pool.get('ir.model.data')
+        product_route_ids = set()
+        for product in self.browse(cr, uid, ids, context=context):
+            product_route_ids |= set([r.id for r in product.route_ids])
+            product_route_ids |= set([r.id for r in product.categ_id.total_route_ids])
+        route_ids = route_obj.search(cr, uid, ['|', ('id', 'in', list(product_route_ids)), ('warehouse_selectable', '=', True)], context=context)
+        result = mod_obj.get_object_reference(cr, uid, 'stock', 'action_routes_form')
+        id = result and result[1] or False
+        result = act_obj.read(cr, uid, [id], context=context)[0]
+        result['domain'] = "[('id','in',[" + ','.join(map(str, route_ids)) + "])]"
+        return result
 
 class product_removal_strategy(osv.osv):
     _name = 'product.removal'
index aaecf4e..103133d 100644 (file)
@@ -2,70 +2,17 @@
 <openerp>
     <data>
 
-        <record id="product_search_form_view_stock" model="ir.ui.view">
-            <field name="name">product.search.stock.form</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_search_form_view"/>
-            <field name="arch" type="xml">
-                <field name="pricelist_id" position="before">
-                    <field name="location_id" widget="selection" context="{'location': self}"/>
-                    <field name="warehouse_id" widget="selection" context="{'warehouse': self}"/>
-                </field>
-                <field name="categ_id" position="before">
-                    <separator/>
-                    <filter name="real_stock_available" string="Available Products" domain="[('qty_available','&gt;',0)]"/>
-                    <filter name="virtual_stock_available" string="Forecast Available Products" domain="[('virtual_available','&gt;',0)]"/>
-                    <filter name="real_stock_negative" string="Exhausted Stock" domain="[('qty_available','&lt;=',0)]"/>
-                    <filter name="virtual_stock_negative" string="Forecast Exhausted Stock" domain="[('virtual_available','&lt;=',0)]"/>
-                    
-                </field>
-            </field>
-        </record>
-
         <record id="view_stock_product_tree" model="ir.ui.view">
             <field name="name">product.stock.tree.inherit</field>
             <field name="model">product.product</field>
             <field name="inherit_id" ref="product.product_product_tree_view"/>
             <field name="arch" type="xml">
-
-                <field name="uom_id" position="after">
-                    <field name="qty_available"/>
-                    <field name="virtual_available"/>
-                </field>
                 <tree position="attributes">
                     <attribute name="colors">{'red':virtual_available&lt;0, 'blue':virtual_available&gt;=0 and state in ('draft', 'end', 'obsolete'), 'black':virtual_available&gt;=0 and state not in ('draft', 'end', 'obsolete')}</attribute>
                 </tree>
-            </field>
-        </record>
-
-        <record id="view_template_property_form" model="ir.ui.view">
-            <field name="name">product.template.stock.property.form.inherit</field>
-            <field name="model">product.template</field>
-            <field name="inherit_id" ref="product.product_template_form_view"/>
-            <field name="arch" type="xml">
-                <xpath expr="//group[@name='sale_condition']" position="inside">
-                    <label for="sale_delay"/>
-                    <div>
-                        <field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}" class="oe_inline" style="vertical-align:baseline"/> days
-                    </div>
-                </xpath>
-                <xpath expr="//group[@name='status']" position="after">
-                    <group name="store" string="Storage Location">
-                        <field name="loc_rack"/>
-                        <field name="loc_row"/>
-                        <field name="loc_case"/>
-                    </group>
-                </xpath>
-                <xpath expr="//group[@name='weight']" position="after">
-                    <group string="Counter-Part Locations Properties" groups="stock.group_locations">
-                        <field name="property_stock_procurement" domain="[('usage','=','procurement')]"/>
-                        <field name="property_stock_production" domain="[('usage','=','production')]"/>
-                        <field name="property_stock_inventory" domain="[('usage','=','inventory')]"/>
-                    </group>
-                </xpath>
-                <field name="product_manager" position="attributes" version="7.0">
-                    <attribute name="context">{'default_groups_ref': ['base.group_user', 'base.group_sale_manager', 'stock.group_stock_manager']}</attribute>
-                </field>
+                <tree position="inside">
+                    <field name="virtual_available" invisible="1"/>
+                </tree>
             </field>
         </record>
 
             </field>
         </record>
 
+        <!-- Product Template -->
+
+        <record id="product_template_search_form_view_stock" model="ir.ui.view">
+            <field name="name">product.template.search.stock.form</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_search_view"/>
+            <field name="arch" type="xml">
+                <field name="product_variant_ids" position="before">
+                    <separator/>
+                    <filter name="real_stock_available" string="Available Products" domain="[('qty_available','&gt;',0)]"/>
+                    <filter name="virtual_stock_available" string="Forecast Available Products" domain="[('virtual_available','&gt;',0)]"/>
+                    <filter name="real_stock_negative" string="Exhausted Stock" domain="[('qty_available','&lt;=',0)]"/>
+                    <filter name="virtual_stock_negative" string="Forecast Exhausted Stock" domain="[('virtual_available','&lt;=',0)]"/>
+                </field>
+                <filter name="consumable" position="before">
+                   <filter string="Products" icon="terp-accessories-archiver" domain="[('type','=','product')]" help="Stockable products"/>
+                </filter>
+            </field>
+        </record>
+
+        <record id="view_template_property_form" model="ir.ui.view">
+            <field name="name">product.template.stock.property.form.inherit</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
+            <field name="arch" type="xml">
+                <group name="sale_condition" position="inside">
+                    <label for="sale_delay"/>
+                    <div>
+                        <field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}" class="oe_inline" style="vertical-align:baseline"/> days
+                    </div>
+                </group>
+                <group name="status" position="before">
+                    <group string="Stock and Expected Variations" attrs="{'invisible': [('type', '=', 'service')]}" groups="base.group_user">
+                        <label for="qty_available"/>
+                            <div>
+                                <field name="qty_available" class="oe_inline"/>
+                                <button name="%(action_view_change_product_quantity)d" string="⇒ Update"
+                                    type="action"
+                                    class="oe_link"/>
+                            </div>
+                        <label for="incoming_qty"/>
+                            <div>
+                                <field name="incoming_qty" class="oe_inline"/>
+                                <button string="⇒ Request Procurement" name="%(stock.act_make_procurement)d" type="action" class="oe_link"/>
+                            </div>
+                        <field name="virtual_available"/>
+                    </group>
+                </group>
+                <group name="status" position="after">
+                    <group name="store" string="Storage Location" attrs="{'invisible':[('type','=','service')]}">
+                        <field name="loc_rack"/>
+                        <field name="loc_row"/>
+                        <field name="loc_case"/>
+                    </group>
+                </group>
+                <group name="weight" position="before">
+                    <group name="store" groups="stock.group_locations" string="Counter-Part Locations Properties">
+                        <field name="property_stock_procurement" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','procurement')]"/>
+                        <field name="property_stock_production" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','production')]"/>
+                        <field name="property_stock_inventory"  attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','inventory')]"/>
+                    </group>
+                </group>
+                <field name="product_manager" position="attributes" version="7.0">
+                    <attribute name="context">{'default_groups_ref': ['base.group_user', 'base.group_sale_manager', 'stock.group_stock_manager']}</attribute>
+                </field>
+                <xpath expr="//div[@name='buttons']" position="inside">
+                    <button class="oe_inline oe_stat_button" name="action_view_routes" string="Routes" type="object" icon="fa-cogs"/>
+                </xpath>
+                <group name="procurement_uom" position="after" >
+                   <group string="Supply Chain Information" attrs="{'invisible': [('type', '=', 'service')]}" groups="base.group_user">
+                       <field name="route_ids" widget="many2many_checkboxes"/>
+                   </group>
+                </group>
+            </field>
+        </record>
+
+        <record model="ir.ui.view" id="product_template_kanban_stock_view">
+            <field name="name">Product Template Kanban Stock</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_kanban_view"/>
+            <field name="arch" type="xml">
+                <field name="lst_price" position="after">
+                    <field name="type"/>
+                </field>
+                <ul position="inside">
+                    <li t-if="record.type.raw_value != 'service'">On hand: <field name="qty_available"/> <field name="uom_id"/></li>
+                    <li t-if="record.type.raw_value != 'service'">Forecasted: <field name="virtual_available"/> <field name="uom_id"/></li>
+                </ul>
+            </field>
+        </record>
+
+        <!-- Product Variant -->
+
+        <record id="product_search_form_view_stock" model="ir.ui.view">
+            <field name="name">product.search.stock.form</field>
+            <field name="model">product.product</field>
+            <field name="inherit_id" ref="product.product_search_form_view"/>
+            <field name="arch" type="xml">
+                <field name="pricelist_id" position="before">
+                    <field name="location_id" widget="selection" context="{'location': self}"/>
+                    <field name="warehouse_id" widget="selection" context="{'warehouse': self}"/>
+                </field>
+            </field>
+        </record>
+
         <record model="ir.ui.view" id="product_kanban_stock_view">
             <field name="name">Product Kanban Stock</field>
             <field name="model">product.product</field>
             <field name="inherit_id" ref="product.product_kanban_view"/>
             <field name="arch" type="xml">
-                <field name="list_price" position="after">
+                <field name="lst_price" position="after">
                     <field name="reception_count"/>
                     <field name="delivery_count"/>
                 </field>
                         <t t-esc="record.delivery_count.value"/> Delivery
                     </a>
                 </xpath>
-                <ul position="inside">
-                    <li t-if="record.type.raw_value != 'service'">On hand: <field name="qty_available"/> <field name="uom_id"/></li>
-                    <li t-if="record.type.raw_value != 'service'">Forecasted: <field name="virtual_available"/> <field name="uom_id"/></li>
-                </ul>
             </field>
         </record>
 
+        <record model="ir.ui.view" id="product_form_view_procurement_button">
+            <field name="name">product.product.procurement</field>
+            <field name="model">product.product</field>
+            <field name="inherit_id" ref="product.product_normal_form_view"/>
+            <field name="arch" type="xml">
+                <group name="status" position="before" version="7.0">
+                    <group name="lot" groups="stock.group_tracking_lot,stock.group_production_lot" string="Lots">
+                        <field name="track_all" groups="stock.group_production_lot"/>
+                        <field name="track_incoming" groups="stock.group_production_lot" attrs="{'invisible': [('track_all', '=', True)]}"/>
+                        <field name="track_outgoing" groups="stock.group_production_lot" attrs="{'invisible': [('track_all', '=', True)]}"/>
+                    </group>
+                </group>
+                <xpath expr="//div[@name='buttons']" position="inside">
+                   <button class="oe_inline oe_stat_button" string="Current Stock" name="%(product_open_quants)d" type="action"  attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_locations" icon="fa-bank"/>
+                   <button class="oe_inline oe_stat_button" string="Moves" name= "%(act_product_stock_move_open)d" type="action" attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_stock_user" icon="fa-arrows-h"/>
+                   <button class="oe_inline oe_stat_button" name="%(product_open_orderpoint)d" type="action" 
+                        attrs="{'invisible':[('type', '=', 'service')]}" icon="fa-pinterest" string="Reordering Rules"/>
+                </xpath>
+            </field>
+        </record>
     </data>
-</openerp>
+</openerp>
\ No newline at end of file
index 06aba6e..30565d1 100644 (file)
             action="product.product_category_action_form" id="menu_product_category_config_stock"
             parent="stock.menu_product_in_config_stock" sequence="0"/>
         <menuitem
-            action="product.product_variant_action" id="menu_product_variant_config_stock"
-            parent="stock.menu_product_in_config_stock" groups="product.group_product_variant" sequence="2"/>
+            action="product.product_normal_action" id="menu_product_variant_config_stock"
+            parent="stock.menu_product_in_config_stock" sequence="2"/>
         <menuitem
             action="product.product_template_action" id="menu_product_template_config_stock"
-            parent="stock.menu_product_in_config_stock" groups="product.group_product_variant" sequence="1"/>
+            parent="stock.menu_product_in_config_stock" sequence="1"/>
         <menuitem
             action="product.product_ul_form_action" groups="product.group_stock_packaging"
             id="menu_product_packaging_stock_action" parent="stock.menu_product_in_config_stock" sequence="3"/>
             <field name="name">Quants</field>
             <field name="res_model">stock.quant</field>
         </record>
-
-<!-->
-        <record model="ir.ui.view" id="product_template_form_view_procurement">
-            <field name="name">product.template.procurement</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_template_form_view"/>
-            <field name="arch" type="xml">
-                <xpath expr="//field[@name='standard_price']" position="after" >
-                   <group name="procurement_help" col="1" groups="base.group_user">
-                       <field name="route_ids" widget="many2many_tags"/>
-                   </group>
-                </xpath>
-            </field>
-        </record>-->
-        <record id="product_search_form_view_procurment" model="ir.ui.view">
-            <field name="name">product.search.procurment.form</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_search_form_view"/>
-            <field name="arch" type="xml">
-                <filter name="consumable" position="before">
-                   <filter string="Products" icon="terp-accessories-archiver" domain="[('type','=','product')]" help="Stockable products"/>
-                </filter>
-            </field>
-        </record>
-
-        <record id="view_normal_procurement_locations_form" model="ir.ui.view">
-            <field name="name">product.normal.procurement.locations.inherit</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
-            <field name="arch" type="xml">
-                
-                <xpath expr="//group[@name='procurement_uom']" position="after" >
-                   <newline/>
-                   <group string="Supply Chain Information" attrs="{'invisible': [('type', '=', 'service')]}">
-                       <field name="route_ids" widget="many2many_checkboxes"/>
-                   </group>
-                   <newline/>
-                </xpath>
-                
-                <xpath expr="//div[@name='buttons']" position="inside">
-                   <button string="Current Stock" name="%(product_open_quants)d" type="action"  attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_locations"/>
-                   <button string="Moves" name= "%(act_product_stock_move_open)d" type="action" attrs="{'invisible':[('type', '=', 'service')]}" groups="stock.group_stock_user"/>
-                   <button class="oe_inline oe_stat_button" name="%(product_open_orderpoint)d" type="action" 
-                        attrs="{'invisible':[('type', '=', 'service')]}" icon="fa-pinterest" string="Reordering Rules"/>
-                </xpath>
-                
-                <xpath expr="//group[@string='Sale Conditions']" position="inside">
-                    <label for="sale_delay"/>
-                        <div>
-                            <field name="sale_delay" class="oe_inline"/> days
-                        </div>
-                </xpath>                
-
-                <xpath expr="//group[@name='status']" position="after" version="7.0">
-                    <group name="store" string="Storage Location" attrs="{'invisible':[('type','=','service')]}">
-                        <field name="loc_rack"/>
-                        <field name="loc_row"/>
-                        <field name="loc_case"/>
-                    </group>
-                </xpath>
-                
-                <xpath expr="//group[@name='Weights']" position="before">
-                    <group name="store" groups="stock.group_locations" string="Counter-Part Locations Properties">
-                        <field name="property_stock_procurement" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','procurement')]"/>
-                        <field name="property_stock_production" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','production')]"/>
-                        <field name="property_stock_inventory"  attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','inventory')]"/>
-                    </group>
-                </xpath>
-
-            </field>
-        </record>
-
-        <record model="ir.ui.view" id="product_form_view_procurement_button">
-            <field name="name">product.product.procurement</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="view_normal_procurement_locations_form"/>
-            <field name="arch" type="xml">
-                <group name="status" position="before" version="7.0">
-                    <group string="Stock and Expected Variations" attrs="{'invisible': [('type', '=', 'service')]}" groups="base.group_user">
-                        <label for="qty_available"/>
-                            <div>
-                                <field name="qty_available" class="oe_inline"/>
-                                <button name="%(action_view_change_product_quantity)d" string="⇒ Update"
-                                    type="action"
-                                    class="oe_link"/>
-                            </div>
-                        <label for="incoming_qty"/>
-                        <div>
-                            <field name="incoming_qty" class="oe_inline"/>
-                            <button string="⇒ Request Procurement" name="%(act_make_procurement)d" type="action" class="oe_link"/>
-                        </div>
-                        <field name="outgoing_qty" class="oe_inline"/>
-                        <field name="virtual_available" class="oe_inline"/>
-                    </group>
-                    <group name="lot" groups="stock.group_tracking_lot,stock.group_production_lot" string="Lots">
-                        <field name="track_all" groups="stock.group_production_lot"/>
-                        <field name="track_incoming" groups="stock.group_production_lot" attrs="{'invisible': [('track_all', '=', True)]}"/>
-                        <field name="track_outgoing" groups="stock.group_production_lot" attrs="{'invisible': [('track_all', '=', True)]}"/>
-                    </group>
-                </group>
-            </field>
-        </record>
         
         <record model="ir.ui.view" id="view_quant_package_form">
             <field name="name">stock.quant.package.form</field>
         <menuitem action="action_routes_form" id="menu_stock_routes"
             parent="stock.menu_stock_configuration" sequence="11" />
 
-        <record id="view_product_procurement_rule_form" model="ir.ui.view">
-            <field name="name">product.template.procurement.rule.inherit</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
-            <field name="arch" type="xml">
-                <xpath expr="//div[@name='buttons']" position="inside">
-                    <button name="action_view_routes" string="Routes" type="object"  />
-                </xpath>
-            </field>
-        </record>
-
         <record id="do_view_pickings" model="ir.actions.act_window">
             <field name="name">Pickings for Groups</field>
             <field name="res_model">stock.picking</field>
index e1e4146..32ef9c6 100644 (file)
             <field name="model">product.template</field>
             <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
-                <group name="sale_condition" position="inside">
-                    <field name="sale_delay" attrs="{'readonly':[('sale_ok','=',False)]}"/>
-                </group>
-                <group name="procurement_uom" position="after">
-                    <group name="store" string="Storage Location">
-                        <field name="loc_rack"/>
-                        <field name="loc_row"/>
-                        <field name="loc_case"/>
-                    </group>
-                </group>
                 <xpath expr="//group[@name='weight']" position="after">
                     <group string="Accounting Entries">
                         <field name="property_stock_account_input" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
             <field name="inherit_id" ref="product.product_normal_form_view"/>
             <field name="arch" type="xml">
                 <field name="standard_price" position="replace" version="7.0">
-                    <field name="cost_method" groups="stock_account.group_inventory_valuation" attrs="{'readonly': [('is_only_child', '=', False)]}"/>
+                    <field name="cost_method" groups="stock_account.group_inventory_valuation"/>
                     <label string="Cost Price" for="standard_price" align="1.0" groups="base.group_user"/>
                     <div groups="base.group_user">
-                        <field name="standard_price" attrs="{'readonly':['|', ('is_only_child', '=', False), '&amp;', ('valuation','=','real_time'), ('cost_method', 'in', ['standard', 'average'])]}" nolabel="1"/>
+                        <field name="standard_price" attrs="{'readonly':['&amp;', ('valuation','=','real_time'), ('cost_method', 'in', ['standard', 'average'])]}" nolabel="1"/>
                         <button name="%(action_view_change_standard_price)d" string="- update"
-                            type="action" attrs="{'invisible':['|', '|', ('is_only_child', '=', False), ('valuation','!=', 'real_time'), ('cost_method', 'not in', ['standard', 'average'])]}"
+                            type="action" attrs="{'invisible':['|', ('valuation','!=', 'real_time'), ('cost_method', 'not in', ['standard', 'average'])]}"
                             class="oe_link" groups="stock_account.group_inventory_valuation"/>
                     </div>
                 </field>
index 6c6a20e..545bdc0 100644 (file)
@@ -281,8 +281,6 @@ class stock_move(osv.osv):
             #adapt standard price on incomming moves if the product cost_method is 'average'
             if (move.location_id.usage == 'supplier') and (move.product_id.cost_method == 'average'):
                 product = move.product_id
-                company_currency_id = move.company_id.currency_id.id
-                ctx = {'currency_id': company_currency_id}
                 product_avail = product.qty_available
                 if product.qty_available <= 0:
                     new_std_price = move.price_unit
index 93e2ec3..ebcb65a 100644 (file)
@@ -29,8 +29,8 @@ SPLIT_METHOD = [
     ('by_volume', 'By Volume'),
 ]
 
-class product_product(osv.osv):
-    _inherit = "product.product"
+class product_template(osv.osv):
+    _inherit = "product.template"
 
     _columns = {
         'landed_cost_ok': fields.boolean('Can constitute a landed cost'),
index f3db158..7003971 100644 (file)
@@ -3,21 +3,23 @@
     <data>
 
         <record id="view_product_landed_cost_form" model="ir.ui.view">
-            <field name="name">product.product.landed.cost.form</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
+            <field name="name">product.template.landed.cost.form</field>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
-                <div name="options" position="after">
-                    <field name="landed_cost_ok"/>
-                    <label for="landed_cost_ok"/>
+                <div name="options" position="inside">
+                    <div>
+                        <field name="landed_cost_ok"/>
+                        <label for="landed_cost_ok"/>
+                    </div>
                 </div>
-                <xpath expr="//group[@name='properties']" position="before">
+                <group name="properties" position="before">
                     <group attrs="{'invisible':[('landed_cost_ok','=',False)]}">
                         <group colspan="2" col="2">
                             <field name="split_method"/>
                         </group>
                     </group>
-                </xpath>
+                </group>
             </field>
         </record>
 
index be59482..d42ce95 100644 (file)
            <field name="arch" type="xml">
                 <form string="Landed Costs" version="7.0">
                    <sheet>
-                        <field name="is_only_child" invisible="1"/>
-                        <field name="image_medium" widget="image" class="oe_avatar oe_left"
-                            attrs="{'readonly': [('is_only_child', '=', False)]}"/>
+                        <field name="image_medium" widget="image" class="oe_avatar oe_left"/>
                         <div class="oe_title">
                             <div class="oe_edit_only">
-                                <label for="name" name='label_name' string="Product Name"
-                                    attrs="{'invisible': [('is_only_child', '=', False)]}"/>
+                                <label for="name" name='label_name' string="Product Name"/>
                             </div>
                             <h1>
-                                <field name="name" class="oe_inline"
-                                    attrs="{'required': [('is_only_child', '=', True)],
-                                            'invisible': [('is_only_child', '=', False)]}"/>
+                                <field name="name" class="oe_inline"/>
                             </h1>
                             <label for="categ_id" class="oe_edit_only"/>
-                            <h2><field name="categ_id" attrs="{'readonly': [('is_only_child', '=', False)]}"/></h2>
+                            <h2><field name="categ_id"/></h2>
                             <div name="options" groups="base.group_user">
                                <field name="landed_cost_ok" readonly="1"/>
                                <label for="landed_cost_ok"/>
                                         <field name="property_account_expense"/>
                                     </group>
                                     <group>
-                                        <field name="company_id" groups="base.group_multi_company" widget="selection"
-                                            attrs="{'invisible': [('is_only_child', '=', False)]}"/>
-                                        <field name="type" attrs="{'invisible': [('is_only_child', '=', False)]}"/>
+                                        <field name="company_id" groups="base.group_multi_company" widget="selection"/>
+                                        <field name="type"/>
                                     </group>
                                 </group>
-                                <field name="description" placeholder="describe the product characteristics..."
-                                    attrs="{'readonly': [('is_only_child', '=', False)]}"/>
+                                <field name="description" placeholder="describe the product characteristics..."/>
                             </page>
                         </notebook>
                     </sheet>
index 45cc07b..dfafea3 100644 (file)
@@ -19,7 +19,6 @@
 #
 ##############################################################################
 
-import time
 from openerp.osv import fields,osv
 from openerp.tools.translate import _
 
@@ -165,34 +164,6 @@ class stock_picking(osv.osv):
             if partner.picking_warn == 'block':
                 return {'value': {'partner_id': False}, 'warning': warning}
 
-        result =  super(stock_picking, self).onchange_partner_in(cr, uid, ids, partner_id, context)
-        if result.get('warning',False):
-            warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title']
-            warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message']
-
-        return {'value': result.get('value',{}), 'warning':warning}
-
-
-class stock_picking(osv.osv):
-    _inherit = 'stock.picking'
-
-    def onchange_partner_in(self, cr, uid, ids, partner_id=None, context=None):
-        if not partner_id:
-            return {}
-        partner = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
-        warning = {}
-        title = False
-        message = False
-        if partner.picking_warn != 'no-message':
-            title = _("Warning for %s") % partner.name
-            message = partner.picking_warn_msg
-            warning = {
-                'title': title,
-                'message': message
-            }
-            if partner.picking_warn == 'block':
-                return {'value': {'partner_id': False}, 'warning': warning}
-
         result =  super(stock_picking_in, self).onchange_partner_in(cr, uid, ids, partner_id, context)
         if result.get('warning',False):
             warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title']
@@ -202,7 +173,7 @@ class stock_picking(osv.osv):
 
 
 class product_product(osv.osv):
-    _inherit = 'product.product'
+    _inherit = 'product.template'
     _columns = {
          'sale_line_warn' : fields.selection(WARNING_MESSAGE,'Sales Order Line', help=WARNING_HELP, required=True),
          'sale_line_warn_msg' : fields.text('Message for Sales Order Line'),
index 04a3553..fdb199d 100644 (file)
@@ -40,8 +40,8 @@
 
         <record id="product_warning_form_view" model="ir.ui.view">
             <field name="name">product.warning.form.inherit</field>
-            <field name="model">product.product</field>
-            <field name="inherit_id" ref="product.product_normal_form_view"/>
+            <field name="model">product.template</field>
+            <field name="inherit_id" ref="product.product_template_form_view"/>
             <field name="arch" type="xml">
                 <notebook position="inside">
                     <page string="Warnings">
index 24c5f08..56bc4b0 100644 (file)
@@ -4,7 +4,6 @@
         <record id="product_template_quote_1" model="product.template">
             <field name="name">Functional Training</field>
             <field name="categ_id" ref="product.product_category_5"/>
-            <field name="public_categ_id" ref="product.Computer_all_in_one"/>
             <field name="standard_price">50000.0</field>
             <field name="list_price">750000.0</field>
             <field name="type">service</field>
@@ -21,7 +20,6 @@
         <record id="product_template_quote_2" model="product.template">
             <field name="name">Technical Training</field>
             <field name="categ_id" ref="product.product_category_5"/>
-            <field name="public_categ_id" ref="product.Computer_all_in_one"/>
             <field name="standard_price">50000.0</field>
             <field name="list_price">0.0</field>
             <field name="type">service</field>
@@ -38,7 +36,6 @@
         <record id="product_template_quote_3" model="product.template">
             <field name="name">Advanced CRM Functional</field>
             <field name="categ_id" ref="product.product_category_5"/>
-            <field name="public_categ_id" ref="product.Computer_all_in_one"/>
             <field name="standard_price">50000.0</field>
             <field name="list_price">750000.0</field>
             <field name="type">service</field>
index ff4761a..4605cf3 100644 (file)
@@ -120,19 +120,33 @@ class website_sale(http.Controller):
 
         domain = request.website.sale_product_domain()
         if search:
-            domain += ['|', ('name', 'ilike', search), ('description', 'ilike', search)]
+            domain += ['|', '|', '|', ('name', 'ilike', search), ('description', 'ilike', search),
+                ('description_sale', 'ilike', search), ('product_variant_ids.default_code', 'ilike', search)]
         if category:
-            domain += [('product_variant_ids.public_categ_id', 'child_of', int(category))]
+            domain += [('product_variant_ids.public_categ_ids', 'child_of', int(category))]
 
-        attrib_values = map(int,request.httprequest.args.getlist('attrib'))
+        attrib_values = [map(int,v.split(",")) for v in request.httprequest.args.getlist('attrib') if v]
+        attrib = None
         if attrib_values:
-            domain += [('attribute_lines.value_id', 'in', attrib_values)]
-        attrib_set = set(attrib_values) 
+            for value in attrib_values:
+                if not attrib:
+                    attrib = value[0]
+                    dom = [('variant_ids.value_ids', '=', value[1])]
+                elif value[0] == attrib:
+                    dom = ['&'] + dom + [('variant_ids.value_ids', '=', value[1])]
+                else:
+                    attrib = None
+                    domain += dom
+            if attrib:
+                domain += dom
+
+        attrib_set = set([v[1] for v in attrib_values])
         keep = QueryURL('/shop', category=category and int(category), search=search, attrib=attrib_set)
 
         if not context.get('pricelist'):
             context['pricelist'] = int(self.get_pricelist())
         product_obj = pool.get('product.template')
+
         product_count = product_obj.search_count(cr, uid, domain, context=context)
         pager = request.website.pager(url="/shop", total=product_count, page=page, step=PPG, scope=7, url_args=post)
         product_ids = product_obj.search(cr, uid, domain, limit=PPG+10, offset=pager['offset'], order='website_published desc, website_sequence desc', context=context)
@@ -154,6 +168,7 @@ class website_sale(http.Controller):
         values = {
             'search': search,
             'category': category and int(category),
+            'attrib_values': attrib_values,
             'attrib_set': attrib_set,
             'pager': pager,
             'pricelist': self.get_pricelist(),
@@ -175,11 +190,13 @@ class website_sale(http.Controller):
         cr, uid, context, pool = request.cr, request.uid, request.context, request.registry
         category_obj = pool['product.public.category']
 
+        context.update(active_id=product.id)
+
         if category:
             category = category_obj.browse(request.cr, request.uid, int(category), context=request.context)
 
         attrib_values = map(int,request.httprequest.args.getlist('attrib'))
-        attrib_set = set(attrib_values) 
+        attrib_set = set(attrib_values)
 
         keep = QueryURL('/shop', category=category and category.id, search=search, attrib=attrib_set)
 
@@ -684,7 +701,7 @@ class website_sale(http.Controller):
         if not name:
             name = _("New Product")
         product_obj = request.registry.get('product.product')
-        product_id = product_obj.create(cr, uid, { 'name': name, 'public_categ_id': category }, context=context)
+        product_id = product_obj.create(cr, uid, { 'name': name, 'public_categ_ids': category }, context=context)
         product = product_obj.browse(cr, uid, product_id, context=context)
 
         return request.redirect("/shop/product/%s?enable_editor=1" % slug(product.product_tmpl_id))
index 5d0f33b..e28b95f 100644 (file)
@@ -2,11 +2,6 @@
 <openerp>
     <data noupdate="1">
 
-        <record id="product.group_product_attributes" model="res.groups">
-            <field name="name">Product Attributes</field>
-            <field name="category_id" ref="base.module_category_hidden"/>
-        </record>
-
         <record id="menu_shop" model="website.menu">
             <field name="name">Shop</field>
             <field name="url">/shop</field>
@@ -39,5 +34,9 @@
             <field name="use_quotations" eval="False"/>
         </record>
 
+        <!-- Product Public Categories -->
+        <record id="categ_others" model="product.public.category">
+            <field name="name">Others</field>
+        </record>
     </data>
 </openerp>
index f64b6e9..5fc2f7e 100644 (file)
@@ -536,13 +536,13 @@ Weight: 1.1 ounces</field>
                     </div>
                 </section>
             </field>
-            <field name="accessory_product_ids" eval="[(6, 0, [ref('product.product_template_7')])]"/>
+            <field name="accessory_product_ids" eval="[(6, 0, [ref('product.product_product_7')])]"/>
         </record>
 
         <record id="item1" model="product.pricelist.item">
             <field name="price_version_id" ref="product.ver0"/>
             <field name="base" ref="product.list_price"/>
-            <field name="product_id" ref="product.product_product_4"/>
+            <field name="product_tmpl_id" ref="product.product_product_4_product_template"/>
             <field name="name">Demo Discount</field>
             <field name="price_discount">-0.2000</field>
             <field name="sequence">1</field>
@@ -552,5 +552,260 @@ Weight: 1.1 ounces</field>
             <field name="member_ids" eval="[(4, ref('base.user_root'), ref('base.user_demo'))]"/>
         </record>
         
+
+
+    <!-- product.public.category -->
+
+        <record id="product.computers" model="product.public.category">
+          <field name="name">Computers</field>
+        </record>
+        
+        <record id="product.Components" model="product.public.category">
+          <field name="parent_id" ref="product.computers"/>
+          <field name="name">Components</field>
+        </record>
+
+        <record id="product.case" model="product.public.category">
+          <field name="parent_id" ref="product.Components"/>
+          <field name="name">Case</field>
+        </record>
+        <record id="product.HDD" model="product.public.category">
+          <field name="parent_id" ref="product.Components"/>
+          <field name="name">Hard Drive</field>
+        </record>
+        <record id="product.motherboard" model="product.public.category">
+          <field name="parent_id" ref="product.Components"/>
+          <field name="name">Motherboard</field>
+        </record>
+        <record id="product.graphics_card" model="product.public.category">
+          <field name="parent_id" ref="product.Components"/>
+          <field name="name">Graphics Card</field>
+        </record>
+        <record id="product.Memory" model="product.public.category">
+          <field name="parent_id" ref="product.Components"/>
+          <field name="name">Memory</field>
+        </record>
+        <record id="product.processor" model="product.public.category">
+          <field name="parent_id" ref="product.Components"/>
+          <field name="name">Processor</field>
+        </record>
+        <record id="product.video_acquisition" model="product.public.category">
+          <field name="parent_id" ref="product.Components"/>
+          <field name="name">Video Acquisition</field>
+        </record>
+
+        <record id="product.devices" model="product.public.category">
+          <field name="parent_id" ref="product.computers"/>
+          <field name="name">Devices</field>
+        </record>
+
+        <record id="product.Screen" model="product.public.category">
+          <field name="parent_id" ref="product.devices"/>
+          <field name="name">Screen</field>
+        </record>
+        <record id="product.Pen_Drive" model="product.public.category">
+          <field name="parent_id" ref="product.devices"/>
+          <field name="name">Pen Drive</field>
+        </record>
+        <record id="product.External_Hard_Drive" model="product.public.category">
+          <field name="parent_id" ref="product.devices"/>
+          <field name="name">External Hard Drive</field>
+        </record>
+        <record id="product.Keyboard_Mouse" model="product.public.category">
+          <field name="parent_id" ref="product.devices"/>
+          <field name="name">Keyboard / Mouse</field>
+        </record>
+        <record id="product.printer" model="product.public.category">
+          <field name="parent_id" ref="product.devices"/>
+          <field name="name">Printer</field>
+        </record>
+        <record id="product.Speakers" model="product.public.category">
+          <field name="parent_id" ref="product.devices"/>
+          <field name="name">Speakers</field>
+        </record>
+        <record id="product.Headset" model="product.public.category">
+          <field name="parent_id" ref="product.devices"/>
+          <field name="name">Headset</field>
+        </record>
+        <record id="product.Software" model="product.public.category">
+          <field name="parent_id" ref="product.devices"/>
+          <field name="name">Software</field>
+        </record>
+
+        <record id="product.laptops" model="product.public.category">
+          <field name="parent_id" ref="product.computers"/>
+          <field name="name">Laptops</field>
+        </record>
+
+        <record id="product.sub_computers" model="product.public.category">
+          <field name="parent_id" ref="product.computers"/>
+          <field name="name">Computers</field>
+        </record>
+
+        <record id="product.Computer_all_in_one" model="product.public.category">
+          <field name="parent_id" ref="product.sub_computers"/>
+          <field name="name">Computer all-in-one</field>
+        </record>
+        <record id="product.server" model="product.public.category">
+          <field name="parent_id" ref="product.sub_computers"/>
+          <field name="name">Server</field>
+        </record>
+
+        <record id="product.network" model="product.public.category">
+          <field name="parent_id" ref="product.computers"/>
+          <field name="name">Network</field>
+        </record>
+
+        <record id="product.Switch" model="product.public.category">
+          <field name="parent_id" ref="product.network"/>
+          <field name="name">Switch</field>
+        </record>
+        <record id="product.Modem_Router" model="product.public.category">
+          <field name="parent_id" ref="product.network"/>
+          <field name="name">Modem &amp; Router</field>
+        </record>
+        <record id="product.Switch" model="product.public.category">
+          <field name="parent_id" ref="product.network"/>
+          <field name="name">Switch</field>
+        </record>
+        
+        <record id="product.services" model="product.public.category">
+          <field name="parent_id" ref="product.computers"/>
+          <field name="name">Services</field>
+        </record>
+
+        <record id="product.product_product_1_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.services')])]"/>
+        </record>
+        <record id="product.product_product_2_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.services')])]"/>
+        </record>
+        <record id="product.product_product_3_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Computer_all_in_one')])]"/>
+        </record>
+        <record id="product.product_product_4_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Computer_all_in_one')])]"/>
+        </record>
+        <record id="product.product_product_5_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Speakers')])]"/>
+        </record>
+        <record id="product.product_product_6_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Screen')])]"/>
+        </record>
+        <record id="product.product_product_7_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Screen')])]"/>
+        </record>
+        <record id="product.product_product_9_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Keyboard_Mouse')])]"/>
+        </record>
+        <record id="product.product_product_10_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Keyboard_Mouse')])]"/>
+        </record>
+        <record id="product.product_product_11_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Keyboard_Mouse')])]"/>
+        </record>
+        <record id="product.product_product_12_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Keyboard_Mouse')])]"/>
+        </record>
+        <record id="product.product_product_13_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Memory')])]"/>
+        </record>
+        <record id="product.product_product_14_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Memory')])]"/>
+        </record>
+        <record id="product.product_product_15_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Memory')])]"/>
+        </record>
+        <record id="product.product_product_16_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.case')])]"/>
+        </record>
+        <record id="product.product_product_17_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.HDD')])]"/>
+        </record>
+        <record id="product.product_product_18_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.HDD')])]"/>
+        </record>
+        <record id="product.product_product_19_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.HDD')])]"/>
+        </record>
+        <record id="product.product_product_20_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.motherboard')])]"/>
+        </record>
+        <record id="product.product_product_21_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.motherboard')])]"/>
+        </record>
+        <record id="product.product_product_22_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.processor')])]"/>
+        </record>
+        <record id="product.product_product_23_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.processor')])]"/>
+        </record>
+        <record id="product.product_product_24_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.graphics_card')])]"/>
+        </record>
+        <record id="product.product_product_25_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.laptops')])]"/>
+        </record>
+        <record id="product.product_product_26_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.laptops')])]"/>
+        </record>
+        <record id="product.product_product_27_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.laptops')])]"/>
+        </record>
+        <record id="product.product_product_28_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.External_Hard_Drive')])]"/>
+        </record>
+        <record id="product.product_product_29_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Pen_Drive')])]"/>
+        </record>
+        <record id="product.product_product_30_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Pen_Drive')])]"/>
+        </record>
+        <record id="product.product_product_31_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Speakers')])]"/>
+        </record>
+        <record id="product.product_product_32_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Headset')])]"/>
+        </record>
+        <record id="product.product_product_33_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Headset')])]"/>
+        </record>
+        <record id="product.product_product_34_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.video_acquisition')])]"/>
+        </record>
+        <record id="product.product_product_37_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.printer')])]"/>
+        </record>
+        <record id="product.product_product_38_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.printer')])]"/>
+        </record>
+        <record id="product.product_product_39_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.printer')])]"/>
+        </record>
+        <record id="product.product_product_40_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Software')])]"/>
+        </record>
+        <record id="product.product_product_41_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Software')])]"/>
+        </record>
+        <record id="product.product_product_42_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Software')])]"/>
+        </record>
+        <record id="product.product_product_43_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Software')])]"/>
+        </record>
+        <record id="product.product_product_44_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Software')])]"/>
+        </record>
+        <record id="product.product_product_45_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Modem_Router')])]"/>
+        </record>
+        <record id="product.product_product_46_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Pen_Drive')])]"/>
+        </record>
+        <record id="product.product_product_47_product_template" model="product.template">
+            <field name="public_categ_ids" eval="[(6,0,[ref('product.Switch')])]"/>
+        </record>
+
     </data>
 </openerp>
index daa2a61..2560575 100644 (file)
 
 from openerp.osv import osv, fields
 
-class product_attribue(osv.Model):
-    # TODO merge product.attribute, mrp.properties product_manufacturer_attributes
-    _name = "product.attribute"
-    _columns = {
-        'name': fields.char('Name', translate=True, required=True),
-        'value_ids': fields.one2many('product.attribute.value', 'attribute_id', 'Values'),
-    }
-
-class product_attribute_value(osv.Model):
-    _name = "product.attribute.value"
-    _columns = {
-        'attribute_id': fields.many2one('product.attribute', 'attribute', required=True),
-        'name': fields.char('Value', translate=True, required=True),
-    }
-
-class product_attribute_line(osv.Model):
-    _name = "product.attribute.line"
-    _order = 'attribute_id, value_id'
-    _columns = {
-        'product_tmpl_id': fields.many2one('product.template', 'Product', required=True),
-        'attribute_id': fields.many2one('product.attribute', 'attribute', required=True),
-        'value_id': fields.many2one('product.attribute.value', 'Textual Value'),
-    }
-
-    def onchange_attribute_id(self, cr, uid, ids, attribute_id, context=None):
-        return {'value': {'value_id': False}}
-
 class product_style(osv.Model):
     _name = "product.style"
     _columns = {
@@ -61,6 +34,72 @@ class product_pricelist(osv.Model):
         'code': fields.char('Promotional Code'),
     }
 
+
+class product_public_category(osv.osv):
+    _name = "product.public.category"
+    _description = "Public Category"
+    _order = "sequence, name"
+
+    _constraints = [
+        (osv.osv._check_recursion, 'Error ! You cannot create recursive categories.', ['parent_id'])
+    ]
+
+    def name_get(self, cr, uid, ids, context=None):
+        if not len(ids):
+            return []
+        reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
+        res = []
+        for record in reads:
+            name = record['name']
+            if record['parent_id']:
+                name = record['parent_id'][1]+' / '+name
+            res.append((record['id'], name))
+        return res
+
+    def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
+        res = self.name_get(cr, uid, ids, context=context)
+        return dict(res)
+
+    def _get_image(self, cr, uid, ids, name, args, context=None):
+        result = dict.fromkeys(ids, False)
+        for obj in self.browse(cr, uid, ids, context=context):
+            result[obj.id] = tools.image_get_resized_images(obj.image)
+        return result
+    
+    def _set_image(self, cr, uid, id, name, value, args, context=None):
+        return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context)
+
+    _columns = {
+        'name': fields.char('Name', required=True, translate=True),
+        'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
+        'parent_id': fields.many2one('product.public.category','Parent Category', select=True),
+        'child_id': fields.one2many('product.public.category', 'parent_id', string='Children Categories'),
+        'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of product categories."),
+        
+        # NOTE: there is no 'default image', because by default we don't show thumbnails for categories. However if we have a thumbnail
+        # for at least one category, then we display a default image on the other, so that the buttons have consistent styling.
+        # In this case, the default image is set by the js code.
+        # NOTE2: image: all image fields are base64 encoded and PIL-supported
+        'image': fields.binary("Image",
+            help="This field holds the image used as image for the cateogry, limited to 1024x1024px."),
+        'image_medium': fields.function(_get_image, fnct_inv=_set_image,
+            string="Medium-sized image", type="binary", multi="_get_image",
+            store={
+                'product.public.category': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
+            },
+            help="Medium-sized image of the category. It is automatically "\
+                 "resized as a 128x128px image, with aspect ratio preserved. "\
+                 "Use this field in form views or some kanban views."),
+        'image_small': fields.function(_get_image, fnct_inv=_set_image,
+            string="Smal-sized image", type="binary", multi="_get_image",
+            store={
+                'product.public.category': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
+            },
+            help="Small-sized image of the category. It is automatically "\
+                 "resized as a 64x64px image, with aspect ratio preserved. "\
+                 "Use this field anywhere a small image is required."),
+    }
+
 class product_template(osv.Model):
     _inherit = ["product.template", "website.seo.metadata"]
     _order = 'website_published desc, website_sequence desc, name'
@@ -72,8 +111,14 @@ class product_template(osv.Model):
             res[product.id] = "/shop/product/%s" % (product.id,)
         return res
 
+    def _get_available_variant_ids(self, cr, uid, ids, name, arg, context=None):
+        result = dict.fromkeys(ids, [])
+        for obj in self.browse(cr, uid, ids, context=context):
+            for p in obj.product_variant_ids:
+                result[obj.id].append([p.id, map(int,p.variant_ids), p.price])
+        return result
+
     _columns = {
-        'attribute_lines': fields.one2many('product.attribute.line', 'product_tmpl_id', 'Product attributes'),
         # TODO FIXME tde: when website_mail/mail_thread.py inheritance work -> this field won't be necessary
         'website_message_ids': fields.one2many(
             'mail.message', 'res_id',
@@ -85,12 +130,14 @@ class product_template(osv.Model):
         'website_published': fields.boolean('Available in the website'),
         'website_description': fields.html('Description for the website'),
         'alternative_product_ids': fields.many2many('product.template','product_alternative_rel','src_id','dest_id', string='Alternative Products', help='Appear on the product page'),
-        'accessory_product_ids': fields.many2many('product.template','product_accessory_rel','src_id','dest_id', string='Accessory Products', help='Appear on the shopping cart'),
+        'accessory_product_ids': fields.many2many('product.product','product_accessory_rel','src_id','dest_id', string='Accessory Products', help='Appear on the shopping cart'),
         'website_size_x': fields.integer('Size X'),
         'website_size_y': fields.integer('Size Y'),
         'website_style_ids': fields.many2many('product.style', string='Styles'),
         'website_sequence': fields.integer('Sequence', help="Determine the display order in the Website E-commerce"),
         'website_url': fields.function(_website_url, string="Website url", type="char"),
+        'available_variant_ids': fields.function(_get_available_variant_ids, string='Available Variants'),
+        'public_categ_ids': fields.many2many('product.public.category', string='Public Category', help="Those categories are used to group similar products for e-commerce."),
     }
 
     def _defaults_website_sequence(self, cr, uid, *l, **kwargs):
@@ -154,4 +201,17 @@ class product_product(osv.Model):
         temp_id = self.browse(cr, uid, ids[0], context=context).product_tmpl_id.id
         return "/website/image?model=product.template&field=%s&id=%s" % (field, temp_id)
 
-# vim:et:
+class product_attribute(osv.Model):
+    _inherit = "product.attribute"
+    _columns = {
+        'type': fields.selection([('radio', 'Radio'), ('select', 'Select'), ('color', 'Color')], string="Type", type="char"),
+    }
+    _defaults = {
+        'type': lambda *a: 'radio',
+    }
+
+class product_attribute_value(osv.Model):
+    _inherit = "product.attribute.value"
+    _columns = {
+        'color': fields.char("Color for Color Attributes"),
+    }
diff --git a/addons/website_sale/models/res_config.py b/addons/website_sale/models/res_config.py
deleted file mode 100644 (file)
index 4ee2661..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-from openerp.osv import osv, fields
-
-class sale_configuration(osv.osv_memory):
-    _inherit = 'sale.config.settings'
-
-    _columns = {
-        'group_product_attributes': fields.boolean("Support custom product attributes",
-            group='base.group_user,base.group_portal,base.group_public',
-            implied_group='product.group_product_attributes',
-            help="Lets you add multiple custom attributes on products, "
-                 "usable to filter and compare them. "
-                 "For example if you sell computers, you could add custom attributes such as RAM size "
-                 "or CPU speed to compare your products"""),
-    }
index 0f4f5af..c1774ff 100644 (file)
@@ -2,13 +2,15 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
 access_product_product_public,product.product.public,product.model_product_product,,1,0,0,0
 access_product_template_public,product.template.public,product.model_product_template,,1,0,0,0
 access_product_category_public,product.category.public,product.model_product_category,,1,0,0,0
-access_product_public_category_public,product.category.public,product.model_product_public_category,,1,0,0,0
+access_product_category_pos_manager,product.public.category manager,model_product_public_category,base.group_sale_manager,1,1,1,1
+access_product_public_category_public,product.category.public,model_product_public_category,,1,0,0,0
 access_product_pricelist_version_public,product.pricelist.version.public,product.model_product_pricelist_version,,1,0,0,0
 access_product_pricelist_public,product.pricelist.public,product.model_product_pricelist,,1,0,0,0
 access_product_pricelist_item_public,product.pricelist.item.public,product.model_product_pricelist_item,,1,0,0,0
 access_product_product_price_type_public,product.price.type.public,product.model_product_price_type,,1,0,0,0
-access_product_attribute,product.attribute.public,website_sale.model_product_attribute,,1,0,0,0
-access_product_attribute_value,product.attribute.value.public,website_sale.model_product_attribute_value,,1,0,0,0
-access_product_attribute_line,product.attribute.line.public,website_sale.model_product_attribute_line,,1,0,0,0
 access_product_style,product.style.public,website_sale.model_product_style,,1,0,0,0
 access_product_supplierinfo,product.supplierinfo.public,product.model_product_supplierinfo,,1,0,0,0
+access_product_attribute_public,product.attribute public,product.model_product_attribute,base.group_public,1,0,0,0
+access_product_attribute_value_public,product.attribute value public,product.model_product_attribute_value,base.group_public,1,0,0,0
+access_product_attribute_price_public,product.attribute price public,product.model_product_attribute_price,base.group_public,1,0,0,0
+access_product_attribute_line_public,product.attribute line public,product.model_product_attribute_line,base.group_public,1,0,0,0
index 3e5e692..5ba5bd0 100644 (file)
 }
 
 /* product detail */
+.css_attribute_color {
+  display: inline-block;
+  border: 1px solid #999999;
+  text-align: center;
+}
+.css_attribute_color input {
+  margin: 8px;
+  height: 13px;
+}
+
+.js_add_cart_variants option.css_not_available {
+  color: #cccccc;
+}
+.js_add_cart_variants label.css_not_available {
+  opacity: 0.3;
+}
+.js_add_cart_variants label.css_not_available input {
+  opacity: 0;
+}
+
 .product_detail_img {
   margin-left: auto;
   margin-right: auto;
index 128b1a2..a5c552b 100644 (file)
 
 /* product detail */
 
+.css_attribute_color
+    display: inline-block
+    border: 1px solid #999999
+    text-align: center
+    input
+        margin: 8px
+        height: 13px
+.js_add_cart_variants
+    option.css_not_available
+        color: #ccc
+    label.css_not_available
+        opacity: 0.3
+        input
+            opacity: 0
+
 .product_detail_img
     margin-left: auto
     margin-right: auto
index 7bdcc0f..3eca81f 100644 (file)
@@ -4,6 +4,40 @@
     var website = openerp.website;
 
     website.Tour.register({
+        id:   'shop_customize',
+        name: "Customize the page and search a product",
+        path: '/shop',
+        mode: 'test',
+        steps: [
+            {
+                title:     "open customize menu",
+                element:   '#customize-menu-button',
+            },
+            {
+                title:     "click on 'Product Attribute's Filters'",
+                element:   "#customize-menu a:contains(Product Attribute's Filters)",
+            },
+            {
+                title:     "select product attribute memory 16 Go",
+                element:   'form.js_attributes label:contains(16 Go) input:not(:checked)',
+            },
+            {
+                title:     "check the selection",
+                waitFor:   'form.js_attributes label:contains(16 Go) input:checked',
+            },
+            {
+                title:     "select ipod",
+                waitNot:   '.oe_website_sale .oe_product_cart:eq(2)',
+                element:   '.oe_product_cart a:contains("iPod")',
+            },
+            {
+                title:     "finish",
+                waitFor:   'label:contains(32 Go) input',
+            }
+        ]
+    });
+
+    website.Tour.register({
         id:   'shop_buy_product',
         name: "Try to buy products",
         path: '/shop',
             },
             {
                 title:     "select ipod 32Go",
-                element:   'input[name="product_id"]:not([checked])',
+                waitFor:   '#product_detail',
+                element:   'label:contains(32 Go) input',
             },
             {
                 title:     "click on add to cart",
-                waitFor:   'input[name="product_id"]:eq(1)[checked]',
+                waitFor:   'label:contains(32 Go) input[checked]',
                 element:   'form[action="/shop/cart/update"] .btn',
             },
             {
             {
                 title:     "add one more iPod",
                 waitFor:   '.my_cart_quantity:contains(2)',
-                element:   '#cart_products tr:contains("iPod - 32 Gb") a.js_add_cart_json:eq(1)',
+                element:   '#cart_products tr:contains("32 Go") a.js_add_cart_json:eq(1)',
             },
             {
                 title:     "remove Headphones",
-                waitFor:   '#cart_products tr:contains("iPod - 32 Gb") input.js_quantity[value=2]',
+                waitFor:   '#cart_products tr:contains("32 Go") input.js_quantity[value=2]',
                 element:   '#cart_products tr:contains("Apple In-Ear Headphones") a.js_add_cart_json:first',
             },
             {
index 6e3102e..2efbbbd 100644 (file)
@@ -46,59 +46,71 @@ $(document).ready(function () {
     $('.a-submit').on('click', function () {
         $(this).closest('form').submit();
     });
+    $('form.js_attributes input, form.js_attributes select').on('change', function () {
+        $(this).closest("form").submit();
+    });
 
     // change price when they are variants
+    var $price = $(".oe_price .oe_currency_value");
     $('form.js_add_cart_json label').on('mouseup', function (ev) {
         ev.preventDefault();
         var $label = $(ev.currentTarget);
-        var $price = $label.parent("form").find(".oe_price .oe_currency_value");
         if (!$price.data("price")) {
             $price.data("price", parseFloat($price.text()));
         }
-        $price.html($price.data("price")+parseFloat($label.find(".badge span").text() || 0));
+        var value = $price.data("price") + parseFloat($label.find(".badge span").text() || 0);
+        var dec = value % 1;
+        $price.html(value + (dec < 0.01 ? ".00" : (dec < 1 ? "0" : "") ));
     });
 
-    // attributes
+    var $form_var = $('form.js_add_cart_variants');
+    var variant_ids = $form_var.data("variant_ids");
+    $form_var.on('change', 'input, select', function (ev) {
+        var values = [];
+        $form_var.find("label").removeClass("text-muted css_not_available");
+        $form_var.find(".a-submit").removeProp("disabled");
 
-    var js_slider_time = null;
-    var $form = $("form.attributes");
-    $form.on("change", "label input", function () {
-        $form.submit();
-    });
-    $(".js_slider", $form).each(function() {
-        var $slide = $(this);
-        var $slider = $('<div>'+
-                '<input type="hidden" name="att-'+$slide.data("id")+'-minmem" value="'+$slide.data("min")+'"/>'+
-                '<input type="hidden" name="att-'+$slide.data("id")+'-maxmem" value="'+$slide.data("max")+'"/>'+
-            '</div>');
-        var $min = $("<input readonly name='att-"+$slide.data("id")+"-min'/>")
-            .css("border", "0").css("width", "50%")
-            .val($slide.data("min"));
-        var $max = $("<input readonly name='att-"+$slide.data("id")+"-max'/>")
-            .css("border", "0").css("width", "50%").css("text-align", "right")
-            .val($slide.data("max"));
-        $slide.append($min);
-        $slide.append($max);
-        $slide.append($slider);
-        $slider.slider({
-            range: true,
-            min: +$slide.data("min"),
-            max: +$slide.data("max"),
-            values: [
-                $slide.data("value-min") ? +$slide.data("value-min") : +$slide.data("min"),
-                $slide.data("value-max") ? +$slide.data("value-max") : +$slide.data("max")
-            ],
-            change: function( event, ui ) {
-                $min.val( ui.values[ 0 ] );
-                $max.val( ui.values[ 1 ] );
-                $form.submit();
-            },
-            slide: function( event, ui ) {
-                $min.val( ui.values[ 0 ] );
-                $max.val( ui.values[ 1 ] );
+        $form_var.find('input:checked, select').each(function () {
+            values.push(+$(this).val());
+        });
+        var available = false;
+        for (var k in variant_ids) {
+            if (_.isEqual(variant_ids[k][1], values)) {
+                var dec = variant_ids[k][2] % 1;
+                $('input[name="product_id"]').val(variant_ids[k][0]);
+                $price.html(variant_ids[k][2] + (dec < 0.01 ? ".00" : (dec < 1 ? "0" : "") ));
+                available = true;
+                break;
             }
+        }
+
+        $form_var.find("input:radio, select").each(function () {
+            var id = +$(this).val();
+            var values = [id];
+            $form_var.find(">ul>li:not(:has(input[value='" + id + "'])) input:checked, select").each(function () {
+                values.push(+$(this).val());
+            });
+            for (var k in variant_ids) {
+                if (!_.difference(values, variant_ids[k][1]).length) {
+                    return;
+                }
+            }
+            $(this).parents("label:not(.css_attribute_color):first").addClass("text-muted");
+            $(this).parents("label.css_attribute_color:first").addClass("css_not_available");
+            $(this).find("option[value='" + id + "']").addClass("css_not_available");
         });
-        $min.val( $slider.slider( "values", 0 ) );
-        $max.val( $slider.slider( "values", 1 ) );
+
+        if (available) {
+            $(".oe_price_h4").removeClass("hidden");
+            $(".oe_not_available").addClass("hidden");
+        } else {
+            $(".oe_price_h4").addClass("hidden");
+            $(".oe_not_available").removeClass("hidden");
+            $form_var.find('input[name="product_id"]').val(0);
+            $form_var.find(".a-submit").prop("disabled", "disabled");
+        }
     });
+    $form_var.find("input:first").trigger('change');
+
+
 });
index 33e3a3c..b37b514 100644 (file)
@@ -14,6 +14,7 @@ class TestUi(openerp.tests.HttpCase):
         self.phantom_js("/", "openerp.website.Tour.run('shop', 'test')", "openerp.website.Tour.tours.shop", login="admin")
 
     def test_02_admin_checkout(self):
+        self.phantom_js("/", "openerp.website.Tour.run('shop_customize', 'test')", "openerp.website.Tour.tours.shop_customize", login="admin", inject=inject)
         self.phantom_js("/", "openerp.website.Tour.run('shop_buy_product', 'test')", "openerp.website.Tour.tours.shop_buy_product", login="admin", inject=inject)
 
     def test_03_demo_checkout(self):
index 495e540..5def145 100644 (file)
   </xpath>
 </template>
 <template id="search" name="Search hidden fields">
-  <input t-if="attrib" type="hidden" name="filters" t-att-value="attrib"/>
+  <t t-if="attrib_values">
+    <t t-foreach="attrib_values" t-as="a">
+      <input type="hidden" name="attrib" t-att-value="'%s,%s' % (a[0], a[1])"/>
+    </t>
+  </t>
   <input t-if="category" type="hidden" name="category" t-att-value="int(category or 0)"/>
   <div class="input-group">
     <input type="text" name="search" class="search-query form-control" placeholder="Search..." t-att-value="search"/>
     <div class="ribbon btn btn-danger">Sale</div>
   </div>
   <div class="oe_product_image">
-      <a itemprop="url" t-attf-href="/shop/product/{{ slug(product) }}/?{{ keep_query('search', 'filters', category=(category and int(category)), page=(pager['page']['num'] if pager['page']['num']>1 else None)) }}">
+      <a itemprop="url" t-attf-href="/shop/product/{{ slug(product) }}/?{{ keep_query('search', 'attrib', category=(category and int(category)), page=(pager['page']['num'] if pager['page']['num']>1 else None)) }}">
           <img itemprop="image" class="img img-responsive" t-attf-src="/website/image/product.template/#{product.id}/image#{'' if product_image_big else '?max_width=300&amp;max_height=300'}"/>
       </a>
   </div>
   <section>
-      <h5><strong><a itemprop="name" t-attf-href="/shop/product/{{ slug(product) }}/?{{ keep_query('search', 'filters', category=(category and int(category)), page=(pager['page']['num'] if pager['page']['num']>1 else None)) }}" t-field="product.name"/></strong></h5>
+      <h5><strong><a itemprop="name" t-attf-href="/shop/product/{{ slug(product) }}/?{{ keep_query('search', 'attrib', category=(category and int(category)), page=(pager['page']['num'] if pager['page']['num']>1 else None)) }}" t-field="product.name"/></strong></h5>
       <div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price" t-if="product.product_variant_ids">
           <b>
-              <t t-if="abs(product.product_variant_ids[0].lst_price - product.product_variant_ids[0].price) &gt; 0.2">
-                <del class="text-danger" t-field="product.product_variant_ids[0].lst_price" t-field-options='{ "widget": "monetary", "display_currency": "pricelist.currency_id" }'/>&amp;nbsp;
+              <t t-if="abs(product.lst_price - product.price) &gt; 0.2">
+                <del class="text-danger" t-field="product.lst_price" t-field-options='{ "widget": "monetary", "display_currency": "pricelist.currency_id" }'/>&amp;nbsp;
               </t>
-              <span t-field="product.product_variant_ids[0].price"  t-field-options='{
+              <span t-field="product.price"  t-field-options='{
                    "widget": "monetary",
                    "display_currency": "website.pricelist_id.currency_id"
                }'>
               </span>
-              <span itemprop="price" style="display:none;" t-esc="product.product_variant_ids[0].price"/>
+              <span itemprop="price" style="display:none;" t-esc="product.price"/>
               <span itemprop="priceCurrency" style="display:none;" t-esc="website.pricelist_id.currency_id.name"/>
           </b>
       </div>
   </xpath>
 </template>
 
-<template id="products_attributes" inherit_option_id="website_sale.products" name="Product Attribute's Filters" groups="product.group_product_attributes">
+<template id="products_attributes" inherit_option_id="website_sale.products" name="Product Attribute's Filters">
   <xpath expr="//div[@id='products_grid_before']" position="inside">
-      <form t-att-action="keep('shop',attrib=0)" class="attributes" method="get">
+      <form class="js_attributes" method="get">
+          <input type="hidden" name="search" t-att-value="search"/>
           <ul class="nav nav-pills nav-stacked mt16">
               <t t-foreach="attributes" t-as="a">
-                  <li t-if="a.value_ids">
-                      <div t-field="a.name"/>
-                      <ul class="nav nav-pills nav-stacked">
+                  <li t-if="a.value_ids and len(a.value_ids) > 1">
+                      <div><strong t-field="a.name"/></div>
+                      <t t-if="a.type == 'select'">
+                        <select class="form-control" name="attrib">
+                          <option value=""/>
                           <t t-foreach="a.value_ids" t-as="v">
-                              <li t-att-class="'active' if v.id in attrib_set else ''">
-                                  <label style="margin: 0 20px;">
-                                      <input type="checkbox" name="attrib" t-att-value="v.id" t-att-checked="'checked' if v.id in attrib_set else ''"/>
-                                      <span style="font-weight: normal" t-field="v.name"/>
-                                  </label>
-                              </li>
+                            <option t-att-value="'%s,%s' % (a.id,v.id)" t-field="v.name" t-att-selected="'selected' if v.id in attrib_set else ''"/>
                           </t>
-                      </ul>
+                        </select>
+                      </t>
+                      <t t-if="a.type == 'radio'">
+                        <ul class="nav nav-pills nav-stacked">
+                            <t t-foreach="a.value_ids" t-as="v">
+                                <li t-att-class="'active' if v.id in attrib_set else ''">
+                                    <label style="margin: 0 20px;">
+                                        <input type="checkbox" name="attrib" t-att-value="'%s,%s' % (a.id,v.id)" t-att-checked="'checked' if v.id in attrib_set else ''"/>
+                                        <span style="font-weight: normal" t-field="v.name"/>
+                                    </label>
+                                </li>
+                            </t>
+                        </ul>
+                      </t>
+                      <t t-if="a.type == 'color'">
+                        <t t-foreach="a.value_ids" t-as="v">
+                          <label class="css_attribute_color"
+                              t-attf-style="background-color:#{v.color or v.name}">
+                              <input type="checkbox"
+                                  name="attrib"
+                                  t-att-value="'%s,%s' % (a.id,v.id)"
+                                  t-att-checked="'checked' if v.id in attrib_set else ''"
+                                  t-att-title="v.name"/>
+                          </label>
+                        </t>
+                      </t>
                   </li>
               </t>
           </ul>
                 <t t-call="website.publish_management">
                   <t t-set="object" t-value="product"/>
                   <t t-set="publish_edit" t-value="True"/>
+                  <t t-set="action" t-value="'product.product_template_action'"/>
                 </t>
             </div>
           </div>
                     <input type="hidden" t-if="len(product.product_variant_ids) == 1" name="product_id" t-att-value="product.product_variant_ids[0].id"/>
                     <t t-if="len(product.product_variant_ids) &gt; 1">
                         <label label-default="label-default" class="radio" t-foreach="product.product_variant_ids" t-as="variant_id">
-                            <input type="radio" name="product_id" t-att-value="variant_id.id" t-att-checked="variant_id == product.product_variant_ids[0] or None"/>
-                            <t t-esc="variant_id.variants or ''">Standard</t>
+                            <input type="radio" name="product_id" t-att-value="variant_id.id"/>
+                            <span t-esc="variant_id.name_get()[0][1]"/>
                             <span class="badge" t-if="variant_id.price_extra">
                                 <t t-esc="variant_id.price_extra > 0 and '+' or ''"/><span t-field="variant_id.price_extra" t-field-options='{ "widget": "monetary", "display_currency": "pricelist.currency_id" }'/>
                             </span>
                         </label>
                     </t>
 
-                    <div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price mt16" t-if="product.product_variant_ids">
-                        <h4>
-                            <t t-if="product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
-                            <span class="text-danger" style="text-decoration: line-through;"
-                              t-field="product.product_variant_ids[0].lst_price"
-                              t-field-options='{ "widget": "monetary", "display_currency": "pricelist.currency_id" }'/><br/>
-                            </t>
-                            <b class="oe_price"
-                              t-field="product.product_variant_ids[0].price"
-                              t-field-options='{ "widget": "monetary", "display_currency": "pricelist.currency_id" }'/>
-                            <span itemprop="price" style="display:none;" t-esc="product.product_variant_ids[0].price"/>
-                            <span itemprop="priceCurrency" style="display:none;" t-esc="website.pricelist_id.currency_id.name"/>
-                        </h4>
-                    </div>
+                    <t t-call="website_sale.product_price"/>
+
                     <a class="btn btn-primary btn-lg mt8 a-submit">Add to Cart</a>
-                    <hr t-if="product.description_sale"/>
-                    <div><p t-field="product.description_sale" class="text-muted"/></div>
-                    <hr/>
-                    <p class="text-muted">
-                        30-day money-back guarantee<br/>
-                        Free Shipping in U.S.<br/>
-                        Buy now, get in 2 days
-                    </p>
                 </form>
+
+                <hr t-if="product.description_sale"/>
+                <div><p t-field="product.description_sale" class="text-muted"/></div>
+                <hr/>
+                <p class="text-muted">
+                    30-day money-back guarantee<br/>
+                    Free Shipping in U.S.<br/>
+                    Buy now, get in 2 days
+                </p>
             </div>
           </div>
         </section>
   </t>
 </template>
 
+<template id="product_price">
+  <div itemprop="offers" itemscope="itemscope" itemtype="http://schema.org/Offer" class="product_price mt16">
+      <h4 class="oe_price_h4">
+          <t t-if="product.lst_price != product.price">
+          <span class="text-danger" style="text-decoration: line-through;"
+            t-field="product.lst_price"
+            t-field-options='{
+               "widget": "monetary",
+               "display_currency": "website.pricelist_id.currency_id"
+           }'/><br/>
+          </t>
+          <b class="oe_price"
+            t-field="product.price"
+            t-field-options='{
+               "widget": "monetary",
+               "display_currency": "website.pricelist_id.currency_id"
+           }'/>
+          <span itemprop="price" style="display:none;" t-esc="product.price"/>
+          <span itemprop="priceCurrency" style="display:none;" t-esc="website.pricelist_id.currency_id.name"/>
+      </h4>
+      <h4 class="hidden oe_not_available bg-warning">Product not available</h4>
+  </div>
+</template>
+
+<template id="product_variants" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Product Variants">
+  <xpath expr="//form[@action='/shop/cart/update']" position="replace">
+    <form action="/shop/cart/update" class="js_add_cart_variants" method="POST" t-att-data-variant_ids="product.available_variant_ids">
+        <input type="hidden" name="product_id" t-att-value="int(product.product_variant_ids[0]) if len(product.product_variant_ids) == 1 else '0'"/>
+        <ul class="nav nav-pills nav-stacked">
+            <t t-foreach="product.variant_ids" t-as="variant_id">
+              <li t-if="len(variant_id.value_ids) > 1">
+
+                <strong t-field="variant_id.attribute_id.name"/>
+
+                <t t-if="variant_id.attribute_id.type == 'select'">
+                  <select class="form-control" t-att-name="'attribute-%s' % variant_id.attribute_id.id">
+                    <t t-foreach="variant_id.value_ids" t-as="value_id">
+                      <option t-att-value="value_id.id">
+                          <span t-field="value_id.name"/>
+                          <span t-if="value_id.price_extra">
+                              <t t-esc="value_id.price_extra > 0 and '+' or ''"/><span t-field="value_id.price_extra" t-field-options='{
+                                           "widget": "monetary",
+                                           "display_currency": "website.pricelist_id.currency_id"
+                                       }'/>
+                          </span>
+                      </option>
+                    </t>
+                  </select>
+                </t>
+
+                <t t-if="variant_id.attribute_id.type == 'radio'">
+                  <ul class="nav nav-pills nav-stacked">
+                      <t t-set="inc" t-value="0"/>
+                      <t t-foreach="variant_id.value_ids" t-as="value_id">
+                          <li t-if="value_id.product_ids" class="form-group js_attribute_value" style="margin: 0;">
+                              <label class="control-label" style="margin: 0 20px;">
+                                  <input type="radio" t-att-checked="'checked' if not inc else ''" t-att-name="'attribute-%s' % variant_id.attribute_id.id" t-att-value="value_id.id" style="vertical-align: top; margin-right: 10px;"/>
+                                  <span t-field="value_id.name"/>
+                                  <span class="badge" t-if="value_id.price_extra">
+                                      <t t-esc="value_id.price_extra > 0 and '+' or ''"/><span t-field="value_id.price_extra" t-field-options='{
+                                                   "widget": "monetary",
+                                                   "display_currency": "website.pricelist_id.currency_id"
+                                               }'/>
+                                  </span>
+                              </label>
+                          </li>
+                          <t t-set="inc" t-value="inc+1"/>
+                      </t>
+                  </ul>
+                </t>
+
+                <t t-if="variant_id.attribute_id.type == 'color'">
+                  <ul class="nav nav-pills nav-stacked">
+                      <t t-set="inc" t-value="0"/>
+                      <t t-foreach="variant_id.value_ids" t-as="value_id">
+                          <label class="css_attribute_color"
+                              t-attf-style="background-color:#{value_id.color or value_id.name}">
+                            <input type="radio"
+                              t-att-checked="'checked' if not inc else ''"
+                              t-att-name="'attribute-%s' % variant_id.attribute_id.id"
+                              t-att-value="value_id.id"
+                              t-att-title="value_id.name"/>
+                          </label>
+                          <t t-set="inc" t-value="inc+1"/>
+                      </t>
+                  </ul>
+                </t>
+
+              </li>
+            </t>
+        </ul>
+
+        <t t-call="website_sale.product_price"/>
+
+        <a class="btn btn-primary btn-lg mt8 a-submit">Add to Cart</a>
+    </form>
+  </xpath>
+</template>
+
 <template id="recommended_products" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Alternative Products">
   <xpath expr="//div[@id='product_full_description']" position="after">
       <div class="container mt32" t-if="product.alternative_product_ids">
   </xpath>
 </template>
 
-<template id="product_attributes" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Product attributes" groups="product.group_product_attributes">
+<template id="product_attributes" inherit_id="website_sale.product" inherit_option_id="website_sale.product" name="Product attributes">
   <xpath expr="//p[@t-field='product.description_sale']" position="after">
-    <hr t-if="product.attribute_lines"/>
+    <hr t-if="product.variant_ids"/>
     <p class="text-muted">
-      <t t-foreach="product.attribute_lines" t-as="l">
-          <span t-field="l.attribute_id.name"/>: <span t-field="l.value_id.name"/> <br/>
+      <t t-set="inc" t-value="0"/>
+      <t t-foreach="product.variant_ids" t-as="variant_id">
+        <span t-field="variant_id.attribute_id"/>: 
+        <t t-foreach="variant_id.value_ids" t-as="value_id">
+          <t t-if="inc">,</t> <span t-field="value_id.name"/>
+        </t>
+        <br/>
+        <t t-set="inc" t-value="inc+1"/>
       </t>
     </p>
   </xpath>
 </template>
 
+<!-- Product options: OpenChatter -->
+
 <template id="product_comment" inherit_option_id="website_sale.product" name="Discussion">
     <xpath expr="//div[@t-field='product.website_description']" position="after">
         <hr class="mb32"/>
                               <td t-if="line.product_id.product_tmpl_id">
                                   <div>
                                       <a t-attf-href="/shop/product/#{ slug(line.product_id.product_tmpl_id) }">
-                                          <strong t-field="line.name"/>
+                                          <strong t-esc="line.product_id.name_get()[0][1]"/>
                                       </a>
                                   </div>
                                   <div class="text-muted" t-field="line.product_id.description_sale"/>
                       <div class="text-muted" t-field="product.description_sale"/>
                   </td>
                   <td>
-                      <t t-if="abs(product.product_variant_ids[0].lst_price - product.product_variant_ids[0].price) &gt; 0.2">
+                      <t t-if="abs(product.lst_price - product.price) &gt; 0.2">
                         <del class="text-danger"
-                          t-field="product.product_variant_ids[0].lst_price" t-field-options='{
+                          t-field="product.lst_price" t-field-options='{
                                "widget": "monetary",
                                "display_currency": "website.pricelist_id.currency_id"
                           }'/>&amp;nbsp;
                       </t>
-                      <span t-field="product.product_variant_ids[0].price"  t-field-options='{
+                      <span t-field="product.price"  t-field-options='{
                            "widget": "monetary",
                            "display_currency": "website.pricelist_id.currency_id"
                        }'/>
                   </td>
                   <td class="text-center">
                       <form action="/shop/cart/update" method="post">
-                          <input name="product_id" t-att-value="product.product_variant_ids[0].id" type="hidden"/>
+                          <input name="product_id" t-att-value="product.id" type="hidden"/>
                           <a class="btn btn-link a-submit"><strong>Add to Cart</strong></a>
                       </form>
                   </td>
index f85be0e..5a1a931 100644 (file)
@@ -2,42 +2,6 @@
 <openerp>
 <data>
 
-    <record id="view_sales_config_website_sale" model="ir.ui.view">
-        <field name="name">sale settings</field>
-        <field name="model">sale.config.settings</field>
-        <field name="inherit_id" ref="sale.view_sales_config"/>
-        <field name="arch" type="xml">
-            <xpath expr="//group[@name='Product Features']/div" position="inside">
-                <div>
-                    <field name="group_product_attributes" class="oe_inline"/>
-                    <label for="group_product_attributes"/>
-                </div>
-             </xpath>
-        </field>
-    </record>
-
-    <record id="product_normal_form_view" model="ir.ui.view">
-        <field name="name">product.normal.form.inherit</field>
-        <field name="model">product.product</field>
-        <field name="inherit_id" ref="product.product_normal_form_view"/>
-        <field name="arch" type="xml">
-            <!-- add state field in header -->
-            <xpath expr="//sheet/div" position="before">
-                <field name="website_url" invisible="1"/>
-                <field name="website_published" class="pull-right" widget="website_button"/>
-            </xpath>
-
-            <group name="sale" position="inside">
-                <group name="website" string="Website">
-                    <field name="alternative_product_ids" widget="many2many_tags"/>
-                    <field name="accessory_product_ids" widget="many2many_tags"/>
-                    <field name="website_style_ids" widget="many2many_tags"/>
-                    <field name="website_sequence"/>
-                </group>
-            </group>
-        </field>
-    </record>
-
     <record model="ir.ui.view" id="product_pricelist_view">
         <field name="name">product.pricelist.website.form</field>
         <field name="model">product.pricelist</field>
         <field name="inherit_id" ref="product.product_template_form_view"/>
         <field name="arch" type="xml">
             <!-- add state field in header -->
-
-            <xpath expr="//sheet/div" position="before">
-                <field name="website_url" invisible="1"/>
-                <field name="website_published" class="pull-right" widget="website_button"/>
-            </xpath>
-            <xpath expr="//field[@name='description']" position="before">
-                <group colspan="4" string="Website Options">
+            <group name="website_and_pos" position="inside">
+                <group name="website" string="Website">
+                    <field name="website_url" invisible="1"/>
+                    <field name="public_categ_ids" widget="many2many_tags"/>
+                    <field name="website_published" class="pull-right" widget="website_button"/>
                     <field name="alternative_product_ids" widget="many2many_tags"/>
-                    <field name="accessory_product_ids" widget="many2many_tags"/>
                     <field name="website_style_ids" widget="many2many_tags"/>
-                    <field colspan="4" name="attribute_lines" nolabel="1" groups="product.group_product_attributes">
-                        <tree string="Product attributes" editable="bottom">
-                            <field name="attribute_id" on_change="onchange_attribute_id(attribute_id)"/>
-                            <field name="value_id"
-                                context="{'default_attribute_id': attribute_id}"
-                                domain="[('attribute_id', '=', attribute_id)]"/>
-                        </tree>
-                    </field>
+                    <field name="website_sequence"/>
                 </group>
-            </xpath>
+            </group>
+        </field>
+    </record>
+
+    <!-- Product attribute -->
 
+    <record id="variants_template_tree_view" model="ir.ui.view">
+        <field name="name">variants.template.tree</field>
+        <field name="model">product.attribute.value</field>
+        <field name="inherit_id" ref="product.variants_template_tree_view"/>
+        <field name="arch" type="xml">
+            <field name="name" position="after">
+                <field name="color"/>
+            </field>
         </field>
     </record>
 
-    <record model="ir.ui.view" id="view_product_attribute_form">
-      <field name="name">product.attribute.form</field>
-      <field name="model">product.attribute</field>
-      <field name="arch" type="xml">
-        <form string="Product attributes" version="7.0">
-          <group>
-            <field name="name"/>
-          </group>
-        </form>
-      </field>
+    <!-- Product Public Categories -->
+    <record id="product_public_category_form_view" model="ir.ui.view">
+        <field name="name">product.public.category.form</field>
+        <field name="model">product.public.category</field>
+        <field name="arch" type="xml">
+            <form string="Public Categories" version="7.0">
+                <sheet>
+                    <field name="image_medium" widget='image' class="oe_avatar oe_right"/>
+                    <div class="oe_left">
+                        <group>
+                            <field name="name"/>
+                            <field name="parent_id"/>
+                            <field name="sequence"/>
+                        </group>
+                    </div>
+                </sheet>
+            </form>
+        </field>
+    </record>
+    <record id="product_public_category_tree_view" model="ir.ui.view">
+        <field name="name">product.public.category.tree</field>
+        <field name="model">product.public.category</field>
+        <field name="field_parent" eval="False"/>
+        <field name="arch" type="xml">
+            <tree string="Product Product Categories">
+                <field name="sequence" invisible="1"/>
+                <field name="complete_name"/>
+            </tree>
+        </field>
+    </record>
+    <record id="product_public_category_action" model="ir.actions.act_window">
+        <field name="name">Public Product Categories</field>
+        <field name="type">ir.actions.act_window</field>
+        <field name="res_model">product.public.category</field>
+        <field name="view_type">form</field>
+        <field name="view_mode">tree,form</field>
+        <field name="view_id" eval="False"/>
+        <field name="help" type="html">
+          <p class="oe_view_nocontent_create">
+            Click to define a new category.
+          </p><p>
+            Categories are used to browse your products through the
+            touchscreen interface.
+          </p><p>
+            If you put a photo on the category, the layout of the
+            touchscreen interface will automatically. We suggest not to put
+            a photo on categories for small (1024x768) screens.
+          </p>
+        </field>
     </record>
+    <menuitem action="product_public_category_action" id="menu_product_public_category" parent="product.prod_config_main" sequence="10" />
+    <!-- END -->
+
+ </data>
 
-</data>
 </openerp>