Rapid (partial ?) port of product_manager_group and sale_purchase_no_product_template_menu to v10

pos_no_product_template_menu is useless in v10 -> remove it
This commit is contained in:
Alexis de Lattre
2016-10-24 15:33:18 +02:00
parent c2f4e2066a
commit 96a7e6e443
8 changed files with 23 additions and 126 deletions

View File

@@ -1 +0,0 @@
# -*- coding: utf-8 -*-

View File

@@ -1,44 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# POS No Product Template Menu module for Odoo
# Copyright (C) 2015 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': 'POS No Product Template Menu',
'version': '0.1',
'category': 'Point Of Sale',
'license': 'AGPL-3',
'summary': "Remplace product.template menu entry by product.product in POS",
'description': """
POS No Product Template
=======================
This module replaces the menu entry for product.template by a menu entry for product.product in the *Point of Sale*.
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['point_of_sale', 'pos_usability'],
# pos_usability is required to have the filter available_in_pos
'data': ['view.xml'],
'installable': False,
}

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="pos_product_product_action" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">product.product</field>
<field name="view_mode">tree,form,kanban</field>
<field name="context">{'search_default_available_in_pos': 1}</field>
</record>
<record id="point_of_sale.menu_pos_products" model="ir.ui.menu">
<field name="action" ref="pos_product_product_action"/>
</record>
</data>
</openerp>

View File

@@ -1,25 +1,6 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Product Manager Group 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/>.
#
##############################################################################
# -*- coding: utf-8 -*-
# © 2014-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Product Manager Group',
@@ -42,5 +23,5 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'security/product_security.xml',
'security/ir.model.access.csv',
],
'active': False,
'active': True,
}

View File

@@ -3,6 +3,5 @@ access_product_manager_product_product,Full access on product.product for Produc
access_product_manager_product_template,Full access on product.template for Product Manager,product.model_product_template,group_product_manager,1,1,1,1
access_product_manager_product_category,Full access on product.category for Product Manager,product.model_product_category,group_product_manager,1,1,1,1
access_product_manager_product_supplierinfo,Full access on product.supplierinfo for Product Manager,product.model_product_supplierinfo,group_product_manager,1,1,1,1
access_product_manager_pricelist_partnerinfo,Full access on pricelist.partnerinfo for Product Manager,product.model_pricelist_partnerinfo,group_product_manager,1,1,1,1
access_product_manager_product_attribute,Full access on product.attribute for Product Manager,product.model_product_attribute,group_product_manager,1,1,1,1
access_product_manager_product_attribute_value,Full access on product.attribute.value for Product Manager,product.model_product_attribute_value,group_product_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
3 access_product_manager_product_template Full access on product.template for Product Manager product.model_product_template group_product_manager 1 1 1 1
4 access_product_manager_product_category Full access on product.category for Product Manager product.model_product_category group_product_manager 1 1 1 1
5 access_product_manager_product_supplierinfo Full access on product.supplierinfo for Product Manager product.model_product_supplierinfo group_product_manager 1 1 1 1
access_product_manager_pricelist_partnerinfo Full access on pricelist.partnerinfo for Product Manager product.model_pricelist_partnerinfo group_product_manager 1 1 1 1
6 access_product_manager_product_attribute Full access on product.attribute for Product Manager product.model_product_attribute group_product_manager 1 1 1 1
7 access_product_manager_product_attribute_value Full access on product.attribute.value for Product Manager product.model_product_attribute_value group_product_manager 1 1 1 1

View File

@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<odoo>
<record id="group_product_manager" model="res.groups">
<field name="name">Product Manager</field>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
</data>
</openerp>
</odoo>

View File

@@ -1,25 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Sale Purchase No Product Template Menu module for Odoo
# Copyright (C) 2015 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/>.
#
##############################################################################
# © 2015-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Sale Purchase No Product Template Menu',
@@ -39,7 +20,11 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
""",
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['purchase', 'sale', 'base_usability'],
'depends': [
'purchase',
'sale',
#'base_usability',
],
'data': ['view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -4,8 +4,7 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<openerp>
<data>
<odoo>
<!-- PURCHASE -->
<record id="product_product_action_puchased" model="ir.actions.act_window">
@@ -22,7 +21,7 @@
</record>
<!-- STOCK -->
<record id="stock.menu_stock_products_menu" model="ir.ui.menu">
<record id="stock.menu_product_variant_config_stock" model="ir.ui.menu">
<field name="action" ref="product.product_normal_action"/>
</record>
@@ -42,7 +41,7 @@ so I redefine a new menu entry -->
<!-- To keep good translations, we re-use the product.template menu
entry and link it to product product -->
<record id="product.menu_product_template_action" model="ir.ui.menu">
<record id="sale.menu_product_template_action" model="ir.ui.menu">
<!-- related action is "product.product_template_action" -->
<field name="action" ref="product_product_action_sell"/>
</record>
@@ -56,7 +55,7 @@ entry and link it to product product -->
<!-- Create a product template menu entry in configuration -->
<menuitem id="sale_config_product_template_menu" action="product.product_template_action"
parent="product.prod_config_main"/>
parent="sale.prod_config_main"/>
<record id="product.product_normal_action_sell" model="ir.actions.act_window">
@@ -64,11 +63,14 @@ entry and link it to product product -->
</record>
<!-- Hide native 'Product Variants' menu -->
<!--
<record id="product.menu_products" model="ir.ui.menu">
<field name="groups_id" eval="[(6, 0, [ref('base_usability.group_nobody')])]"/>
</record>
-->
<!-- set name as editable on product.product form -->
<!--
<record id="product_normal_form_view" model="ir.ui.view">
<field name="name">no_product_template_menu.product_product_form</field>
<field name="model">product.product</field>
@@ -82,6 +84,6 @@ entry and link it to product product -->
</field>
</field>
</record>
-->
</data>
</openerp>
</odoo>