[IMP] Change Generating Accounting Entries to something in stock_account which has a group as before, also stock_invoice_directly goes with it

bzr revid: jco@openerp.com-20140410112536-2texx37zzrzqbibp
This commit is contained in:
Josse Colpaert 2014-04-10 13:25:36 +02:00
parent f8aef0b59e
commit f44d217377
8 changed files with 75 additions and 23 deletions

View File

@ -45,10 +45,6 @@ class stock_config_settings(osv.osv_memory):
'module_claim_from_delivery': fields.boolean("Allow claim on deliveries",
help='Adds a Claim link to the delivery order.\n'
'-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",
help="""Track different dates on products and serial numbers.
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",
implied_group='stock.group_tracking_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",
implied_group='stock.group_locations',
help="""This will show you the locations and allows you to define multiple picking types and warehouses."""),

View File

@ -23,7 +23,7 @@
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
</header>
<separator string="Traceability"/>
<group>
<group name="traceability">
<label for="id" string="Traceability"/>
<div>
<div>
@ -44,20 +44,7 @@
</div>
</div>
</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 &amp; Warehouse"/>
<group>
<label for="id" string="Logistic"/>

View File

@ -23,4 +23,4 @@ import product
import stock_account
import stock
import wizard
import res_config

View File

@ -56,6 +56,7 @@ Dashboard / Reports for Warehouse Management will include:
'product_data.xml',
'product_view.xml',
'stock_account_view.xml',
'res_config_view.xml',
],
'test': [

View File

@ -73,7 +73,7 @@
<field name="priority">26</field>
<field name="arch" type="xml">
<xpath expr="//group[@name='properties']" position="before">
<group>
<group groups="stock_account.group_stock_inventory_valuation">
<separator string="Inventory Valuation" colspan="4"/>
<group colspan="2" col="2">
<field name="valuation" attrs="{'readonly':[('type', '=', 'service')]}"/>

View File

@ -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:

View File

@ -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>

View File

@ -4,6 +4,10 @@
<record id="stock.group_stock_manager" model="res.groups">
<field name="implied_ids" eval="[(4, ref('account.group_account_invoice'))]"/>
</record>
<record id="group_inventory_valuation" model="res.groups">
<field name="name">Manage Inventory valuation</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
</data>
</openerp>