Browse Source

[1.0.1] partner_company_type: Fix possible translation problem

pull/660/head
Denis Roussel 7 years ago
committed by George Daramouskas
parent
commit
59e75a26fd
No known key found for this signature in database GPG Key ID: 5B4EF742F8CD859C
  1. 3
      partner_company_type/README.rst
  2. 10
      partner_company_type/__manifest__.py
  3. 10
      partner_company_type/migrations/10.0.1.0.1/post-migration.py
  4. 6
      partner_company_type/models/res_partner.py
  5. 3
      partner_company_type/views/res_partner.xml

3
partner_company_type/README.rst

@ -20,9 +20,6 @@ Usage
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/134/10.0
.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt
.. branch is "8.0" for example
Bug Tracker
===========

10
partner_company_type/__manifest__.py

@ -4,14 +4,14 @@
{
'name': 'Partner Company Type',
'summary': """
Adds a company type to partner that are companies""",
'version': '10.0.1.0.0',
'summary': 'Adds a company type to partner that are companies',
'version': '10.0.1.0.1',
'license': 'AGPL-3',
'author': 'ACSONE SA/NV,Odoo Community Association (OCA)',
'website': 'https://acsone.eu',
'depends': ['base',
'sales_team'
'depends': [
'base',
'sales_team',
],
'data': [
'security/res_partner_company_type.xml',

10
partner_company_type/migrations/10.0.1.0.1/post-migration.py

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright 2017 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
def migrate(cr, version):
cr.execute(
'UPDATE res_partner SET partner_company_type_id = company_type_id'
)

6
partner_company_type/models/res_partner.py

@ -8,5 +8,7 @@ from odoo import fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
company_type_id = fields.Many2one('res.partner.company.type',
string='Company Type')
partner_company_type_id = fields.Many2one(
'res.partner.company.type',
string='Company Type'
)

3
partner_company_type/views/res_partner.xml

@ -3,14 +3,13 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_partner_company_type_form" model="ir.ui.view">
<field name="name">res.partner.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="title" position="after">
<field name="company_type_id" options='{"no_open": True}'
<field name="partner_company_type_id" options='{"no_open": True}'
attrs="{'invisible': [('is_company', '=', False)]}"/>
</field>
</field>

Loading…
Cancel
Save