[MIG] base_company_extension to v14
product_usability: add seller_id field base_usability: write/create rights on res.partner.title to base.group_system (instead of partner manager) sale_stock_usability: move warehouse_id to top stock_usabiluty: type on product set to 'product' by default
This commit is contained in:
@@ -19,16 +19,12 @@ Base Company Extension
|
|||||||
|
|
||||||
|badge1| |badge2| |badge3|
|
|badge1| |badge2| |badge3|
|
||||||
|
|
||||||
This module adds the following fields to the ResCompany model:
|
This module adds the following fields on the company:
|
||||||
|
|
||||||
* Capital Amount
|
* Capital Amount
|
||||||
* Legal Type
|
* Legal Type
|
||||||
|
|
||||||
This is useful to display the legal name of the company in reports
|
This is useful to display the legal name of the company in reports.
|
||||||
|
|
||||||
**Table of contents**
|
|
||||||
|
|
||||||
.. contents::
|
|
||||||
:local:
|
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
@@ -36,7 +32,7 @@ Bug Tracker
|
|||||||
Bugs are tracked on `GitHub Issues <https://github.com/akretion/odoo-usability/issues>`_.
|
Bugs are tracked on `GitHub Issues <https://github.com/akretion/odoo-usability/issues>`_.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||||
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20base_company_extension%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
`feedback <https://github.com/akretion/odoo-usability/issues/new?body=module:%20base_company_extension%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||||
|
|
||||||
Do not contact contributors directly about support or help with technical issues.
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
|||||||
@@ -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': 'Base Company Extension',
|
'name': 'Base Company Extension',
|
||||||
'version': '12.0.1.0.0',
|
'version': '14.0.1.0.0',
|
||||||
'category': 'Partner',
|
'category': 'Partner',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Adds capital and title on company',
|
'summary': 'Adds capital and title on company',
|
||||||
@@ -14,5 +13,5 @@
|
|||||||
# I depend on base_usability only for _report_company_legal_name()
|
# I depend on base_usability only for _report_company_legal_name()
|
||||||
'depends': ['base_usability'],
|
'depends': ['base_usability'],
|
||||||
'data': ['company_view.xml'],
|
'data': ['company_view.xml'],
|
||||||
'installable': False,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Copyright 2014-2019 Akretion (http://www.akretion.com)
|
# Copyright 2014-2020 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).
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ class ResCompany(models.Model):
|
|||||||
def _report_company_legal_name(self):
|
def _report_company_legal_name(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
if self.legal_type:
|
if self.legal_type:
|
||||||
name = u'%s %s' % (self.name, self.legal_type)
|
name = '%s %s' % (self.name, self.legal_type)
|
||||||
else:
|
else:
|
||||||
name = self.name
|
name = self.name
|
||||||
return name
|
return name
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2014-2019 Akretion (http://www.akretion.com/)
|
Copyright 2014-2020 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).
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
'depends': ['base'],
|
'depends': ['base'],
|
||||||
'data': [
|
'data': [
|
||||||
'security/group.xml',
|
'security/group.xml',
|
||||||
|
'security/ir.model.access.csv',
|
||||||
'views/res_partner.xml',
|
'views/res_partner.xml',
|
||||||
'views/res_partner_bank.xml',
|
'views/res_partner_bank.xml',
|
||||||
'views/res_country.xml',
|
'views/res_country.xml',
|
||||||
|
|||||||
2
base_usability/security/ir.model.access.csv
Normal file
2
base_usability/security/ir.model.access.csv
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
base.access_res_partner_title_group_user,Full access on res.partner.title to Settings group (instead of partner manager by default),base.model_res_partner_title,base.group_system,1,1,1,1
|
||||||
|
@@ -19,7 +19,7 @@ This module has been written by Alexis de Lattre <alexis.delattre@akretion.com>
|
|||||||
""",
|
""",
|
||||||
'author': 'Akretion',
|
'author': 'Akretion',
|
||||||
'website': 'http://www.akretion.com',
|
'website': 'http://www.akretion.com',
|
||||||
'depends': ['base'],
|
'depends': ['account'],
|
||||||
'data': ['views/res_partner.xml'],
|
'data': ['views/res_partner.xml'],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ This module has been written by Alexis de Lattre <alexis.delattre@akretion.com>
|
|||||||
""",
|
""",
|
||||||
'author': 'Akretion',
|
'author': 'Akretion',
|
||||||
'website': 'http://www.akretion.com',
|
'website': 'http://www.akretion.com',
|
||||||
'depends': ['base'],
|
'depends': ['contacts'],
|
||||||
'data': ['views/res_partner.xml'],
|
'data': ['views/res_partner.xml'],
|
||||||
'installable': True,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record id="contacts.action_contacts" model="ir.actions.act_window">
|
<record id="contacts.action_contacts" model="ir.actions.act_window">
|
||||||
<field name="view_mode">tree,form,kanban</field>
|
<field name="view_mode">tree,form,kanban,activity</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="contacts.action_contacts_view_tree" model="ir.actions.act_window.view">
|
<record id="contacts.action_contacts_view_tree" model="ir.actions.act_window.view">
|
||||||
|
|||||||
@@ -9,6 +9,13 @@ from odoo import models, fields
|
|||||||
class ProductTemplate(models.Model):
|
class ProductTemplate(models.Model):
|
||||||
_inherit = 'product.template'
|
_inherit = 'product.template'
|
||||||
|
|
||||||
|
# restore v8 native field
|
||||||
|
# https://github.com/odoo/odoo/blob/8.0/addons/product/product.py#L592
|
||||||
|
# in v10, that field was defined in procurement_suggest, but we will
|
||||||
|
# probably not port procurement_suggest because it is native in v14
|
||||||
|
seller_id = fields.Many2one(
|
||||||
|
'res.partner', related='seller_ids.name', string='Main Supplier')
|
||||||
|
|
||||||
# name = fields.Char(
|
# name = fields.Char(
|
||||||
# track_visibility='onchange')
|
# track_visibility='onchange')
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
<field name="picking_policy" position="after">
|
<field name="picking_policy" position="after">
|
||||||
<field name="picking_status"/>
|
<field name="picking_status"/>
|
||||||
</field>
|
</field>
|
||||||
|
<!-- move warehouse_id to the top, not hidden in the 2nd tab -->
|
||||||
|
<group name="order_details" position="inside">
|
||||||
|
<field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_warehouses" force_save="1" position="move"/>
|
||||||
|
</group>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
@@ -10,3 +10,6 @@ class ProductTemplate(models.Model):
|
|||||||
|
|
||||||
tracking = fields.Selection(tracking=True)
|
tracking = fields.Selection(tracking=True)
|
||||||
sale_delay = fields.Float(tracking=True)
|
sale_delay = fields.Float(tracking=True)
|
||||||
|
# the 'stock' module adds 'product' in type...
|
||||||
|
# but forgets to make it the default
|
||||||
|
type = fields.Selection(default='product')
|
||||||
|
|||||||
Reference in New Issue
Block a user