Raphael Collet (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-v62_config_product-uco into
lp:~openerp-dev/openobject-addons/trunk-v62_config.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-v62_config_product-uco/+merge/98354
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-v62_config_product-uco/+merge/98354
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-v62_config_product-uco into
lp:~openerp-dev/openobject-addons/trunk-v62_config.
=== modified file 'product/__init__.py'
--- product/__init__.py 2011-01-14 00:11:01 +0000
+++ product/__init__.py 2012-03-20 07:57:21 +0000
@@ -23,5 +23,6 @@
import report
import partner
import wizard
+import res_config
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'product/partner_view.xml'
--- product/partner_view.xml 2011-01-14 00:11:01 +0000
+++ product/partner_view.xml 2012-03-20 07:57:21 +0000
@@ -9,7 +9,7 @@
<field name="arch" type="xml">
<page string="Sales & Purchases" position="inside">
<newline/>
- <group col="2" colspan="2" groups="base.group_extended">
+ <group col="2" colspan="2" groups="base.group_sale_pricelist_per_customer">
<separator string="Sales Properties" colspan="2"/>
<field name="property_product_pricelist"/>
</group>
=== modified file 'product/pricelist_view.xml'
--- product/pricelist_view.xml 2011-12-19 16:54:40 +0000
+++ product/pricelist_view.xml 2012-03-20 07:57:21 +0000
@@ -4,7 +4,8 @@
<menuitem id="base.menu_sale_config_sales" name="Sales"
parent="base.menu_base_config" sequence="0" groups="base.group_extended"/>
- <menuitem groups="base.group_extended" id="menu_product_pricelist_main" name="Pricelists" parent="base.menu_base_config" sequence="50"/>
+ <menuitem id="menu_product_pricelist_main" name="Pricelists"
+ parent="base.menu_base_config" groups="base.group_sale_pricelist_per_customer" sequence="50"/>
<record id="product_pricelist_version_form_view" model="ir.ui.view">
<field name="name">product.pricelist.version.form</field>
@@ -195,7 +196,7 @@
</form>
</field>
</record>
-
+
<record id="product_price_type_action" model="ir.actions.act_window">
<field name="name">Price Types</field>
<field name="type">ir.actions.act_window</field>
=== modified file 'product/product_view.xml'
--- product/product_view.xml 2012-02-09 17:00:46 +0000
+++ product/product_view.xml 2012-03-20 07:57:21 +0000
@@ -20,7 +20,7 @@
<field name="categ_id" widget="selection" operator="child_of" groups="base.group_extended"/>
<newline/>
<group expand="0" string="Context..." groups="base.group_extended">
- <field name="pricelist_id" widget="selection" context="{'pricelist': self}" />
+ <field name="pricelist_id" widget="selection" context="{'pricelist': self}" groups="base.group_sale_pricelist_per_customer"/>
<separator orientation="vertical" groups="base.group_multi_company" />
<field name="company_id" widget="selection" groups="base.group_multi_company" />
</group>
@@ -50,7 +50,7 @@
<field name="name"/>
<field name="categ_id" invisible="1"/>
<field name="variants" groups="product.group_product_variant"/>
- <field name="uom_id" string="UoM"/>
+ <field name="uom_id" string="UoM" groups="base.group_sale_uom_per_product"/>
<field name="type"/>
<field name="qty_available"/>
<field name="virtual_available"/>
@@ -87,7 +87,7 @@
</group>
<group colspan="1" col="1">
<field name="product_image" widget='image' nolabel="1"/>
- </group>
+ </group>
</group>
<notebook colspan="4">
@@ -125,11 +125,11 @@
<group colspan="2" col="2" name="uom">
<separator string="Unit of Measure" colspan="2"/>
- <field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)"/>
+ <field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" groups="base.group_sale_uom_per_product"/>
<field name="uom_po_id" groups="base.group_extended"/>
</group>
- <group colspan="2" col="2" name="uos" groups="product.group_uos">
+ <group colspan="2" col="2" name="uos" groups="base.group_sale_uom_per_product">
<separator string="Second UoM" colspan="2"/>
<field name="uos_id"/>
<field name="uos_coeff"/>
@@ -440,7 +440,7 @@
<field name="view_id" ref="product_uom_tree_view"/>
<field name="help">Create and manage the units of measure you want to be used in your system. You can define a conversion rate between several Units of Measure within the same category.</field>
</record>
- <menuitem id="next_id_16" name="Units of Measure" parent="prod_config_main" sequence="65"/>
+ <menuitem id="next_id_16" name="Units of Measure" parent="prod_config_main" sequence="65" groups="base.group_sale_uom_per_product"/>
<menuitem action="product_uom_form_action" id="menu_product_uom_form_action" parent="next_id_16"/>
<record id="product_uom_categ_form_view" model="ir.ui.view">
@@ -552,7 +552,7 @@
<field name="product_uom"/>
<field name="delay"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
- <field colspan="4" groups="base.group_extended" name="pricelist_ids" nolabel="1" widget="one2many_list">
+ <field colspan="4" groups="base.group_sale_pricelist_per_customer" name="pricelist_ids" nolabel="1" widget="one2many_list">
<tree editable="bottom" string="Pricelist">
<field name="min_quantity"/>
<field name="price"/>
@@ -674,11 +674,11 @@
<group colspan="2" col="2" name="uom">
<separator string="UOM" colspan="2"/>
- <field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)"/>
+ <field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" groups="base.group_sale_uom_per_product"/>
<field name="uom_po_id" groups="base.group_extended"/>
</group>
- <group colspan="2" col="2" name="uos" groups="product.group_uos">
+ <group colspan="2" col="2" name="uos" groups="base.group_sale_uom_per_product">
<separator string="Second UoM" colspan="2"/>
<field name="uos_id"/>
<field name="uos_coeff"/>
=== added file 'product/res_config.py'
--- product/res_config.py 1970-01-01 00:00:00 +0000
+++ product/res_config.py 2012-03-20 07:57:21 +0000
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 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 osv import fields, osv
+
+class product_groups_configuration(osv.osv_memory):
+ _inherit = 'res.config.settings'
+
+ _columns = {
+ 'group_sale_pricelist_per_customer':fields.boolean("Pricelist per Customer",
+ group='base.group_user', implied_group='base.group_sale_pricelist_per_customer',
+ help="""Allows to manage different prices based on rules per category of customers.
+ Example: 10% for retailers, promotion of 5 EUR on this product, etc.
+ It assigns the "Pricelist" group to all employees."""),
+ 'group_sale_uom_per_product':fields.boolean("UOM per product",
+ group='base.group_user', implied_group='base.group_sale_uom_per_product',
+ help="""
+ Allows you to select and maintain different unit of measures per product.
+ It assigns the "UOM per product" group to all employees.
+ """),
+ 'group_purchase_pricelist_per_supplier':fields.boolean("Pricelist per Supplier", group='base.group_user', xml_id='base.group_purchase_pricelist_per_supplier',
+ help="""Allows to manage different prices based on rules per category of Supplier.
+ Example: 10% for retailers, promotion of 5 EUR on this product, etc.
+ It assigns the "Pricelist" group to all employees."""),
+ 'group_stock_packaging':fields.boolean("Manage packaging by products", group='base.group_user', implied_group='base.group_stock_packaging',
+ help=""" Allows you to create and manage your packaging dimensions and types you want to be maintained in your system.
+ It assigns the "Packaging" group to employee."""),
+}
+
+product_groups_configuration()
\ No newline at end of file
=== modified file 'product/security/product_security.xml'
--- product/security/product_security.xml 2011-12-19 16:54:40 +0000
+++ product/security/product_security.xml 2012-03-20 07:57:21 +0000
@@ -19,6 +19,33 @@
<field name="category_id" ref="base.module_category_usability"/>
</record>
+ <record id="base.group_sale_pricelist_per_customer" model="res.groups">
+ <field name="name">Sales Pricelists</field>
+ <field name="category_id" ref="base.module_category_hidden"/>
+ </record>
+
+ <record id="base.group_purchase_pricelist_per_supplier" model="res.groups">
+ <field name="name">Purchase Pricelists</field>
+ <field name="category_id" ref="base.module_category_hidden"/>
+ </record>
+
+ <record id="base.group_sale_uom_per_product" model="res.groups">
+ <field name="name">Product UOM</field>
+ <field name="category_id" ref="base.module_category_hidden"/>
+ </record>
+
+ <record id="base.group_stock_packaging" model="res.groups">
+ <field name="name">Packaging</field>
+ <field name="category_id" ref="base.module_category_hidden"/>
+ </record>
+
+ <record id="base.group_user" model="res.groups">
+ <field name="implied_ids" eval="[(6,0,[ref('base.group_sale_pricelist_per_customer'),
+ ref('base.group_sale_uom_per_product'),
+ ref('base.group_purchase_pricelist_per_supplier'),
+ ref('base.group_stock_packaging')])]"/>
+ </record>
+
<record model="ir.rule" id="product_pricelist_comp_rule">
<field name="name">product pricelist company rule</field>
<field name="model_id" ref="model_product_pricelist"/>
=== modified file 'product/wizard/product_price_view.xml'
--- product/wizard/product_price_view.xml 2011-01-14 00:11:01 +0000
+++ product/wizard/product_price_view.xml 2012-03-20 07:57:21 +0000
@@ -31,6 +31,7 @@
name="Price List"
res_model="product.price_list"
src_model="product.product"
+ groups="base.group_sale_pricelist_per_customer"
view_mode="form" target="new" view_type="form" />
</data>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp