-
-
Notifications
You must be signed in to change notification settings - Fork 852
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] partner_contact_department: Migration to 15.0
- Loading branch information
1 parent
8b47321
commit fec646f
Showing
9 changed files
with
85 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,15 @@ Partner Contact Department | |
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github | ||
:target: https://github.com/OCA/partner-contact/tree/14.0/partner_contact_department | ||
:alt: OCA/partner-contact | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner_contact-lightgray.png?logo=github | ||
:target: https://github.com/OCA/partner_contact/tree/15.0/partner_contact_department | ||
:alt: OCA/partner_contact | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-partner_contact_department | ||
:target: https://translation.odoo-community.org/projects/partner_contact-15-0/partner_contact-15-0-partner_contact_department | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/134/14.0 | ||
:alt: Try me on Runbot | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/partner_contact&target_branch=15.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
|
@@ -43,7 +43,7 @@ To configure departments, you need to: | |
|
||
* Go to *Contacts > Configuration > Departments*. | ||
|
||
.. figure:: https://raw.githubusercontent.com/OCA/partner-contact/14.0/partner_contact_department/path/to/local/image.png | ||
.. figure:: https://raw.githubusercontent.com/OCA/partner_contact/15.0/partner_contact_department/path/to/local/image.png | ||
:alt: alternative description | ||
:width: 600 px | ||
|
||
|
@@ -58,10 +58,10 @@ To use this module, you need to: | |
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/issues>`_. | ||
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 <https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_contact_department%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
`feedback <https://github.com/OCA/partner_contact/issues/new?body=module:%20partner_contact_department%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
|
@@ -76,12 +76,17 @@ Authors | |
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Pedro M. Baeza <[email protected]> | ||
* Antonio Espinosa <[email protected]> | ||
* Rafael Blasco <[email protected]> | ||
* Jairo Llopis <[email protected]> | ||
* Vicent Cubells <[email protected]> | ||
* David Vidal <[email protected]> | ||
* `Tecnativa <https://www.tecnativa.com>`_: | ||
|
||
* Pedro M. Baeza | ||
* Antonio Espinosa | ||
* Rafael Blasco | ||
* Jairo Llopis | ||
* Vicent Cubells | ||
* David Vidal | ||
* Stefan Ungureanu | ||
|
||
|
||
* Nikul Chaudhary <[email protected]> | ||
* Harald Panten <[email protected]> | ||
* Tharathip Chaweewongphan <[email protected]> | ||
|
@@ -99,6 +104,6 @@ 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 <https://github.com/OCA/partner-contact/tree/14.0/partner_contact_department>`_ project on GitHub. | ||
This module is part of the `OCA/partner_contact <https://github.com/OCA/partner_contact/tree/15.0/partner_contact_department>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import res_partner | ||
from . import res_partner_department |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
partner_contact_department/models/res_partner_department.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# © 2014-2015 Tecnativa S.L. - Jairo Llopis | ||
# © 2016 Tecnativa S.L. - Vicent Cubells | ||
# © 2023 Tecnativa S.L. - Stefan Ungureanu | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ResPartnerDepartment(models.Model): | ||
_name = "res.partner.department" | ||
_order = "parent_path" | ||
_parent_order = "name" | ||
_parent_store = True | ||
_description = "Department" | ||
|
||
name = fields.Char(required=True, translate=True) | ||
parent_id = fields.Many2one( | ||
"res.partner.department", "Parent department", ondelete="restrict" | ||
) | ||
child_ids = fields.One2many( | ||
"res.partner.department", "parent_id", "Child departments" | ||
) | ||
parent_path = fields.Char(index=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
* Pedro M. Baeza <[email protected]> | ||
* Antonio Espinosa <[email protected]> | ||
* Rafael Blasco <[email protected]> | ||
* Jairo Llopis <[email protected]> | ||
* Vicent Cubells <[email protected]> | ||
* David Vidal <[email protected]> | ||
* `Tecnativa <https://www.tecnativa.com>`_: | ||
|
||
* Pedro M. Baeza | ||
* Antonio Espinosa | ||
* Rafael Blasco | ||
* Jairo Llopis | ||
* Vicent Cubells | ||
* David Vidal | ||
* Stefan Ungureanu | ||
|
||
|
||
* Nikul Chaudhary <[email protected]> | ||
* Harald Panten <[email protected]> | ||
* Tharathip Chaweewongphan <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters