diff --git a/base_company_extension/README.rst b/base_company_extension/README.rst index 63c4d75..f5e3106 100644 --- a/base_company_extension/README.rst +++ b/base_company_extension/README.rst @@ -19,16 +19,12 @@ Base Company Extension |badge1| |badge2| |badge3| -This module adds the following fields to the ResCompany model: +This module adds the following fields on the company: + * Capital Amount * Legal Type -This is useful to display the legal name of the company in reports - -**Table of contents** - -.. contents:: - :local: +This is useful to display the legal name of the company in reports. Bug Tracker =========== @@ -36,7 +32,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. 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 -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. diff --git a/base_company_extension/__manifest__.py b/base_company_extension/__manifest__.py index 12cc062..3ae3559 100644 --- a/base_company_extension/__manifest__.py +++ b/base_company_extension/__manifest__.py @@ -1,11 +1,10 @@ -# -*- coding: utf-8 -*- -# Copyright 2014-2019 Akretion (http://www.akretion.com) +# Copyright 2014-2020 Akretion (http://www.akretion.com) # @author Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Base Company Extension', - 'version': '12.0.1.0.0', + 'version': '14.0.1.0.0', 'category': 'Partner', 'license': 'AGPL-3', 'summary': 'Adds capital and title on company', @@ -14,5 +13,5 @@ # I depend on base_usability only for _report_company_legal_name() 'depends': ['base_usability'], 'data': ['company_view.xml'], - 'installable': False, + 'installable': True, } diff --git a/base_company_extension/company.py b/base_company_extension/company.py index 4035025..6b826aa 100644 --- a/base_company_extension/company.py +++ b/base_company_extension/company.py @@ -1,4 +1,4 @@ -# Copyright 2014-2019 Akretion (http://www.akretion.com) +# Copyright 2014-2020 Akretion (http://www.akretion.com) # @author Alexis de Lattre # 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): self.ensure_one() if self.legal_type: - name = u'%s %s' % (self.name, self.legal_type) + name = '%s %s' % (self.name, self.legal_type) else: name = self.name return name diff --git a/base_company_extension/company_view.xml b/base_company_extension/company_view.xml index da60874..076ede8 100644 --- a/base_company_extension/company_view.xml +++ b/base_company_extension/company_view.xml @@ -1,6 +1,6 @@ diff --git a/base_usability/__manifest__.py b/base_usability/__manifest__.py index 665f713..5bb0b71 100644 --- a/base_usability/__manifest__.py +++ b/base_usability/__manifest__.py @@ -13,6 +13,7 @@ 'depends': ['base'], 'data': [ 'security/group.xml', + 'security/ir.model.access.csv', 'views/res_partner.xml', 'views/res_partner_bank.xml', 'views/res_country.xml', diff --git a/base_usability/security/ir.model.access.csv b/base_usability/security/ir.model.access.csv new file mode 100644 index 0000000..c9b9298 --- /dev/null +++ b/base_usability/security/ir.model.access.csv @@ -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 diff --git a/partner_tree_default_account/__manifest__.py b/partner_tree_default_account/__manifest__.py index efd320a..31ef12a 100644 --- a/partner_tree_default_account/__manifest__.py +++ b/partner_tree_default_account/__manifest__.py @@ -19,7 +19,7 @@ This module has been written by Alexis de Lattre """, 'author': 'Akretion', 'website': 'http://www.akretion.com', - 'depends': ['base'], + 'depends': ['account'], 'data': ['views/res_partner.xml'], 'installable': True, } diff --git a/partner_tree_default_contacts/__manifest__.py b/partner_tree_default_contacts/__manifest__.py index cdf9f3a..3ed82f0 100644 --- a/partner_tree_default_contacts/__manifest__.py +++ b/partner_tree_default_contacts/__manifest__.py @@ -19,7 +19,7 @@ This module has been written by Alexis de Lattre """, 'author': 'Akretion', 'website': 'http://www.akretion.com', - 'depends': ['base'], + 'depends': ['contacts'], 'data': ['views/res_partner.xml'], 'installable': True, } diff --git a/partner_tree_default_contacts/views/res_partner.xml b/partner_tree_default_contacts/views/res_partner.xml index bb7f8f9..0dcc747 100644 --- a/partner_tree_default_contacts/views/res_partner.xml +++ b/partner_tree_default_contacts/views/res_partner.xml @@ -8,7 +8,7 @@ - tree,form,kanban + tree,form,kanban,activity diff --git a/product_usability/models/product_template.py b/product_usability/models/product_template.py index 25bf7a3..3b0c9b1 100644 --- a/product_usability/models/product_template.py +++ b/product_usability/models/product_template.py @@ -9,6 +9,13 @@ from odoo import models, fields class ProductTemplate(models.Model): _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( # track_visibility='onchange') diff --git a/sale_stock_usability/views/sale_order.xml b/sale_stock_usability/views/sale_order.xml index 287ddbc..20405d9 100644 --- a/sale_stock_usability/views/sale_order.xml +++ b/sale_stock_usability/views/sale_order.xml @@ -15,6 +15,10 @@ + + + + diff --git a/stock_usability/models/product_template.py b/stock_usability/models/product_template.py index 47131bc..0d9c5a2 100644 --- a/stock_usability/models/product_template.py +++ b/stock_usability/models/product_template.py @@ -10,3 +10,6 @@ class ProductTemplate(models.Model): tracking = fields.Selection(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')