Skip to content

Commit 9be1260

Browse files
florian-dacostaPierrick Brun
authored and
Pierrick Brun
committed
[16.0][MIG] module_analysis_price : Migrate to 16
1 parent 35f925c commit 9be1260

File tree

5 files changed

+13
-30
lines changed

5 files changed

+13
-30
lines changed

module_analysis_price/DESCRIPTION.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add a price by type of module (OCA, Custom...) to determine a maintenance and migration cost

module_analysis_price/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"name": "Module Analysis Price",
77
"summary": "Module Analysis Price",
8-
"version": "14.0.1.0.0",
8+
"version": "16.0.1.0.0",
99
"website": "https://github.com/akretion/ak-odoo-incubator",
1010
"author": " Akretion",
1111
"license": "AGPL-3",

module_analysis_price/data/module_type_data.xml

+5-8
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,28 @@
55
<field name="name">Odoo Framework</field>
66
</record>
77

8-
<record id="module_type_odoo_module" model="ir.module.type">
8+
<record id="module_analysis.module_type_odoo" model="ir.module.type">
99
<field name="sequence">2</field>
10-
<field name="name">Odoo Natif Module</field>
1110
</record>
1211

13-
<record id="module_type_oca" model="ir.module.type">
12+
<record id="module_analysis.module_type_oca" model="ir.module.type">
1413
<field name="sequence">3</field>
15-
<field name="name">Odoo Community Association (OCA)</field>
16-
<field name="community">True</field>
1714
</record>
1815

1916
<record id="module_type_shopinvader" model="ir.module.type">
20-
<field name="sequence">4</field>
17+
<field name="sequence">6</field>
2118
<field name="name">Shopinvader</field>
2219
<field name="community">True</field>
2320
</record>
2421

2522
<record id="module_type_incubator" model="ir.module.type">
26-
<field name="sequence">5</field>
23+
<field name="sequence">15</field>
2724
<field name="name">Incubateur Akretion</field>
2825
<field name="community">True</field>
2926
</record>
3027

3128
<record id="module_type_custom" model="ir.module.type">
32-
<field name="sequence">6</field>
29+
<field name="sequence">50</field>
3330
<field name="name">Custom</field>
3431
</record>
3532

module_analysis_price/data/module_type_rule_data.xml

+4-20
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,33 @@
22
<odoo>
33

44
<record id="module_type_rule_odoo_framework" model="ir.module.type.rule">
5-
<field name="sequence">1</field>
5+
<field name="sequence">0</field>
66
<field name="module_type_id" ref="module_type_odoo_framework" />
77
<field
88
name="module_domain"
99
>[('name', 'in', ('base', 'web', 'iap', 'iap_mail', 'mail', 'web_editor', 'web_kanban_gauge', 'web_tour', 'rating', 'portal', 'rating', 'utm', 'http_routing', 'digest', 'fetchmail', 'bus', 'board', 'base_automation', 'base_vat', 'base_import', 'base_iban', 'base_setup', 'base_sparse_field', 'auth_password_policy', 'auth_password_policy_signup', 'auth_signup'))]</field>
1010
</record>
1111

12-
<record id="module_type_rule_oca" model="ir.module.type.rule">
13-
<field name="sequence">2</field>
14-
<field name="module_type_id" ref="module_type_oca" />
15-
<field
16-
name="module_domain"
17-
>[('author_ids', '=', 'Odoo Community Association (OCA)')]</field>
18-
</record>
19-
2012
<record id="module_type_rule_shopinvader" model="ir.module.type.rule">
21-
<field name="sequence">3</field>
13+
<field name="sequence">150</field>
2214
<field name="module_type_id" ref="module_type_shopinvader" />
2315
<field
2416
name="module_domain"
2517
>['|', ('website', 'ilike', 'shopinvader'), ('name', 'ilike', 'shopinvader')]</field>
2618
</record>
2719

2820
<record id="module_type_rule_custom" model="ir.module.type.rule">
29-
<field name="sequence">4</field>
21+
<field name="sequence">200</field>
3022
<field name="module_type_id" ref="module_type_custom" />
3123
<field
3224
name="module_domain"
3325
>[('website', 'ilike', 'https://gitlab.akretion.com')]</field>
3426
</record>
3527

3628
<record id="module_type_rule_incubator" model="ir.module.type.rule">
37-
<field name="sequence">5</field>
29+
<field name="sequence">250</field>
3830
<field name="module_type_id" ref="module_type_incubator" />
3931
<field name="module_domain">[('author_ids', '=', 'Akretion')]</field>
4032
</record>
4133

42-
<record id="module_type_rule_odoo_module" model="ir.module.type.rule">
43-
<field name="sequence">6</field>
44-
<field name="module_type_id" ref="module_type_odoo_module" />
45-
<field
46-
name="module_domain"
47-
>[('author_ids.name', 'in', ['Odoo S.A.', 'OpenERP SA', 'Odoo SA'])]</field>
48-
</record>
49-
5034
</odoo>

module_analysis_price/models/ir_module_module.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
44

55

6-
from odoo import fields, models
6+
from odoo import api, fields, models
77

88

99
class IrModuleModule(models.Model):
@@ -15,6 +15,7 @@ class IrModuleModule(models.Model):
1515
store=True,
1616
)
1717

18+
@api.depends("python_code_qty", "xml_code_qty", "js_code_qty")
1819
def _compute_code_qty(self):
1920
for record in self:
2021
record.code_qty = (

0 commit comments

Comments
 (0)