Skip to content

Commit 313d0f7

Browse files
committed
[9.0][MIG][base_custom_info] Migration.
Mostly no changes from 8.0 after all.
1 parent 1c67823 commit 313d0f7

File tree

7 files changed

+9
-20
lines changed

7 files changed

+9
-20
lines changed

base_custom_info/README.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ To manage their values, you need to:
4343

4444
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
4545
:alt: Try me on Runbot
46-
:target: https://runbot.odoo-community.org/runbot/135/8.0
46+
:target: https://runbot.odoo-community.org/runbot/135/9.0
4747

4848
Development
4949
===========
@@ -62,11 +62,7 @@ Bug Tracker
6262
Bugs are tracked on `GitHub Issues
6363
<https://github.com/OCA/product-attribute/issues>`_. In case of trouble, please
6464
check there if your issue has already been reported. If you spotted it first,
65-
help us smashing it by providing a detailed and welcomed `feedback
66-
<https://github.com/OCA/
67-
product-attribute/issues/new?body=module:%20
68-
base_custom_info%0Aversion:%20
69-
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
65+
help us smashing it by providing a detailed and welcomed feedback.
7066

7167
Credits
7268
=======

base_custom_info/__openerp__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# -*- coding: utf-8 -*-
22
# © 2015 Antiun Ingeniería S.L. - Sergio Teruel
33
# © 2015 Antiun Ingeniería S.L. - Carlos Dauden
4-
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
4+
# © 2015-2016 Jairo Llopis <[email protected]>
55
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
66

77
{
88
'name': "Base Custom Info",
99
'summary': "Add custom field in models",
1010
'category': 'Tools',
11-
'version': '8.0.1.0.0',
11+
'version': '9.0.1.0.0',
1212
'depends': [
1313
'base',
1414
],

base_custom_info/models/custom_info.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ class CustomInfoProperty(models.Model):
5757
"Another property with that name exists for that template."),
5858
]
5959

60-
name = fields.Char(translate=True)
60+
name = fields.Char(required=True, translate=True)
6161
template_id = fields.Many2one(
6262
comodel_name='custom.info.template',
63-
string='Template')
63+
string='Template',
64+
required=True)
6465
info_value_ids = fields.One2many(
6566
comodel_name="custom.info.value",
6667
inverse_name="property_id",
@@ -83,8 +84,8 @@ class CustomInfoValue(models.Model):
8384
comodel_name='custom.info.property',
8485
required=True,
8586
string='Property')
86-
name = fields.Char(related='property_id.name')
87-
value = fields.Char(translate=True)
87+
name = fields.Char(related='property_id.name', readonly=True)
88+
value = fields.Char(translate=True, index=True)
8889

8990

9091
class CustomInfo(models.AbstractModel):

base_custom_info/views/custom_info_property_view.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<openerp>
3-
<data>
43

54
<record id="base_custom_info_template_line_tree" model="ir.ui.view">
65
<field name="name">base.custom.info.property.tree</field>
@@ -39,5 +38,4 @@
3938
<field name="view_type">form</field>
4039
</record>
4140

42-
</data>
4341
</openerp>

base_custom_info/views/custom_info_template_view.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<openerp>
3-
<data>
43

54
<record id="base_custom_info_template_tree" model="ir.ui.view">
65
<field name="name">base.custom.info.template.tree</field>
@@ -56,5 +55,4 @@
5655
</field>
5756
</record>
5857

59-
</data>
6058
</openerp>

base_custom_info/views/custom_info_value_view.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<openerp>
3-
<data>
43

54
<record id="base_custom_info_value_tree" model="ir.ui.view">
65
<field name="name">base.custom.info.value.tree</field>
@@ -23,5 +22,4 @@
2322
<field name="view_type">form</field>
2423
</record>
2524

26-
</data>
2725
</openerp>

base_custom_info/views/menu.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<openerp>
3-
<data>
43

54
<!--Parent Custom Info in Settings-->
65
<menuitem id="menu_base_custom_info" name="Custom Info"
@@ -21,5 +20,4 @@
2120
action="custom_info_value_action"
2221
parent="menu_base_custom_info" sequence="15"/>
2322

24-
</data>
2523
</openerp>

0 commit comments

Comments
 (0)