[MIG] product_manager_group and product_manager_group_stock
Avoid problems when installing base_partner_one2many_phone
This commit is contained in:
@@ -10,7 +10,7 @@ logger = logging.getLogger(__name__)
|
|||||||
def create_partner_phone(cr, phone_field, phone_type):
|
def create_partner_phone(cr, phone_field, phone_type):
|
||||||
cr.execute(
|
cr.execute(
|
||||||
'SELECT id, ' + phone_field + ' FROM res_partner WHERE ' +
|
'SELECT id, ' + phone_field + ' FROM res_partner WHERE ' +
|
||||||
phone_field + ' IS NOT null')
|
phone_field + ' IS NOT null AND ' + phone_field + "!= ''")
|
||||||
to_create = []
|
to_create = []
|
||||||
for partner in cr.fetchall():
|
for partner in cr.fetchall():
|
||||||
to_create.append({
|
to_create.append({
|
||||||
@@ -22,7 +22,8 @@ def create_partner_phone(cr, phone_field, phone_type):
|
|||||||
|
|
||||||
|
|
||||||
def create_partner_email(cr):
|
def create_partner_email(cr):
|
||||||
cr.execute('SELECT id, email FROM res_partner WHERE email IS NOT null')
|
cr.execute(
|
||||||
|
"SELECT id, email FROM res_partner WHERE email IS NOT null AND email != ''")
|
||||||
to_create = []
|
to_create = []
|
||||||
for partner in cr.fetchall():
|
for partner in cr.fetchall():
|
||||||
to_create.append({
|
to_create.append({
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# Copyright 2014-2020 Akretion (http://www.akretion.com/)
|
||||||
# Copyright 2014-2019 Akretion
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Product Manager Group',
|
'name': 'Product Manager Group',
|
||||||
'version': '12.0.1.0.0',
|
'version': '14.0.1.0.0',
|
||||||
'category': 'Hidden',
|
'category': 'Hidden',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Add a group Product Manager',
|
'summary': 'Add a group Product Manager',
|
||||||
@@ -24,5 +23,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
|||||||
'security/product_security.xml',
|
'security/product_security.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
],
|
],
|
||||||
'installable': False,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,3 +5,7 @@ access_product_manager_product_category,Full access on product.category for Prod
|
|||||||
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_product_supplierinfo,Full access on product.supplierinfo for Product Manager,product.model_product_supplierinfo,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,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
|
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
|
||||||
|
access_product_manager_product_template_attribute_line,Full access on product.template.attribute.line for Product Manager,product.model_product_template_attribute_line,group_product_manager,1,1,1,1
|
||||||
|
access_product_manager_product_template_attribute_value,Full access on product.template.attribute.value for Product Manager,product.model_product_template_attribute_value,group_product_manager,1,1,1,1
|
||||||
|
access_product_manager_product_template_attribute_exclusion,Full access on product.template.attribute.exclusion for Product Manager,product.model_product_template_attribute_exclusion,group_product_manager,1,1,1,1
|
||||||
|
access_product_manager_product_attribute_custom_value,Full access on product.attribute.custom.value for Product Manager,product.model_product_attribute_custom_value,group_product_manager,1,1,1,1
|
||||||
|
|||||||
|
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<record id="group_product_manager" model="res.groups">
|
<record id="group_product_manager" model="res.groups">
|
||||||
<field name="name">Product Manager</field>
|
<field name="name">Product Manager</field>
|
||||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# Copyright 2014-2020 Akretion (http://www.akretion.com)
|
||||||
# Copyright 2014-2019 Akretion (http://www.akretion.com)
|
|
||||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Product Manager Group Stock',
|
'name': 'Product Manager Group Stock',
|
||||||
'version': '12.0.1.0.0',
|
'version': '14.0.1.0.0',
|
||||||
'category': 'Hidden',
|
'category': 'Hidden',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Extend the group Product Manager to Stock',
|
'summary': 'Extend the group Product Manager to Stock',
|
||||||
@@ -23,6 +22,6 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
|||||||
'data': [
|
'data': [
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
],
|
],
|
||||||
'installable': False,
|
'installable': True,
|
||||||
'auto_install': True,
|
'auto_install': True,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user