forked from OCA/l10n-netherlands
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] l10n_nl_partner_name: Migration to 16.0
- Loading branch information
1 parent
a6b1a8b
commit a328b75
Showing
13 changed files
with
530 additions
and
81 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 |
---|---|---|
@@ -1,38 +1,81 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
=================== | ||
Dutch partner names | ||
=================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:dc922451f20f7d346bb7b8f4e506309e13f92c39d2851521105eb3a08ccdea40 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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/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%2Fl10n--netherlands-lightgray.png?logo=github | ||
:target: https://github.com/OCA/l10n-netherlands/tree/16.0/l10n_nl_partner_name | ||
:alt: OCA/l10n-netherlands | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/l10n-netherlands-16-0/l10n-netherlands-16-0-l10n_nl_partner_name | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-netherlands&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
Module Dutch Partner Name | ||
========================= | ||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
Use Dutch conventions for partner names: | ||
Use Dutch conventions for partner names: | ||
- have infixes | ||
- have initials | ||
- split first and last name (provided by partner_firstname) | ||
|
||
Roadmap | ||
------- | ||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-netherlands/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/l10n-netherlands/issues/new?body=module:%20l10n_nl_partner_name%0Aversion:%2016.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. | ||
|
||
Credits | ||
======= | ||
|
||
- allow to turn on/off initials and infix separately | ||
- add nickname (roepnaam) field to also turn on and off separately | ||
Authors | ||
~~~~~~~ | ||
|
||
* Therp BV | ||
|
||
Contributors | ||
------------ | ||
~~~~~~~~~~~~ | ||
|
||
* Holger Brunn <[email protected]> | ||
* Ronald Portier <[email protected]> | ||
* George Daramouskas <[email protected]> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: http://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: http://odoo-community.org | ||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
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 http://odoo-community.org. | ||
This module is part of the `OCA/l10n-netherlands <https://github.com/OCA/l10n-netherlands/tree/16.0/l10n_nl_partner_name>`_ 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
from . import model | ||
from . import models |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,26 @@ | ||
# Copyright 2017-24 Therp BV <https://therp.nl> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
from odoo import api, fields, models | ||
|
||
|
||
class ResPartner(models.Model): | ||
"""Extend res.partner with extra fields for Dutch names.""" | ||
|
||
_inherit = "res.partner" | ||
|
||
initials = fields.Char() | ||
infix = fields.Char() | ||
|
||
@api.depends("firstname", "lastname", "initials", "infix") | ||
def _compute_name(self): | ||
for record in self: | ||
record.name = record._get_computed_name( | ||
record.lastname, | ||
record.firstname, | ||
initials=record.initials, | ||
infix=record.infix, | ||
) | ||
|
||
@api.model | ||
def _get_computed_name(self, lastname, firstname, initials=None, infix=None): | ||
return " ".join(p for p in (firstname, initials, infix, lastname) if p) |
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,3 @@ | ||
* Holger Brunn <[email protected]> | ||
* Ronald Portier <[email protected]> | ||
* George Daramouskas <[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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Use Dutch conventions for partner names: | ||
- have infixes | ||
- have initials | ||
- split first and last name (provided by partner_firstname) |
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
Oops, something went wrong.