Browse Source
[1.0.1] partner_company_type: Fix possible translation problem
pull/660/head
Denis Roussel
7 years ago
committed by
George Daramouskas
No known key found for this signature in database
GPG Key ID: 5B4EF742F8CD859C
6 changed files with
34 additions and
26 deletions
-
partner_company_type/README.rst
-
partner_company_type/__manifest__.py
-
partner_company_type/migrations/10.0.1.0.1/post-migration.py
-
partner_company_type/models/res_partner.py
-
partner_company_type/models/res_partner_company_type.py
-
partner_company_type/views/res_partner.xml
|
|
@ -10,7 +10,7 @@ Adds a title to partner that are companies. |
|
|
|
(Before: Partner Title in Odoo - limited to contacts now) |
|
|
|
|
|
|
|
See : |
|
|
|
:target: https://en.wikipedia.org/wiki/Types_of_business_entity |
|
|
|
:target: https://en.wikipedia.org/wiki/Types_of_business_entity |
|
|
|
|
|
|
|
Usage |
|
|
|
===== |
|
|
@ -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 |
|
|
|
=========== |
|
|
|
|
|
@ -4,15 +4,15 @@ |
|
|
|
|
|
|
|
{ |
|
|
|
'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', |
|
|
|
'views/res_partner_company_type.xml', |
|
|
|
|
|
@ -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' |
|
|
|
) |
|
|
@ -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' |
|
|
|
) |
|
|
@ -14,4 +14,4 @@ class ResPartnerCompanyType(models.Model): |
|
|
|
shortcut = fields.Char(string='Abbreviation', translate=True) |
|
|
|
|
|
|
|
_sql_constraints = [('name_uniq', 'unique (name)', |
|
|
|
"Partner Company Type already exists !")] |
|
|
|
"Partner Company Type already exists!")] |
|
|
@ -3,16 +3,15 @@ |
|
|
|
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}' |
|
|
|
attrs="{'invisible': [('is_company', '=', False)]}"/> |
|
|
|
</field> |
|
|
|
</field> |
|
|
|
</record> |
|
|
|
</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="partner_company_type_id" options='{"no_open": True}' |
|
|
|
attrs="{'invisible': [('is_company', '=', False)]}"/> |
|
|
|
</field> |
|
|
|
</field> |
|
|
|
</record> |
|
|
|
</odoo> |