Browse Source
[MIG] partner_company_type: Migration to 11.0
pull/660/head
George Daramouskas
6 years ago
No known key found for this signature in database
GPG Key ID: 5B4EF742F8CD859C
10 changed files with
13 additions and
30 deletions
-
partner_company_type/README.rst
-
partner_company_type/__init__.py
-
partner_company_type/__manifest__.py
-
partner_company_type/migrations/10.0.1.0.1/post-migration.py
-
partner_company_type/models/__init__.py
-
partner_company_type/models/res_partner.py
-
partner_company_type/models/res_partner_company_type.py
-
partner_company_type/tests/__init__.py
-
partner_company_type/tests/test_company_type.py
-
partner_company_type/views/res_partner_company_type.xml
|
|
@ -18,7 +18,7 @@ Usage |
|
|
|
|
|
|
|
.. 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/10.0 |
|
|
|
:target: https://runbot.odoo-community.org/runbot/134/11.0 |
|
|
|
|
|
|
|
|
|
|
|
Bug Tracker |
|
|
@ -41,6 +41,7 @@ Contributors |
|
|
|
------------ |
|
|
|
|
|
|
|
* Denis Roussel <denis.roussel@acsone.eu> |
|
|
|
* George Daramouskas <gdaramouskas@therp.nl> |
|
|
|
|
|
|
|
Maintainer |
|
|
|
---------- |
|
|
|
|
|
@ -1 +1,2 @@ |
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|
|
|
from . import models |
|
|
@ -1,17 +1,14 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2017 ACSONE SA/NV |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
{ |
|
|
|
'name': 'Partner Company Type', |
|
|
|
'summary': 'Adds a company type to partner that are companies', |
|
|
|
'version': '10.0.1.0.1', |
|
|
|
'version': '11.0.1.0.0', |
|
|
|
'license': 'AGPL-3', |
|
|
|
'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', |
|
|
|
'website': 'https://acsone.eu', |
|
|
|
'website': 'https://github.com/OCA/partner-contact', |
|
|
|
'depends': [ |
|
|
|
'base', |
|
|
|
'sales_team', |
|
|
|
'contacts', |
|
|
|
], |
|
|
|
'data': [ |
|
|
|
'security/res_partner_company_type.xml', |
|
|
|
|
|
@ -1,10 +0,0 @@ |
|
|
|
# -*- 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' |
|
|
|
) |
|
|
@ -1,2 +1,3 @@ |
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|
|
|
from . import res_partner_company_type |
|
|
|
from . import res_partner |
|
|
@ -1,7 +1,5 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2017 ACSONE SA/NV |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
from odoo import fields, models |
|
|
|
|
|
|
|
|
|
|
@ -10,5 +8,6 @@ class ResPartner(models.Model): |
|
|
|
|
|
|
|
partner_company_type_id = fields.Many2one( |
|
|
|
'res.partner.company.type', |
|
|
|
string='Company Type' |
|
|
|
string='Company Type', |
|
|
|
oldname='company_type_id', |
|
|
|
) |
|
|
@ -1,7 +1,5 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2017 ACSONE SA/NV |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
from odoo import fields, models |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1,4 +1 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2016 ACSONE SA/NV |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
from . import test_company_type |
|
|
@ -1,11 +1,11 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# Copyright 2016 ACSONE SA/NV |
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
from odoo.tests import TransactionCase |
|
|
|
from odoo.tools.misc import mute_logger |
|
|
|
from psycopg2 import IntegrityError |
|
|
|
|
|
|
|
|
|
|
|
@mute_logger('odoo.sql_db') |
|
|
|
class CompanyTypeTest(TransactionCase): |
|
|
|
|
|
|
|
def setUp(self): |
|
|
|
|
|
@ -45,7 +45,6 @@ |
|
|
|
<field name="context">{}</field> |
|
|
|
</record> |
|
|
|
|
|
|
|
<!-- Odoo put partner title menu in sales_team... --> |
|
|
|
<menuitem action="res_partner_company_type_act_window" id="menu_partner_company_type" name="Company Types" parent="sales_team.menu_config_address_book" sequence="4" groups="base.group_no_one"/> |
|
|
|
<menuitem action="res_partner_company_type_act_window" id="menu_partner_company_type" name="Company Types" parent="contacts.menu_contacts" sequence="4" groups="base.group_no_one"/> |
|
|
|
|
|
|
|
</odoo> |