forked from Yaltik/golem
[FIX][WIP]Avoid merging of member ids by preventing member merge
This commit is contained in:
parent
5c6d11526e
commit
698efaea53
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-06-05 06:43+0000\n"
|
||||
"PO-Revision-Date: 2017-06-05 06:43+0000\n"
|
||||
"POT-Creation-Date: 2017-06-05 07:45+0000\n"
|
||||
"PO-Revision-Date: 2017-06-05 07:45+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -278,7 +278,7 @@ msgstr "Devise"
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_membership_state
|
||||
msgid "Current Membership Status"
|
||||
msgstr "Current Membership Status"
|
||||
msgstr "État actuel de l'adhésion"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_is_current
|
||||
@ -358,7 +358,7 @@ msgid "Fax"
|
||||
msgstr "Fax"
|
||||
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:36
|
||||
#: code:addons/golem_member/models/golem_member.py:39
|
||||
#, python-format
|
||||
msgid "Female"
|
||||
msgstr "Féminin"
|
||||
@ -425,6 +425,12 @@ msgstr "Adhérents"
|
||||
msgid "GOLEM Members Tags"
|
||||
msgstr "Catégories d'adhérents"
|
||||
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:277
|
||||
#, python-format
|
||||
msgid "GOLEM Members merge has not been implemented yet. Please only merge partners, not members, or delete GOLEM Members manually before merging."
|
||||
msgstr "La fusion d'adhérents n'a pas encore été implémentée. Merci de ne fusionner que des contacts non adhérents, ou bien de supprimer les adhérents manuellement en premier lieu."
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_gender
|
||||
msgid "Gender"
|
||||
@ -585,7 +591,7 @@ msgid "Latest Invoices & Payments Matching Date"
|
||||
msgstr "Date de dernière correspondance des factures et paiements"
|
||||
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:36
|
||||
#: code:addons/golem_member/models/golem_member.py:39
|
||||
#, python-format
|
||||
msgid "Male"
|
||||
msgstr "Masculin"
|
||||
@ -651,12 +657,12 @@ msgstr "Montant de l'adhésion"
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_membership_stop
|
||||
msgid "Membership End Date"
|
||||
msgstr "Fin de l'adhésion"
|
||||
msgstr "Date de fin d'adhésion"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_membership_start
|
||||
msgid "Membership Start Date"
|
||||
msgstr "Début de l'adhésion"
|
||||
msgstr "Date de début d'adhésion"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_invoice_warn_msg
|
||||
@ -687,8 +693,8 @@ msgid "Nationality"
|
||||
msgstr "Nationalité"
|
||||
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:235
|
||||
#: code:addons/golem_member/models/golem_member.py:238
|
||||
#: code:addons/golem_member/models/golem_member.py:241
|
||||
#: selection:golem.member.numberconfig,is_automatic:0
|
||||
#: selection:golem.member.numberconfig,is_per_season:0
|
||||
#, python-format
|
||||
@ -986,7 +992,7 @@ msgid "This field holds the image used as avatar for this contact, limited to 10
|
||||
msgstr "Ce champ contient l'image utilisée comme photo d'identité pour ce contact, limitée à 1024x1024px."
|
||||
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:66
|
||||
#: code:addons/golem_member/models/golem_member.py:69
|
||||
#: sql_constraint:golem.member:0
|
||||
#, python-format
|
||||
msgid "This member number has already been used."
|
||||
@ -1078,8 +1084,8 @@ msgid "Website of Partner or Company"
|
||||
msgstr "Site Web pour les Partenaires ou les Sociétés"
|
||||
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:235
|
||||
#: code:addons/golem_member/models/golem_member.py:238
|
||||
#: code:addons/golem_member/models/golem_member.py:241
|
||||
#: selection:golem.member.numberconfig,is_automatic:0
|
||||
#: selection:golem.member.numberconfig,is_per_season:0
|
||||
#, python-format
|
||||
@ -1096,6 +1102,11 @@ msgstr "Code postal"
|
||||
msgid "Zip"
|
||||
msgstr "Code postal"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model,name:golem_member.model_base_partner_merge_automatic_wizard
|
||||
msgid "base.partner.merge.automatic.wizard"
|
||||
msgstr "base.partner.merge.automatic.wizard"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.ui.view,arch_db:golem_member.golem_member_form
|
||||
msgid "e.g. www.odoo.com"
|
||||
|
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-06-05 06:43+0000\n"
|
||||
"PO-Revision-Date: 2017-06-05 06:43+0000\n"
|
||||
"POT-Creation-Date: 2017-06-05 07:44+0000\n"
|
||||
"PO-Revision-Date: 2017-06-05 07:44+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -357,7 +357,7 @@ msgid "Fax"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:36
|
||||
#: code:addons/golem_member/models/golem_member.py:39
|
||||
#, python-format
|
||||
msgid "Female"
|
||||
msgstr ""
|
||||
@ -424,6 +424,12 @@ msgstr ""
|
||||
msgid "GOLEM Members Tags"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:277
|
||||
#, python-format
|
||||
msgid "GOLEM Members merge has not been implemented yet. Please only merge partners, not members, or delete GOLEM Members manually before merging."
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_gender
|
||||
msgid "Gender"
|
||||
@ -578,7 +584,7 @@ msgid "Latest Invoices & Payments Matching Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:36
|
||||
#: code:addons/golem_member/models/golem_member.py:39
|
||||
#, python-format
|
||||
msgid "Male"
|
||||
msgstr ""
|
||||
@ -680,8 +686,8 @@ msgid "Nationality"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:235
|
||||
#: code:addons/golem_member/models/golem_member.py:238
|
||||
#: code:addons/golem_member/models/golem_member.py:241
|
||||
#: selection:golem.member.numberconfig,is_automatic:0
|
||||
#: selection:golem.member.numberconfig,is_per_season:0
|
||||
#, python-format
|
||||
@ -977,7 +983,7 @@ msgid "This field holds the image used as avatar for this contact, limited to 10
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:66
|
||||
#: code:addons/golem_member/models/golem_member.py:69
|
||||
#: sql_constraint:golem.member:0
|
||||
#, python-format
|
||||
msgid "This member number has already been used."
|
||||
@ -1069,8 +1075,8 @@ msgid "Website of Partner or Company"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: code:addons/golem_member/models/golem_member.py:235
|
||||
#: code:addons/golem_member/models/golem_member.py:238
|
||||
#: code:addons/golem_member/models/golem_member.py:241
|
||||
#: selection:golem.member.numberconfig,is_automatic:0
|
||||
#: selection:golem.member.numberconfig,is_per_season:0
|
||||
#, python-format
|
||||
@ -1087,6 +1093,11 @@ msgstr ""
|
||||
msgid "Zip"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model,name:golem_member.model_base_partner_merge_automatic_wizard
|
||||
msgid "base.partner.merge.automatic.wizard"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.ui.view,arch_db:golem_member.golem_member_form
|
||||
msgid "e.g. www.odoo.com"
|
||||
|
@ -17,7 +17,10 @@
|
||||
|
||||
""" GOLEM Members """
|
||||
|
||||
import logging
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import UserError
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
@ -259,3 +262,20 @@ class GolemNumberConfig(models.TransientModel):
|
||||
self.env['golem.member.number'].search([]).unlink()
|
||||
self.env['golem.season'].search([]).write({'member_counter': 0})
|
||||
self.env['golem.member'].search([]).generate_number()
|
||||
|
||||
class MergePartnerAutomatic(models.TransientModel):
|
||||
""" Merge Partner Automatic adaptations """
|
||||
_inherit = 'base.partner.merge.automatic.wizard'
|
||||
|
||||
@api.multi
|
||||
def action_merge(self):
|
||||
""" Merge adaptations : warn if there is a member """
|
||||
_LOGGER.warning(self.partner_ids)
|
||||
for partner in self.partner_ids:
|
||||
_LOGGER.warning(partner.member_id)
|
||||
if partner.member_id:
|
||||
emsg = _('GOLEM Members merge has not been implemented yet. '
|
||||
'Please only merge partners, not members, or delete '
|
||||
'GOLEM Members manually before merging.')
|
||||
raise UserError(emsg)
|
||||
return super(MergePartnerAutomatic, self).action_merge()
|
||||
|
Loading…
x
Reference in New Issue
Block a user