[ADD] add groups in product

bzr revid: tpa@tinyerp.com-20120306124425-zlw6c0eqayf48zxr
This commit is contained in:
Turkesh Patel (Open ERP) 2012-03-06 18:14:25 +05:30
parent 7a316408c1
commit 523a765b3b
5 changed files with 48 additions and 16 deletions

View File

@ -23,5 +23,6 @@ import pricelist
import report
import partner
import wizard
import res_config
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,37 @@
# -*- 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_stock_packaging':fields.boolean("Manage packaging by products",group='base.group_user', xml_id='base.group_stock_packaging',
help="""
It assigns the "Packaging" group to employee."""),
'group_stock_uom':fields.boolean("Manage your stock counterpart by products",group='base.group_user', xml_id='base.group_stock_uom',
help="""
It assigns the "UOM in warehouse" group to employee."""),
}
product_groups_configuration()

View File

@ -19,6 +19,16 @@
<field name="category_id" ref="base.module_category_usability"/>
</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_stock_uom" model="res.groups">
<field name="name">UOM in warehouse</field>
<field name="category_id" ref="base.module_category_hidden"/>
</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"/>

View File

@ -50,9 +50,6 @@ class warehouse_configuration(osv.osv_memory):
- removal date
- alert date
It installs the product_expiry module."""),
'group_stock_packaging':fields.boolean("Manage packaging by products",group='base.group_user', xml_id='base.group_stock_packaging',
help="""
It assigns the "Packaging" group to employee."""),
'group_stock_production_lot':fields.boolean("Track production lot",group='base.group_user', xml_id='base.group_stock_production_lot',
help="""
It assigns the "Production Lots" group to employee."""),
@ -65,9 +62,6 @@ class warehouse_configuration(osv.osv_memory):
'group_stock_counterpart_location':fields.boolean("Manage your stock counterpart by products",group='base.group_user', xml_id='base.group_stock_counterpart_location',
help="""
It assigns the "Counter-Part Locations" group to employee."""),
'group_stock_uom':fields.boolean("Manage your stock counterpart by products",group='base.group_user', xml_id='base.group_stock_uom',
help="""
It assigns the "UOM in warehouse" group to employee."""),
'group_stock_inventory_properties':fields.boolean("Define stock locations",group='base.group_user', xml_id='base.group_stock_inventory_properties',
help=""".
It assigns the "" group to employee."""),

View File

@ -12,11 +12,6 @@
<field name="implied_ids" eval="[(4, ref('group_stock_user'))]"/>
</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_stock_production_lot" model="res.groups">
<field name="name">Production Lots</field>
<field name="category_id" ref="base.module_category_hidden"/>
@ -42,11 +37,6 @@
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="base.group_stock_uom" model="res.groups">
<field name="name">UOM in warehouse</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<!-- multi -->
<record model="ir.rule" id="stock_picking_rule">