RemiFr82
7 months ago
7 changed files with 465 additions and 124 deletions
-
2ffck_commons/__manifest__.py
-
78ffck_commons/data/res_partner_age_range.xml
-
96ffck_commons/i18n/fr.po
-
3ffck_commons/models/__init__.py
-
206ffck_commons/models/res_partner.py
-
12ffck_commons/models/res_partner_age_range.py
-
94ffck_commons/views/res_partner.xml
@ -0,0 +1,78 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<data noupdate="1"> |
||||
|
|
||||
|
<record id="age_range_microbe" model="res.partner.age.range"> |
||||
|
<field name="name">Microbe</field> |
||||
|
<field name="age_from">0</field> |
||||
|
<field name="age_to">8</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="age_range_poussin" model="res.partner.age.range"> |
||||
|
<field name="name">Poussin</field> |
||||
|
<field name="age_from">9</field> |
||||
|
<field name="age_to">10</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="age_range_benjamin" model="res.partner.age.range"> |
||||
|
<field name="name">Benjamin</field> |
||||
|
<field name="age_from">11</field> |
||||
|
<field name="age_to">12</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="age_range_minime" model="res.partner.age.range"> |
||||
|
<field name="name">Minime</field> |
||||
|
<field name="age_from">13</field> |
||||
|
<field name="age_to">14</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="age_range_cadet" model="res.partner.age.range"> |
||||
|
<field name="name">Cadet</field> |
||||
|
<field name="age_from">15</field> |
||||
|
<field name="age_to">16</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="age_range_junior" model="res.partner.age.range"> |
||||
|
<field name="name">Junior</field> |
||||
|
<field name="age_from">17</field> |
||||
|
<field name="age_to">18</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="age_range_senior" model="res.partner.age.range"> |
||||
|
<field name="name">Sénior</field> |
||||
|
<field name="age_from">19</field> |
||||
|
<field name="age_to">34</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="age_range_veteran1" model="res.partner.age.range"> |
||||
|
<field name="name">Vétéran 1</field> |
||||
|
<field name="age_from">35</field> |
||||
|
<field name="age_to">44</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="age_range_veteran2" model="res.partner.age.range"> |
||||
|
<field name="name">Vétéran 2</field> |
||||
|
<field name="age_from">45</field> |
||||
|
<field name="age_to">54</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="age_range_veteran3" model="res.partner.age.range"> |
||||
|
<field name="name">Vétéran 3</field> |
||||
|
<field name="age_from">55</field> |
||||
|
<field name="age_to">64</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="age_range_veteran4" model="res.partner.age.range"> |
||||
|
<field name="name">Vétéran 4</field> |
||||
|
<field name="age_from">65</field> |
||||
|
<field name="age_to">74</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="age_range_veteran5" model="res.partner.age.range"> |
||||
|
<field name="name">Vétéran 5</field> |
||||
|
<field name="age_from">75</field> |
||||
|
<field name="age_to">100</field> |
||||
|
</record> |
||||
|
|
||||
|
</data> |
||||
|
</odoo> |
@ -1,4 +1,7 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
from . import ffck_structure_type |
from . import ffck_structure_type |
||||
from . import res_partner |
from . import res_partner |
||||
|
from . import res_partner_age_range |
||||
|
|
||||
|
# IMPORT hierarchy AFTER res_partner |
||||
from . import res_partner_hierarchy |
from . import res_partner_hierarchy |
@ -0,0 +1,12 @@ |
|||||
|
# Copyright 2019-2020: Druidoo (<https://www.druidoo.io>) |
||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
||||
|
|
||||
|
from odoo import _, api, fields, models |
||||
|
from odoo.exceptions import ValidationError |
||||
|
|
||||
|
|
||||
|
class ResPartnerAgeRange(models.Model): |
||||
|
_inherit = "res.partner.age.range" |
||||
|
|
||||
|
name = fields.Char(translate=True) |
||||
|
active = fields.Boolean(string="Active", default=True) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue