[MERGE] stock_account, purchase: better usability in settings to install stock_account and manage options to use costing methods and invenotyr valuation
bzr revid: qdp-launchpad@openerp.com-20140415112915-k8ba71ddo1vgu0tm
This commit is contained in:
commit
205a13e2f5
|
@ -27,11 +27,6 @@
|
||||||
<field name="category_id" ref="base.module_category_hidden"/>
|
<field name="category_id" ref="base.module_category_hidden"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="group_costing_method" model="res.groups">
|
|
||||||
<field name="name">Costing Method</field>
|
|
||||||
<field name="category_id" ref="base.module_category_hidden"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="group_uom" model="res.groups">
|
<record id="group_uom" model="res.groups">
|
||||||
<field name="name">Manage Multiple Units of Measure</field>
|
<field name="name">Manage Multiple Units of Measure</field>
|
||||||
<field name="category_id" ref="base.module_category_hidden"/>
|
<field name="category_id" ref="base.module_category_hidden"/>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<field name="standard_price" position="after">
|
<field name="standard_price" position="after">
|
||||||
<button name="%(action_view_compute_price_wizard)d" string="Recompute price from BoM"
|
<button name="%(action_view_compute_price_wizard)d" string="Recompute price from BoM"
|
||||||
type="action" attrs="{'invisible': [('cost_method', '!=', 'standard')]}"
|
type="action" attrs="{'invisible': [('cost_method', '!=', 'standard')]}"
|
||||||
groups="product.group_costing_method"/>
|
groups="stock_account.group_inventory_valuation"/>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -39,8 +39,8 @@ class purchase_config_settings(osv.osv_memory):
|
||||||
'group_uom':fields.boolean("Manage different units of measure for products",
|
'group_uom':fields.boolean("Manage different units of measure for products",
|
||||||
implied_group='product.group_uom',
|
implied_group='product.group_uom',
|
||||||
help="""Allows you to select and maintain different units of measure for products."""),
|
help="""Allows you to select and maintain different units of measure for products."""),
|
||||||
'group_costing_method':fields.boolean("The default costing method applied to all products",
|
'group_costing_method':fields.boolean("Use 'Real Price' or 'Average' costing methods.",
|
||||||
implied_group='product.group_costing_method',
|
implied_group='stock_account.group_inventory_valuation',
|
||||||
help="""Allows you to compute product cost price based on average cost."""),
|
help="""Allows you to compute product cost price based on average cost."""),
|
||||||
'module_warning': fields.boolean("Alerts by products or supplier",
|
'module_warning': fields.boolean("Alerts by products or supplier",
|
||||||
help='Allow to configure notification on products and trigger them when a user wants to purchase a given product or a given supplier.\n'
|
help='Allow to configure notification on products and trigger them when a user wants to purchase a given product or a given supplier.\n'
|
||||||
|
|
|
@ -45,10 +45,6 @@ class stock_config_settings(osv.osv_memory):
|
||||||
'module_claim_from_delivery': fields.boolean("Allow claim on deliveries",
|
'module_claim_from_delivery': fields.boolean("Allow claim on deliveries",
|
||||||
help='Adds a Claim link to the delivery order.\n'
|
help='Adds a Claim link to the delivery order.\n'
|
||||||
'-This installs the module claim_from_delivery.'),
|
'-This installs the module claim_from_delivery.'),
|
||||||
'module_stock_invoice_directly': fields.boolean("Create and open the invoice when the user finish a delivery order",
|
|
||||||
help='This allows to automatically launch the invoicing wizard if the delivery is '
|
|
||||||
'to be invoiced when you send or deliver goods.\n'
|
|
||||||
'-This installs the module stock_invoice_directly.'),
|
|
||||||
'module_product_expiry': fields.boolean("Expiry date on serial numbers",
|
'module_product_expiry': fields.boolean("Expiry date on serial numbers",
|
||||||
help="""Track different dates on products and serial numbers.
|
help="""Track different dates on products and serial numbers.
|
||||||
The following dates can be tracked:
|
The following dates can be tracked:
|
||||||
|
@ -76,8 +72,6 @@ This installs the module product_expiry."""),
|
||||||
'group_stock_tracking_owner': fields.boolean("Manage owner on stock",
|
'group_stock_tracking_owner': fields.boolean("Manage owner on stock",
|
||||||
implied_group='stock.group_tracking_owner',
|
implied_group='stock.group_tracking_owner',
|
||||||
help="""This way you can receive products attributed to a certain owner. """),
|
help="""This way you can receive products attributed to a certain owner. """),
|
||||||
'module_stock_account': fields.boolean("Generate accounting entries per stock movement",
|
|
||||||
help="""Allows to configure inventory valuations on products and product categories."""),
|
|
||||||
'group_stock_multiple_locations': fields.boolean("Manage multiple locations and warehouses",
|
'group_stock_multiple_locations': fields.boolean("Manage multiple locations and warehouses",
|
||||||
implied_group='stock.group_locations',
|
implied_group='stock.group_locations',
|
||||||
help="""This will show you the locations and allows you to define multiple picking types and warehouses."""),
|
help="""This will show you the locations and allows you to define multiple picking types and warehouses."""),
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
||||||
</header>
|
</header>
|
||||||
<separator string="Traceability"/>
|
<separator string="Traceability"/>
|
||||||
<group>
|
<group name="traceability">
|
||||||
<label for="id" string="Traceability"/>
|
<label for="id" string="Traceability"/>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -44,20 +44,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
<separator string="Accounting"/>
|
|
||||||
<group>
|
|
||||||
<label for="id" string="Accounting"/>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<field name="module_stock_account" class="oe_inline"/>
|
|
||||||
<label for="module_stock_account"/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<field name="module_stock_invoice_directly" class="oe_inline"/>
|
|
||||||
<label for="module_stock_invoice_directly"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</group>
|
|
||||||
<separator string="Location & Warehouse"/>
|
<separator string="Location & Warehouse"/>
|
||||||
<group>
|
<group>
|
||||||
<label for="id" string="Logistic"/>
|
<label for="id" string="Logistic"/>
|
||||||
|
|
|
@ -23,4 +23,4 @@ import product
|
||||||
import stock_account
|
import stock_account
|
||||||
import stock
|
import stock
|
||||||
import wizard
|
import wizard
|
||||||
|
import res_config
|
||||||
|
|
|
@ -56,6 +56,7 @@ Dashboard / Reports for Warehouse Management will include:
|
||||||
'product_data.xml',
|
'product_data.xml',
|
||||||
'product_view.xml',
|
'product_view.xml',
|
||||||
'stock_account_view.xml',
|
'stock_account_view.xml',
|
||||||
|
'res_config_view.xml',
|
||||||
],
|
],
|
||||||
'test': [
|
'test': [
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='standard_price']" position='replace'>
|
<xpath expr="//field[@name='standard_price']" position='replace'>
|
||||||
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
|
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
|
||||||
<field name="cost_method" groups="product.group_costing_method"/>
|
<field name="cost_method" groups="stock_account.group_inventory_valuation"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
@ -54,13 +54,13 @@
|
||||||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="standard_price" position="replace" version="7.0">
|
<field name="standard_price" position="replace" version="7.0">
|
||||||
<field name="cost_method" groups="product.group_costing_method" attrs="{'readonly': [('is_only_child', '=', False)]}"/>
|
<field name="cost_method" groups="stock_account.group_inventory_valuation" attrs="{'readonly': [('is_only_child', '=', False)]}"/>
|
||||||
<label string="Cost Price" for="standard_price" align="1.0" groups="base.group_user"/>
|
<label string="Cost Price" for="standard_price" align="1.0" groups="base.group_user"/>
|
||||||
<div groups="base.group_user">
|
<div groups="base.group_user">
|
||||||
<field name="standard_price" attrs="{'readonly':['|', ('is_only_child', '=', False), '&', ('valuation','=','real_time'), ('cost_method', 'in', ['standard', 'average'])]}" nolabel="1"/>
|
<field name="standard_price" attrs="{'readonly':['|', ('is_only_child', '=', False), '&', ('valuation','=','real_time'), ('cost_method', 'in', ['standard', 'average'])]}" nolabel="1"/>
|
||||||
<button name="%(action_view_change_standard_price)d" string="- update"
|
<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':['|', '|', ('is_only_child', '=', False), ('valuation','!=', 'real_time'), ('cost_method', 'not in', ['standard', 'average'])]}"
|
||||||
class="oe_link" groups="product.group_costing_method"/>
|
class="oe_link" groups="stock_account.group_inventory_valuation"/>
|
||||||
</div>
|
</div>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
<field name="priority">26</field>
|
<field name="priority">26</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//group[@name='properties']" position="before">
|
<xpath expr="//group[@name='properties']" position="before">
|
||||||
<group>
|
<group groups="stock_account.group_stock_inventory_valuation">
|
||||||
<separator string="Inventory Valuation" colspan="4"/>
|
<separator string="Inventory Valuation" colspan="4"/>
|
||||||
<group colspan="2" col="2">
|
<group colspan="2" col="2">
|
||||||
<field name="valuation" attrs="{'readonly':[('type', '=', 'service')]}"/>
|
<field name="valuation" attrs="{'readonly':[('type', '=', 'service')]}"/>
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# OpenERP, Open Source Business Applications
|
||||||
|
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
|
||||||
|
#
|
||||||
|
# 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 stock_config_settings(osv.osv_memory):
|
||||||
|
_inherit = 'stock.config.settings'
|
||||||
|
|
||||||
|
_columns = {
|
||||||
|
'group_stock_inventory_valuation': fields.boolean("Generate accounting entries per stock movement",
|
||||||
|
implied_group='stock_account.group_inventory_valuation',
|
||||||
|
help="""Allows to configure inventory valuations on products and product categories."""),
|
||||||
|
'module_stock_invoice_directly': fields.boolean("Create and open the invoice when the user finish a delivery order",
|
||||||
|
help='This allows to automatically launch the invoicing wizard if the delivery is '
|
||||||
|
'to be invoiced when you send or deliver goods.\n'
|
||||||
|
'-This installs the module stock_invoice_directly.'),
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,27 @@
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
<record id="view_stock_config_settings_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">stock.config.settings.inherit</field>
|
||||||
|
<field name="model">stock.config.settings</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_stock_config_settings"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//group[@name='traceability']" position="after">
|
||||||
|
<separator string="Accounting"/>
|
||||||
|
<group>
|
||||||
|
<label for="id" string="Accounting"/>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<field name="group_stock_inventory_valuation" class="oe_inline"/>
|
||||||
|
<label for="group_stock_inventory_valuation"/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<field name="module_stock_invoice_directly" class="oe_inline"/>
|
||||||
|
<label for="module_stock_invoice_directly"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</group>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</data>
|
||||||
|
</openerp>
|
|
@ -4,6 +4,10 @@
|
||||||
<record id="stock.group_stock_manager" model="res.groups">
|
<record id="stock.group_stock_manager" model="res.groups">
|
||||||
<field name="implied_ids" eval="[(4, ref('account.group_account_invoice'))]"/>
|
<field name="implied_ids" eval="[(4, ref('account.group_account_invoice'))]"/>
|
||||||
</record>
|
</record>
|
||||||
|
<record id="group_inventory_valuation" model="res.groups">
|
||||||
|
<field name="name">Manage Inventory Valuation and Costing Methods</field>
|
||||||
|
<field name="category_id" ref="base.module_category_hidden"/>
|
||||||
|
</record>
|
||||||
</data>
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue