From 839277e10326bc1f498e3ff4453d77a4d5edc352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20D=C3=ADaz?= Date: Thu, 13 Jun 2019 13:32:26 +0200 Subject: [PATCH] [MIG] partner_capital: Migration to 12.0 --- partner_capital/README.rst | 76 ++- partner_capital/__init__.py | 1 - partner_capital/__manifest__.py | 10 +- partner_capital/models/__init__.py | 10 +- partner_capital/models/res_partner.py | 14 +- .../models/res_partner_turnover_range.py | 3 +- partner_capital/readme/CONTRIBUTORS.rst | 5 + partner_capital/readme/DESCRIPTION.rst | 10 + partner_capital/readme/ROADMAP.rst | 2 + partner_capital/readme/USAGE.rst | 8 + partner_capital/static/description/index.html | 451 ++++++++++++++++++ .../views/res_partner_turnover_range_view.xml | 6 +- partner_capital/views/res_partner_view.xml | 7 +- 13 files changed, 547 insertions(+), 56 deletions(-) create mode 100644 partner_capital/readme/CONTRIBUTORS.rst create mode 100644 partner_capital/readme/DESCRIPTION.rst create mode 100644 partner_capital/readme/ROADMAP.rst create mode 100644 partner_capital/readme/USAGE.rst create mode 100644 partner_capital/static/description/index.html diff --git a/partner_capital/README.rst b/partner_capital/README.rst index 1a7c9150f..7cd45c39a 100644 --- a/partner_capital/README.rst +++ b/partner_capital/README.rst @@ -1,10 +1,26 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - -=============== -Partner Capital -=============== +================ +Partners Capital +================ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github + :target: https://github.com/OCA/partner-contact/tree/12.0/partner_capital + :alt: OCA/partner-contact +.. |badge3| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-partner_capital + :alt: Translate me on Weblate +.. |badge4| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/134/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| This module extends the functionality of partners to support setting the country of origin of capital, registered capital amount and turnover. @@ -17,6 +33,11 @@ company. By turnover we can define a range for a concrete amount. +**Table of contents** + +.. contents:: + :local: + Usage ===== @@ -27,11 +48,7 @@ To use this module, you need to: To manage turnover ranges, you need to: -* Go to *Sales > Configuration > Address Book > Turnover ranges*. - -.. 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 +* Go to *Contacts > Configuration > Turnover ranges*. Known issues / Roadmap ====================== @@ -42,37 +59,44 @@ Known issues / Roadmap Bug Tracker =========== -Bugs are tracked on `GitHub 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 -`_. +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Antiun Ingeniería S.L. +* Tecnativa + Contributors ------------- +~~~~~~~~~~~~ * Antonio Espinosa * Rafael Blasco * Jairo Llopis * David Vidal +* Alexandre Díaz + +Maintainers +~~~~~~~~~~~ -Maintainer ----------- +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - 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. +This module is part of the `OCA/partner-contact `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/partner_capital/__init__.py b/partner_capital/__init__.py index cde864bae..a9e337226 100644 --- a/partner_capital/__init__.py +++ b/partner_capital/__init__.py @@ -1,3 +1,2 @@ -# -*- coding: utf-8 -*- from . import models diff --git a/partner_capital/__manifest__.py b/partner_capital/__manifest__.py index 2057aa1be..166954f8f 100644 --- a/partner_capital/__manifest__.py +++ b/partner_capital/__manifest__.py @@ -1,19 +1,19 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Antonio Espinosa # Copyright 2015 Jairo Llopis # Copyright 2017 David Vidal -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { 'name': 'Partners Capital', - 'version': '10.0.1.0.0', + 'version': '12.0.1.0.0', 'category': 'Customer Relationship Management', + 'license': 'AGPL-3', 'author': 'Antiun Ingeniería S.L., ' 'Tecnativa, ' 'Odoo Community Association (OCA)', - 'website': 'https://www.tecnativa.com', + 'website': 'https://github.com/OCA/partner-contact', 'depends': [ - 'sale', + 'contacts', ], 'data': [ 'views/res_partner_turnover_range_view.xml', diff --git a/partner_capital/models/__init__.py b/partner_capital/models/__init__.py index c2cd4625c..036ad3507 100644 --- a/partner_capital/models/__init__.py +++ b/partner_capital/models/__init__.py @@ -1,9 +1,3 @@ -# -*- coding: utf-8 -*- -# © 2015 Antiun Ingeniería S.L. - Antonio Espinosa -# © 2015 Antiun Ingeniería S.L. - Jairo Llopis -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from . import ( - res_partner_turnover_range, - res_partner, -) +from . import res_partner_turnover_range +from . import res_partner diff --git a/partner_capital/models/res_partner.py b/partner_capital/models/res_partner.py index ba2a31e63..5bdd4ef12 100644 --- a/partner_capital/models/res_partner.py +++ b/partner_capital/models/res_partner.py @@ -1,7 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Antonio Espinosa # Copyright 2015 Jairo Llopis -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models @@ -12,21 +11,18 @@ class ResPartner(models.Model): capital_country_id = fields.Many2one( 'res.country', "Capital country", - oldname="capital_country", help="Country of origin of this company's capital.") - capital_amount = fields.Float( + capital_amount = fields.Monetary( "Capital amount", - oldname="capital_registered", + currency_field='capital_currency_id', help="Publicly registered capital amount.") capital_currency_id = fields.Many2one( "res.currency", string="Capital currency") turnover_range_id = fields.Many2one( 'res.partner.turnover_range', - "Turnover range", - oldname="turnover_range") - turnover_amount = fields.Float( - oldname="turnover_number") + "Turnover range") + turnover_amount = fields.Float() company_size = fields.Selection( string="Company size", selection=[('micro', 'Micro'), ('small', 'Small'), diff --git a/partner_capital/models/res_partner_turnover_range.py b/partner_capital/models/res_partner_turnover_range.py index a0cef68ef..548ecd6a0 100644 --- a/partner_capital/models/res_partner_turnover_range.py +++ b/partner_capital/models/res_partner_turnover_range.py @@ -1,7 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Antonio Espinosa # Copyright 2015 Jairo Llopis -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models diff --git a/partner_capital/readme/CONTRIBUTORS.rst b/partner_capital/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..e92a687e7 --- /dev/null +++ b/partner_capital/readme/CONTRIBUTORS.rst @@ -0,0 +1,5 @@ +* Antonio Espinosa +* Rafael Blasco +* Jairo Llopis +* David Vidal +* Alexandre Díaz diff --git a/partner_capital/readme/DESCRIPTION.rst b/partner_capital/readme/DESCRIPTION.rst new file mode 100644 index 000000000..9aa63d02b --- /dev/null +++ b/partner_capital/readme/DESCRIPTION.rst @@ -0,0 +1,10 @@ +This module extends the functionality of partners to support setting the +country of origin of capital, registered capital amount and turnover. + +By capital country we mean country of origin of the capital of the company. + +By registered capital amount we mean the amount of money registered in the +corresponding commercial registry, A.K.A. social capital or just capital of a +company. + +By turnover we can define a range for a concrete amount. diff --git a/partner_capital/readme/ROADMAP.rst b/partner_capital/readme/ROADMAP.rst new file mode 100644 index 000000000..19479575c --- /dev/null +++ b/partner_capital/readme/ROADMAP.rst @@ -0,0 +1,2 @@ +* Add automatic rules to calculate turnover range and company size. +* Allow customization of company sizes. diff --git a/partner_capital/readme/USAGE.rst b/partner_capital/readme/USAGE.rst new file mode 100644 index 000000000..888c79b23 --- /dev/null +++ b/partner_capital/readme/USAGE.rst @@ -0,0 +1,8 @@ +To use this module, you need to: + +* Go to any partner's form. +* You will find the new fields in *Sales & Purchases > Capital*. + +To manage turnover ranges, you need to: + +* Go to *Contacts > Configuration > Turnover ranges*. diff --git a/partner_capital/static/description/index.html b/partner_capital/static/description/index.html new file mode 100644 index 000000000..9000dbc52 --- /dev/null +++ b/partner_capital/static/description/index.html @@ -0,0 +1,451 @@ + + + + + + +Partners Capital + + + +
+

Partners Capital

+ + +

Beta OCA/partner-contact Translate me on Weblate Try me on Runbot

+

This module extends the functionality of partners to support setting the +country of origin of capital, registered capital amount and turnover.

+

By capital country we mean country of origin of the capital of the company.

+

By registered capital amount we mean the amount of money registered in the +corresponding commercial registry, A.K.A. social capital or just capital of a +company.

+

By turnover we can define a range for a concrete amount.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  • Go to any partner’s form.
  • +
  • You will find the new fields in Sales & Purchases > Capital.
  • +
+

To manage turnover ranges, you need to:

+
    +
  • Go to Contacts > Configuration > Turnover ranges.
  • +
+
+
+

Known issues / Roadmap

+
    +
  • Add automatic rules to calculate turnover range and company size.
  • +
  • Allow customization of company sizes.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Antiun Ingeniería S.L.
  • +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

This module is part of the OCA/partner-contact project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/partner_capital/views/res_partner_turnover_range_view.xml b/partner_capital/views/res_partner_turnover_range_view.xml index 6b8bc9eee..7a896d929 100644 --- a/partner_capital/views/res_partner_turnover_range_view.xml +++ b/partner_capital/views/res_partner_turnover_range_view.xml @@ -19,8 +19,8 @@ - + diff --git a/partner_capital/views/res_partner_view.xml b/partner_capital/views/res_partner_view.xml index 915dab301..f00ba4c94 100644 --- a/partner_capital/views/res_partner_view.xml +++ b/partner_capital/views/res_partner_view.xml @@ -7,8 +7,8 @@ res.partner - - + @@ -29,12 +29,15 @@