[MRG] merge with lp:~openerp-dev/openobject-addons/trunk-v62_config_product-uco
bzr revid: tpa@tinyerp.com-20120313103015-p37q8zu28xlujnd1
This commit is contained in:
commit
5be3d4c4e9
|
@ -23,5 +23,6 @@ import pricelist
|
|||
import report
|
||||
import partner
|
||||
import wizard
|
||||
import res_config
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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_po_id" groups="base.group_purchase_uom_per_product"/>
|
||||
<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"/>
|
||||
|
@ -257,24 +257,24 @@
|
|||
<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="search_view_id" ref="product_search_form_view"/>
|
||||
<field name="view_id" ref="product_product_tree_view"/>
|
||||
<field name="search_view_id" ref="product_search_form_view"/>
|
||||
<field name="help">You must define a Product for everything you buy or sell. Products can be raw materials, stockable products, consumables or services. The Product form contains detailed information about your products related to procurement logistics, sales price, product category, suppliers and so on.</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="open_view_product_tree1" model="ir.actions.act_window.view">
|
||||
<field name="sequence" eval="1"/>
|
||||
<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="2"/>
|
||||
<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>
|
||||
</record>
|
||||
|
||||
<menuitem id="base.menu_product" name="Products" parent="base.menu_base_partner" sequence="9"/>
|
||||
<menuitem action="product.product_normal_action_sell" id="product.menu_products" parent="base.menu_product" sequence="1"/>
|
||||
|
@ -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"/>
|
||||
|
|
|
@ -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()
|
|
@ -19,16 +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_purchase_uom_per_product" model="res.groups">
|
||||
<field name="name">Purhase Product UOM</field>
|
||||
<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"/>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue