diff --git a/partner_priority/__manifest__.py b/partner_priority/__manifest__.py index 86bd16cbf..41c8c6bd8 100644 --- a/partner_priority/__manifest__.py +++ b/partner_priority/__manifest__.py @@ -2,23 +2,21 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { - 'name': 'Partner Priority', - 'summary': "Adds priority to partners.", - 'author': "Patrick Wilson, Odoo Community Association (OCA)", - 'website': "https://github.com/OCA/partner-contact", - 'category': 'Customer Relationship Management', - 'version': '12.0.1.0.0', - 'license': 'AGPL-3', - 'depends': [ - 'contacts', - ], - 'data': [ - 'views/res_partner.xml', - 'views/partner_priority.xml', - 'security/ir.model.access.csv', - 'data/partner_priority_data.xml', - 'data/partner_priority_sequence_data.xml', + "name": "Partner Priority", + "summary": "Adds priority to partners.", + "author": "Patrick Wilson, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/partner-contact", + "category": "Customer Relationship Management", + "version": "13.0.1.0.0", + "license": "AGPL-3", + "depends": ["contacts"], + "data": [ + "views/res_partner.xml", + "views/partner_priority.xml", + "security/ir.model.access.csv", + "data/partner_priority_data.xml", + "data/partner_priority_sequence_data.xml", ], - 'development_status': 'Beta', - 'maintainers': ['patrickrwilson'], + "development_status": "Beta", + "maintainers": ["patrickrwilson"], } diff --git a/partner_priority/data/partner_priority_data.xml b/partner_priority/data/partner_priority_data.xml index ebfe533bb..537d081ab 100644 --- a/partner_priority/data/partner_priority_data.xml +++ b/partner_priority/data/partner_priority_data.xml @@ -1,6 +1,5 @@ - Low diff --git a/partner_priority/data/partner_priority_sequence_data.xml b/partner_priority/data/partner_priority_sequence_data.xml index 0e974a076..a173cea51 100644 --- a/partner_priority/data/partner_priority_sequence_data.xml +++ b/partner_priority/data/partner_priority_sequence_data.xml @@ -1,6 +1,5 @@ - Priority Sequence diff --git a/partner_priority/models/partner_priority.py b/partner_priority/models/partner_priority.py index e4bf4610e..a742a6c16 100644 --- a/partner_priority/models/partner_priority.py +++ b/partner_priority/models/partner_priority.py @@ -1,15 +1,20 @@ # Copyright 2019 Patrick Wilson # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import models, fields +from odoo import fields, models class PartnerPriority(models.Model): - _name = 'partner.priority' - _order = 'sequence' - _description = 'Partner Priority' + _name = "partner.priority" + _order = "sequence" + _description = "Partner Priority" name = fields.Char(string="Priority", required=True) description = fields.Text(required=True) - sequence = fields.Integer(required=True, default=lambda self: self.env[ - 'ir.sequence'].next_by_code('res.partner.priority') or 0) + sequence = fields.Integer( + required=True, + default=lambda self: self.env["ir.sequence"].next_by_code( + "res.partner.priority" + ) + or 0, + ) diff --git a/partner_priority/models/res_partner.py b/partner_priority/models/res_partner.py index 4f7c3bb28..e7962a24b 100644 --- a/partner_priority/models/res_partner.py +++ b/partner_priority/models/res_partner.py @@ -1,10 +1,10 @@ # Copyright 2019 Patrick Wilson # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import models, fields +from odoo import fields, models class ResPartner(models.Model): - _inherit = 'res.partner' + _inherit = "res.partner" - priority_id = fields.Many2one('partner.priority') + priority_id = fields.Many2one("partner.priority") diff --git a/partner_priority/views/partner_priority.xml b/partner_priority/views/partner_priority.xml index ddf0a3ada..e3f77ef42 100644 --- a/partner_priority/views/partner_priority.xml +++ b/partner_priority/views/partner_priority.xml @@ -1,19 +1,17 @@ - Priority List partner.priority - - - + + + - Priority Form partner.priority @@ -22,26 +20,27 @@
- +
- Priority Action partner.priority tree,form - + sequence="101" + />
diff --git a/partner_priority/views/res_partner.xml b/partner_priority/views/res_partner.xml index 208ab74ec..f64797f32 100644 --- a/partner_priority/views/res_partner.xml +++ b/partner_priority/views/res_partner.xml @@ -1,28 +1,30 @@ - partner.priority.form res.partner - + - + - partner.priority.filter res.partner - + - +