Browse Source

[MIG] partner_priority: Migration to 14.0

14.0
newtratip 4 years ago
parent
commit
df6acadb59
  1. 1
      partner_priority/__manifest__.py
  2. 10
      partner_priority/data/partner_priority_sequence_data.xml
  3. 5
      partner_priority/models/partner_priority.py

1
partner_priority/__manifest__.py

@ -15,7 +15,6 @@
"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"],

10
partner_priority/data/partner_priority_sequence_data.xml

@ -1,10 +0,0 @@
<!-- Copyright 2019 Patrick Wilson <patrickraymondwilson@gmail.com>
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record id="partner_priority_seq" model="ir.sequence">
<field name="name">Priority Sequence</field>
<field name="code">partner.priority</field>
<field name="prefix">0</field>
<field name="padding">1</field>
</record>
</odoo>

5
partner_priority/models/partner_priority.py

@ -13,8 +13,5 @@ class PartnerPriority(models.Model):
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,
default=0,
)
Loading…
Cancel
Save