Browse Source

[MIG] partner_contact_weight: Migrate to 10.0.

pull/395/head
Brett Wood 8 years ago
parent
commit
e009998bc7
  1. 6
      partner_contact_weight/README.rst
  2. 2
      partner_contact_weight/__manifest__.py
  3. 9
      partner_contact_weight/models/res_partner.py
  4. 9
      partner_contact_weight/views/res_partner_view.xml

6
partner_contact_weight/README.rst

@ -19,7 +19,7 @@ To use this module, 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/134/9.0
:target: https://runbot.odoo-community.org/runbot/134/10.0
Known issues / Roadmap
======================
@ -32,7 +32,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/partner-contact/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.
help us smash it by providing detailed and welcomed feedback.
Credits
=======
@ -60,4 +60,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.
To contribute to this module, please visit https://odoo-community.org.

2
partner_contact_weight/__openerp__.py → partner_contact_weight/__manifest__.py

@ -4,7 +4,7 @@
{
"name": "Partner Contact Weight",
"summary": "Provide contact weight",
"version": "9.0.1.0.1",
"version": "10.0.1.0.0",
"category": "Health",
"website": "http://ursainfosystems.com",
"author": "Ursa Information Systems, Odoo Community Association (OCA)",

9
partner_contact_weight/models/res_partner.py

@ -2,16 +2,17 @@
# Copyright 2016 Ursa Information Systems <http://ursainfosystems.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import fields, models
from odoo import fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
weight = fields.Float("Weight")
weight = fields.Float()
weight_uom = fields.Many2one(
"product.uom", "Weight UoM",
string="Weight UoM",
comodel_name="product.uom",
domain=lambda self: [('category_id', '=',
self.env.ref('product.product_uom_categ_kgm').id)
]

9
partner_contact_weight/views/res_partner_view.xml

@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_partner_contact_weight" model="ir.ui.view">
<field name="name">Partner Contact Weight</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="partner_contact_personal_information_page.personal_information"/>
<field name="inherit_id" ref="partner_contact_personal_information_page.personal_information" />
<field name="arch" type="xml">
<xpath expr="//page[@name='personal_information_page']/group[@name='personal_information_group']">
<label for="weight"/>
<label for="weight" />
<div>
<field name='weight' class="oe_inline"/>
<field name='weight' class="oe_inline" />
<field name='weight_uom'
class="oe_inline"
placeholder="UoM"/>
placeholder="UoM" />
</div>
</xpath>
</field>

Loading…
Cancel
Save