Browse Source

[9.0][MIG][base_custom_info] Migration.

Mostly no changes from 8.0 after all.
pull/435/head
Jairo Llopis 9 years ago
parent
commit
4783c9fdb0
  1. 8
      base_custom_info/README.rst
  2. 5
      base_custom_info/__openerp__.py
  3. 9
      base_custom_info/models/custom_info.py
  4. 2
      base_custom_info/views/custom_info_property_view.xml
  5. 2
      base_custom_info/views/custom_info_template_view.xml
  6. 2
      base_custom_info/views/custom_info_value_view.xml
  7. 2
      base_custom_info/views/menu.xml

8
base_custom_info/README.rst

@ -43,7 +43,7 @@ To manage their values, you need to:
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/135/8.0
:target: https://runbot.odoo-community.org/runbot/135/9.0
Development
===========
@ -62,11 +62,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/product-attribute/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed `feedback
<https://github.com/OCA/
product-attribute/issues/new?body=module:%20
base_custom_info%0Aversion:%20
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
help us smashing it by providing a detailed and welcomed feedback.
Credits
=======

5
base_custom_info/__openerp__.py

@ -1,14 +1,14 @@
# -*- coding: utf-8 -*-
# © 2015 Antiun Ingeniería S.L. - Sergio Teruel
# © 2015 Antiun Ingeniería S.L. - Carlos Dauden
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# © 2015-2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': "Base Custom Info",
'summary': "Add custom field in models",
'category': 'Tools',
'version': '8.0.1.0.0',
'version': '9.0.1.0.0',
'depends': [
'base',
],
@ -27,6 +27,7 @@
],
'author': 'Antiun Ingeniería S.L., '
'Incaser Informatica S.L., '
'Tecnativa, '
'Odoo Community Association (OCA)',
'website': 'http://www.antiun.com',
'license': 'AGPL-3',

9
base_custom_info/models/custom_info.py

@ -57,10 +57,11 @@ class CustomInfoProperty(models.Model):
"Another property with that name exists for that template."),
]
name = fields.Char(translate=True)
name = fields.Char(required=True, translate=True)
template_id = fields.Many2one(
comodel_name='custom.info.template',
string='Template')
string='Template',
required=True)
info_value_ids = fields.One2many(
comodel_name="custom.info.value",
inverse_name="property_id",
@ -83,8 +84,8 @@ class CustomInfoValue(models.Model):
comodel_name='custom.info.property',
required=True,
string='Property')
name = fields.Char(related='property_id.name')
value = fields.Char(translate=True)
name = fields.Char(related='property_id.name', readonly=True)
value = fields.Char(translate=True, index=True)
class CustomInfo(models.AbstractModel):

2
base_custom_info/views/custom_info_property_view.xml

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="base_custom_info_template_line_tree" model="ir.ui.view">
<field name="name">base.custom.info.property.tree</field>
@ -39,5 +38,4 @@
<field name="view_type">form</field>
</record>
</data>
</openerp>

2
base_custom_info/views/custom_info_template_view.xml

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="base_custom_info_template_tree" model="ir.ui.view">
<field name="name">base.custom.info.template.tree</field>
@ -56,5 +55,4 @@
</field>
</record>
</data>
</openerp>

2
base_custom_info/views/custom_info_value_view.xml

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="base_custom_info_value_tree" model="ir.ui.view">
<field name="name">base.custom.info.value.tree</field>
@ -23,5 +22,4 @@
<field name="view_type">form</field>
</record>
</data>
</openerp>

2
base_custom_info/views/menu.xml

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--Parent Custom Info in Settings-->
<menuitem id="menu_base_custom_info" name="Custom Info"
@ -21,5 +20,4 @@
action="custom_info_value_action"
parent="menu_base_custom_info" sequence="15"/>
</data>
</openerp>
Loading…
Cancel
Save