diff --git a/partner_contact_in_several_companies/__init__.py b/partner_contact_in_several_companies/__init__.py index 4b76c7b2d..f5ba686bc 100644 --- a/partner_contact_in_several_companies/__init__.py +++ b/partner_contact_in_several_companies/__init__.py @@ -1,3 +1,2 @@ -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). - -from . import models +# -*- coding: utf-8 -*- +from . import models \ No newline at end of file diff --git a/partner_contact_in_several_companies/__manifest__.py b/partner_contact_in_several_companies/__manifest__.py index ce8f57578..171aa0f65 100644 --- a/partner_contact_in_several_companies/__manifest__.py +++ b/partner_contact_in_several_companies/__manifest__.py @@ -1,15 +1,15 @@ -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). - +# -*- coding: utf-8 -*- { "name": "Contacts in several partners", "summary": "Allow to have one contact in several partners", - "version": "12.0.2.0.0", + "version": "13.0.1.0.0", "category": "Customer Relationship Management", "website": "https://github.com/OCA/partner-contact", - "author": "Nicolas JEUDY, Odoo Community Association (OCA),Odoo SA", + "author": "Fabio Oliveira, Odoo Community Association (OCA),Odoo SA", "license": "AGPL-3", "depends": [ "base", + "contacts", "partner_contact_personal_information_page", ], "data": [ @@ -19,4 +19,7 @@ "demo/res_partner.xml", "demo/ir_actions.xml", ], + "application": False, + "installable": True, + "auto_install": False, } diff --git a/partner_contact_in_several_companies/demo/ir_actions.xml b/partner_contact_in_several_companies/demo/ir_actions.xml index 15c48cfcb..b1303b028 100644 --- a/partner_contact_in_several_companies/demo/ir_actions.xml +++ b/partner_contact_in_several_companies/demo/ir_actions.xml @@ -4,7 +4,6 @@ All Customers in All Positions ir.actions.act_window res.partner - form kanban,tree,form {"search_default_customer":1, 'search_show_all_positions': {'is_set': True, 'set_value': True}} diff --git a/partner_contact_in_several_companies/models/ir_actions.py b/partner_contact_in_several_companies/models/ir_actions.py index 7a2ac5483..33db752ab 100644 --- a/partner_contact_in_several_companies/models/ir_actions.py +++ b/partner_contact_in_several_companies/models/ir_actions.py @@ -6,7 +6,6 @@ from odoo import api, models class IRActionsWindow(models.Model): _inherit = 'ir.actions.act_window' - @api.multi def read(self, fields=None, context=None, load='_classic_read'): actions = super(IRActionsWindow, self).read(fields=fields, load=load) for action in actions: diff --git a/partner_contact_in_several_companies/models/res_partner.py b/partner_contact_in_several_companies/models/res_partner.py index 32bcf2b12..c9b5ef185 100644 --- a/partner_contact_in_several_companies/models/res_partner.py +++ b/partner_contact_in_several_companies/models/res_partner.py @@ -27,7 +27,6 @@ class ResPartner(models.Model): string='Others Positions', ) - @api.multi @api.depends('contact_id') def _compute_contact_type(self): for rec in self: @@ -81,22 +80,18 @@ class ResPartner(models.Model): vals['name'] = modified_self.browse(vals['contact_id']).name return super(ResPartner, modified_self).create(vals) - @api.multi def read(self, fields=None, load='_classic_read'): modified_self = self._basecontact_check_context('read') return super(ResPartner, modified_self).read(fields=fields, load=load) - @api.multi def write(self, vals): modified_self = self._basecontact_check_context('write') return super(ResPartner, modified_self).write(vals) - @api.multi def unlink(self): modified_self = self._basecontact_check_context('unlink') return super(ResPartner, modified_self).unlink() - @api.multi def _compute_commercial_partner(self): """ Returns the partner that is considered the commercial entity of this partner. The commercial entity holds the master data @@ -132,7 +127,6 @@ class ResPartner(models.Model): if contact_vals: self.with_context(__update_contact_lock=True).write(contact_vals) - @api.multi def _fields_sync(self, update_values): """Sync commercial fields and address fields from company and to children, contact fields from contact and to attached contact diff --git a/partner_contact_in_several_companies/views/res_partner.xml b/partner_contact_in_several_companies/views/res_partner.xml index 51c2e1313..3b8469bac 100644 --- a/partner_contact_in_several_companies/views/res_partner.xml +++ b/partner_contact_in_several_companies/views/res_partner.xml @@ -1,149 +1,165 @@ - - res.partner.select.contact - res.partner - - - - - - - - - - - - - - res.partner.tree.contact - res.partner - - - - + + res.partner.select.contact + res.partner + + + + + + + + + - - + - - res.partner.form.contact - res.partner - - form - - - - - - - - - - {'invisible': [('contact_type','=','attached')]} - - - + + res.partner.tree.contact + res.partner + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - -
-