Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG]11.0 mig l10n nl partner salutation #210

Merged
merged 17 commits into from
Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions l10n_nl_partner_salutation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3

Dutch Partner Salutation
========================

New fields are added to the title model to express the salutation of partners,
in combination with the gender field. Based on partner_name_dutch, you can
then refer to function fields generating full salutations to use at the
start of a letter, or short versions to be used in addresses.

The interface allows to change generated salutations manually, after which
these will not be updated anymore after changes in the partner name or title.
While the manually entered salutations are stored in separate fields, the
function fields refer to their values when manual changes are active so you
should always use the function fields in your document templates.

While organizations have no gender (the field is hidden there), you can have
a feminine salutation by creating a partner title with an implicit gender,
such as 'Ladies club'.

Contributors
------------

* Holger Brunn <hbrunn@therp.nl>
* Ronald Portier <ronald@therp.nl>
* Stefan Rijnhart <stefan@therp.nl>
* George Daramouskas <gdaramouskas@therp.nl>

Maintainer
----------

.. image:: http://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: http://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 http://odoo-community.org.
2 changes: 2 additions & 0 deletions l10n_nl_partner_salutation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import models
daramousk marked this conversation as resolved.
Show resolved Hide resolved
19 changes: 19 additions & 0 deletions l10n_nl_partner_salutation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2017 Therp BV <https://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Full salutation for partners, Dutch style',
'version': '11.0.0.0.0',
'author': 'Therp BV, Odoo Community Association (OCA)',
'category': 'Contact management',
'license': 'AGPL-3',
'website': 'https://github.com/oca/l10n-netherlands.git',
'depends': [
'partner_contact_gender',
'l10n_nl_partner_name',
],
'data': [
'data/res_partner_title.xml',
'views/res_partner_title.xml',
'views/res_partner.xml',
],
}
23 changes: 23 additions & 0 deletions l10n_nl_partner_salutation/data/res_partner_title.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo noupdate="1">
<record id="base.res_partner_title_prof" model="res.partner.title">
<field name="name">Prof.</field>
<field name="salutation">Prof.</field>
</record>
<record id="base.res_partner_title_doctor" model="res.partner.title">
<field name="name">Dr.</field>
<field name="salutation">Dr.</field>
</record>
<record id="base.res_partner_title_mister" model="res.partner.title">
<field name="name">Mister</field>
<field name="salutation">Mister</field>
</record>
<record id="base.res_partner_title_miss" model="res.partner.title">
<field name="name">Miss</field>
<field name="salutation">Miss</field>
</record>
<record id="base.res_partner_title_madam" model="res.partner.title">
<field name="name">Madam</field>
<field name="salutation">Madam</field>
</record>
</odoo>
87 changes: 87 additions & 0 deletions l10n_nl_partner_salutation/i18n/l10n_nl_partner_salutation.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_nl_partner_salutation
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_use_manual_salutations
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_users_use_manual_salutations
msgid "Enter salutations manually"
msgstr ""

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_salutation_address_manual
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_users_salutation_address_manual
msgid "Manual salutation (address)"
msgstr ""

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_salutation_manual
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_users_salutation_manual
msgid "Manual salutation (letter)"
msgstr ""

#. module: l10n_nl_partner_salutation
#: model:ir.model,name:l10n_nl_partner_salutation.model_res_partner
msgid "Partner"
msgstr ""

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_title_postnominal
msgid "Postnominal"
msgstr ""

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_title_salutation
msgid "Salutation"
msgstr ""

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_salutation_address
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_users_salutation_address
#: model:ir.ui.view,arch_db:l10n_nl_partner_salutation.view_partner_form
msgid "Salutation (address)"
msgstr ""

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_users_salutation
#: model:ir.ui.view,arch_db:l10n_nl_partner_salutation.view_partner_form
msgid "Salutation (letter)"
msgstr ""

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_title_salutation_female
msgid "Salutation female"
msgstr ""

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_title_salutation_male
msgid "Salutation male"
msgstr ""

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_title_shortcut_female
msgid "Shortcut female"
msgstr ""

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_title_shortcut_male
msgid "Shortcut male"
msgstr ""

#. module: l10n_nl_partner_salutation
#: model:ir.model,name:l10n_nl_partner_salutation.model_res_partner_title
msgid "res.partner.title"
msgstr ""

99 changes: 99 additions & 0 deletions l10n_nl_partner_salutation/i18n/nl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_nl_partner_salutation
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# lfreeke <lfreeke@therp.nl>, 2018
# Thomas Pot <thomas@open2bizz.nl>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-19 09:18+0000\n"
"PO-Revision-Date: 2018-04-19 09:18+0000\n"
"Last-Translator: Thomas Pot <thomas@open2bizz.nl>, 2018\n"
"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_use_manual_salutations
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_users_use_manual_salutations
msgid "Enter salutations manually"
msgstr "Voer begroetingen handmatig in"

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_salutation_address_manual
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_users_salutation_address_manual
msgid "Manual salutation (address)"
msgstr "Handmatige begroeting (adres)"

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_salutation_manual
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_users_salutation_manual
msgid "Manual salutation (letter)"
msgstr "Handmatige begroeting (brief)"

#. module: l10n_nl_partner_salutation
#: model:ir.model,name:l10n_nl_partner_salutation.model_res_partner
msgid "Partner"
msgstr "Relatie"

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_title_postnominal
msgid "Postnominal"
msgstr "Titel"

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_title_salutation
msgid "Salutation"
msgstr "Begroeting"

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_salutation_address
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_users_salutation_address
#: model:ir.ui.view,arch_db:l10n_nl_partner_salutation.view_partner_form
msgid "Salutation (address)"
msgstr "Begroeting (adres)"

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_users_salutation
#: model:ir.ui.view,arch_db:l10n_nl_partner_salutation.view_partner_form
msgid "Salutation (letter)"
msgstr "Begroeting (brief)"

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_title_salutation_female
msgid "Salutation female"
msgstr "Begroeting vrouw"

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_title_salutation_male
msgid "Salutation male"
msgstr "Begroeting man"

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_title_shortcut_female
msgid "Shortcut female"
msgstr "Afkorting vrouw"

#. module: l10n_nl_partner_salutation
#: model:ir.model.fields,field_description:l10n_nl_partner_salutation.field_res_partner_title_shortcut_male
msgid "Shortcut male"
msgstr "Afkorting man"

#. module: l10n_nl_partner_salutation
#: model:res.partner.title,name:l10n_nl_partner_salutation.res_partner_title_sir
#: model:res.partner.title,salutation:l10n_nl_partner_salutation.res_partner_title_sir
msgid "Sir"
msgstr "Heer"

#. module: l10n_nl_partner_salutation
#: model:ir.model,name:l10n_nl_partner_salutation.model_res_partner_title
msgid "res.partner.title"
msgstr "res.partner.title"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2017 Therp BV <https://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


def migrate(cr, version):

cr.execute(
"UPDATE res_partner SET gender = NULL where gender = 'unknown'"
)
3 changes: 3 additions & 0 deletions l10n_nl_partner_salutation/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import res_partner_title
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license line

from . import res_partner
Loading