Add module sale_markup_group_user to address this issue : https://bugs.launchpad.net/sale-financial/+bug/1305987
This commit is contained in:
22
sale_markup_group_user/__init__.py
Normal file
22
sale_markup_group_user/__init__.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# -*- encoding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Sale Markup Group User module for OpenERP
|
||||||
|
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
||||||
|
# @author Alexis de Lattre <alexis.delattre@akretion.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/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
44
sale_markup_group_user/__openerp__.py
Normal file
44
sale_markup_group_user/__openerp__.py
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# -*- encoding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Sale Markup Group User module for OpenERP
|
||||||
|
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
||||||
|
# @author Alexis de Lattre <alexis.delattre@akretion.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/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'Sale Markup Group User',
|
||||||
|
'version': '0.1',
|
||||||
|
'category': 'Sales Management',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'summary': "Margins and markups shouldn't be visible only to the Sale Manager",
|
||||||
|
'description': """
|
||||||
|
Sale Markup Group User
|
||||||
|
======================
|
||||||
|
|
||||||
|
As discussed in this bug report https://bugs.launchpad.net/sale-financial/+bug/1305987, I think that the fields added by the sale_markup module should be visible to Sale Users, not only to Sale Managers.
|
||||||
|
|
||||||
|
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
|
||||||
|
""",
|
||||||
|
'author': 'Akretion',
|
||||||
|
'website': 'http://www.akretion.com',
|
||||||
|
'depends': ['sale_markup'],
|
||||||
|
'data': ['sale_view.xml'],
|
||||||
|
'installable': True,
|
||||||
|
'active': False,
|
||||||
|
}
|
||||||
76
sale_markup_group_user/sale_view.xml
Normal file
76
sale_markup_group_user/sale_view.xml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2014 Akretion (http://www.akretion.com/)
|
||||||
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
The licence is in the file __openerp__.py
|
||||||
|
-->
|
||||||
|
|
||||||
|
<openerp>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<!-- Inherit to remove groups="sale.group_sale_manager" -->
|
||||||
|
<record id="sale_markup_sale_order_tree" model="ir.ui.view">
|
||||||
|
<field name="name">sale.markup.remove.manager.group.order.tree</field>
|
||||||
|
<field name="model">sale.order</field>
|
||||||
|
<field name="inherit_id" ref="sale_markup.sale_markup_sale_order_tree" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="markup_rate" position="attributes">
|
||||||
|
<attribute name="groups"></attribute>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="sale_markup_quotation_tree" model="ir.ui.view">
|
||||||
|
<field name="name">sale.markup.remove.manager.group.quotation.tree</field>
|
||||||
|
<field name="model">sale.order</field>
|
||||||
|
<field name="inherit_id" ref="sale_markup.sale_markup_quotation_tree" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="markup_rate" position="attributes">
|
||||||
|
<attribute name="groups"></attribute>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="sale_markup_sale_order_line_tree" model="ir.ui.view">
|
||||||
|
<field name="name">sale.markup.remove.manager.group.order.line.tree</field>
|
||||||
|
<field name="model">sale.order.line</field>
|
||||||
|
<field name="inherit_id" ref="sale_markup.sale_markup_sale_order_line_tree" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="commercial_margin" position="attributes">
|
||||||
|
<attribute name="groups"></attribute>
|
||||||
|
</field>
|
||||||
|
<field name="markup_rate" position="attributes">
|
||||||
|
<attribute name="groups"></attribute>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="sale_markup_sale_order_form" model="ir.ui.view">
|
||||||
|
<field name="name">sale.markup.remove.manager.group.order.form</field>
|
||||||
|
<field name="model">sale.order</field>
|
||||||
|
<field name="inherit_id" ref="sale_markup.sale_markup_sale_order_form" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//group[@name='sale_total']/field[@name='markup_rate']" position="attributes">
|
||||||
|
<attribute name="groups"></attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='order_line']/form/group/group/field[@name='commercial_margin']"
|
||||||
|
position="attributes">
|
||||||
|
<attribute name="groups"></attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='order_line']/form/group/group/field[@name='markup_rate']"
|
||||||
|
position="attributes">
|
||||||
|
<attribute name="groups"></attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='order_line']/form/group/group/field[@name='cost_price']"
|
||||||
|
position="attributes">
|
||||||
|
<attribute name="groups"></attribute>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//field[@name='order_line']/tree/field[@name='markup_rate']"
|
||||||
|
position="attributes">
|
||||||
|
<attribute name="groups"></attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</openerp>
|
||||||
Reference in New Issue
Block a user