Merge branch 'master' into family_mono
This commit is contained in:
commit
0bdf720b02
@ -18,7 +18,7 @@
|
||||
{
|
||||
'name': 'GOLEM Activity Member Registrations',
|
||||
'summary': 'GOLEM Activities Member Registrations management',
|
||||
'version': '10.0.1.4.5',
|
||||
'version': '10.0.1.5.1',
|
||||
'category': 'GOLEM',
|
||||
'author': 'Fabien Bourgeois, Michel Dessenne',
|
||||
'license': 'AGPL-3',
|
||||
|
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-08-09 14:23+0000\n"
|
||||
"PO-Revision-Date: 2018-08-09 16:38+0200\n"
|
||||
"POT-Creation-Date: 2018-09-26 08:25+0000\n"
|
||||
"PO-Revision-Date: 2018-09-26 10:28+0200\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -204,6 +204,13 @@ msgstr "Le nombre de places ne peut pas être négatif"
|
||||
msgid "On default season, there is no activity for this member."
|
||||
msgstr "Sur la saison par défaut, il n'y a pas d'activité pour cet usager."
|
||||
|
||||
#. module: golem_activity_registration
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_only_for_subscriber
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_only_for_subscriber
|
||||
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_search_inherit_registration
|
||||
msgid "Only for subscriber"
|
||||
msgstr "Réservé aux adhérents"
|
||||
|
||||
#. module: golem_activity_registration
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_places
|
||||
msgid "Places"
|
||||
@ -245,7 +252,7 @@ msgid "Service user"
|
||||
msgstr "Usager"
|
||||
|
||||
#. module: golem_activity_registration
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:70
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:71
|
||||
#, python-format
|
||||
msgid "Sorry, there is no more place !"
|
||||
msgstr "Désolé, il n'y a plus de place disponible !"
|
||||
@ -256,13 +263,19 @@ msgid "Subscription"
|
||||
msgstr "Inscription"
|
||||
|
||||
#. module: golem_activity_registration
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:100
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:130
|
||||
#, python-format
|
||||
msgid "Subscription can not be executed : the targeted activity is only for subscriber."
|
||||
msgstr "L'inscription n'a pas pu être faite : l'activité choisie est réservée aux adhérents."
|
||||
|
||||
#. module: golem_activity_registration
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:134
|
||||
#, python-format
|
||||
msgid "Subscription can not be executed : the targeted member is not on the same season as the activity."
|
||||
msgstr "L'inscription n'a pas pu être enregistrée : l'usager visé n'est pas ahdérant pour la même saison que celle pendant laquelle se déroule l'activité."
|
||||
|
||||
#. module: golem_activity_registration
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:92
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:104
|
||||
#: sql_constraint:golem.activity.registration:0
|
||||
#, python-format
|
||||
msgid "This member has already been registered for this activity."
|
||||
|
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-08-09 14:23+0000\n"
|
||||
"PO-Revision-Date: 2018-08-09 14:23+0000\n"
|
||||
"POT-Creation-Date: 2018-09-26 08:25+0000\n"
|
||||
"PO-Revision-Date: 2018-09-26 08:25+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -204,6 +204,13 @@ msgstr ""
|
||||
msgid "On default season, there is no activity for this member."
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_only_for_subscriber
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_registration_only_for_subscriber
|
||||
#: model:ir.ui.view,arch_db:golem_activity_registration.golem_activity_search_inherit_registration
|
||||
msgid "Only for subscriber"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration.field_golem_activity_places
|
||||
msgid "Places"
|
||||
@ -245,7 +252,7 @@ msgid "Service user"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:70
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:71
|
||||
#, python-format
|
||||
msgid "Sorry, there is no more place !"
|
||||
msgstr ""
|
||||
@ -256,13 +263,19 @@ msgid "Subscription"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:100
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:130
|
||||
#, python-format
|
||||
msgid "Subscription can not be executed : the targeted activity is only for subscriber."
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:134
|
||||
#, python-format
|
||||
msgid "Subscription can not be executed : the targeted member is not on the same season as the activity."
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:92
|
||||
#: code:addons/golem_activity_registration/models/golem_activity_registration.py:104
|
||||
#: sql_constraint:golem.activity.registration:0
|
||||
#, python-format
|
||||
msgid "This member has already been registered for this activity."
|
||||
|
@ -43,6 +43,7 @@ class GolemActivity(models.Model):
|
||||
index=True)
|
||||
places_used = fields.Integer('Places used', compute='compute_places_used',
|
||||
store=True)
|
||||
only_for_subscriber = fields.Boolean(default=False)
|
||||
|
||||
@api.multi
|
||||
@api.depends('activity_registration_ids')
|
||||
@ -91,11 +92,33 @@ class GolemActivityRegistration(models.Model):
|
||||
('registration_uniq', 'UNIQUE (member_id, activity_id)',
|
||||
_('This member has already been registered for this activity.'))]
|
||||
|
||||
@api.onchange('activity_id', 'activity_id.only_for_subscriber')
|
||||
def onchange_activity_subcrib(self):
|
||||
""" If activity only for subscribers : do not allow non subscribers """
|
||||
domain = []
|
||||
if self.activity_id.only_for_subscriber:
|
||||
domain.append(('membership_state', 'not in', ('none', 'canceled', 'old')))
|
||||
return {'domain': {'member_id': domain}}
|
||||
|
||||
@api.onchange('member_id')
|
||||
def onchange_member_subcrib(self):
|
||||
""" If not subscriber : do not show subscribers only activities """
|
||||
domain = []
|
||||
if self.member_id and self.member_id.membership_state in ('none', 'canceled', 'old'):
|
||||
domain.append(('only_for_subscriber', '=', False))
|
||||
return {'domain': {'activity_id': domain}}
|
||||
|
||||
|
||||
@api.constrains('member_id', 'activity_id')
|
||||
def _check_season_reliability(self):
|
||||
""" Forbid registration when member season if not coherent with
|
||||
activity season or are duplicates """
|
||||
for reg in self:
|
||||
if (reg.activity_id.only_for_subscriber and \
|
||||
reg.member_id.membership_state in ['none', 'canceled', 'old']):
|
||||
emsg = _('Subscription can not be executed : the targeted '
|
||||
'activity is only for subscriber.')
|
||||
raise models.ValidationError(emsg)
|
||||
if reg.activity_id.season_id not in reg.member_id.season_ids:
|
||||
emsg = _('Subscription can not be executed : the targeted '
|
||||
'member is not on the same season as the activity.')
|
||||
|
@ -38,6 +38,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
</group>
|
||||
</page>
|
||||
</page>
|
||||
<field name="audience_id" position="before">
|
||||
<field name="only_for_subscriber"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@ -66,6 +69,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<filter name="season_default" position="after">
|
||||
<filter name="full_activity" string="Full"
|
||||
domain="[('places_remain', '=', 0)]" />
|
||||
<filter name="only_for_subscriber" string="Only for subscriber"
|
||||
domain="[('only_for_subscriber', '=', True)]"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
@ -19,7 +20,7 @@
|
||||
'name': 'GOLEM Activity Member Registration Payments',
|
||||
'summary': 'GOLEM Activities Member Registration Payments',
|
||||
'description': 'GOLEM Activities Member Registration Payments',
|
||||
'version': '10.0.0.3.6',
|
||||
'version': '10.0.0.4.1',
|
||||
'category': 'GOLEM',
|
||||
'author': 'Fabien Bourgeois',
|
||||
'license': 'AGPL-3',
|
||||
@ -29,5 +30,6 @@
|
||||
'data': ['views/golem_member_views.xml',
|
||||
'views/golem_activity_registration_views.xml',
|
||||
'report/golem_member_card_templates.xml',
|
||||
'wizard/golem_activity_registration_invoicing.xml']
|
||||
'wizard/golem_activity_registration_invoicing.xml',
|
||||
'views/golem_activity_views.xml']
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-08-27 10:09+0000\n"
|
||||
"PO-Revision-Date: 2018-08-27 12:10+0200\n"
|
||||
"POT-Creation-Date: 2018-09-26 09:44+0000\n"
|
||||
"PO-Revision-Date: 2018-09-26 11:58+0200\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -49,7 +49,7 @@ msgid "Activity id"
|
||||
msgstr "Activité liée"
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: code:addons/golem_activity_registration_payment/models/golem_member.py:76
|
||||
#: code:addons/golem_activity_registration_payment/models/golem_member.py:78
|
||||
#, python-format
|
||||
msgid "All confirmed registrations had already been invoiced."
|
||||
msgstr "Toutes les inscriptions confirmées ont déjà été facturées."
|
||||
@ -124,6 +124,18 @@ msgstr "Afficher les paiements"
|
||||
msgid "Draft Invoice"
|
||||
msgstr "Facture en brouillon"
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_free_activity
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_free_activity
|
||||
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_search_inherit_activity_registration_payment
|
||||
msgid "Free activity"
|
||||
msgstr "Gratuit"
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: model:ir.model,name:golem_activity_registration_payment.model_golem_activity
|
||||
msgid "GOLEM Activity"
|
||||
msgstr "Activité"
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: model:ir.model,name:golem_activity_registration_payment.model_golem_activity_registration
|
||||
msgid "GOLEM Activity Registration"
|
||||
@ -145,14 +157,14 @@ msgid "GOLEM Member"
|
||||
msgstr "Adhérent"
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:151
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:153
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoicing_invoice_id
|
||||
#, python-format
|
||||
msgid "Generated invoice"
|
||||
msgstr "Facture générée"
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:166
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:168
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoicing_payment_ids
|
||||
#, python-format
|
||||
msgid "Generated payments"
|
||||
@ -311,7 +323,7 @@ msgid "Registration id"
|
||||
msgstr "Inscription"
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: code:addons/golem_activity_registration_payment/models/golem_member.py:69
|
||||
#: code:addons/golem_activity_registration_payment/models/golem_member.py:71
|
||||
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
|
||||
#, python-format
|
||||
msgid "Registration invoicing"
|
||||
@ -339,13 +351,13 @@ msgid "Status"
|
||||
msgstr "État"
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:147
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:149
|
||||
#, python-format
|
||||
msgid "There is no generated invoice."
|
||||
msgstr "Il n'y a pas de facture générée."
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:162
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:164
|
||||
#, python-format
|
||||
msgid "There is no generated payments."
|
||||
msgstr "Il n'y a pas de paiement généré."
|
||||
|
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-08-27 10:09+0000\n"
|
||||
"PO-Revision-Date: 2018-08-27 10:09+0000\n"
|
||||
"POT-Creation-Date: 2018-09-26 09:44+0000\n"
|
||||
"PO-Revision-Date: 2018-09-26 09:44+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -45,7 +45,7 @@ msgid "Activity id"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: code:addons/golem_activity_registration_payment/models/golem_member.py:76
|
||||
#: code:addons/golem_activity_registration_payment/models/golem_member.py:78
|
||||
#, python-format
|
||||
msgid "All confirmed registrations had already been invoiced."
|
||||
msgstr ""
|
||||
@ -120,6 +120,18 @@ msgstr ""
|
||||
msgid "Draft Invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_free_activity
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_free_activity
|
||||
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_search_inherit_activity_registration_payment
|
||||
msgid "Free activity"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: model:ir.model,name:golem_activity_registration_payment.model_golem_activity
|
||||
msgid "GOLEM Activity"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: model:ir.model,name:golem_activity_registration_payment.model_golem_activity_registration
|
||||
msgid "GOLEM Activity Registration"
|
||||
@ -141,14 +153,14 @@ msgid "GOLEM Member"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:151
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:153
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoicing_invoice_id
|
||||
#, python-format
|
||||
msgid "Generated invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:166
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:168
|
||||
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoicing_payment_ids
|
||||
#, python-format
|
||||
msgid "Generated payments"
|
||||
@ -307,7 +319,7 @@ msgid "Registration id"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: code:addons/golem_activity_registration_payment/models/golem_member.py:69
|
||||
#: code:addons/golem_activity_registration_payment/models/golem_member.py:71
|
||||
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
|
||||
#, python-format
|
||||
msgid "Registration invoicing"
|
||||
@ -335,13 +347,13 @@ msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:147
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:149
|
||||
#, python-format
|
||||
msgid "There is no generated invoice."
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_activity_registration_payment
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:162
|
||||
#: code:addons/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py:164
|
||||
#, python-format
|
||||
msgid "There is no generated payments."
|
||||
msgstr ""
|
||||
|
@ -15,4 +15,4 @@
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from . import golem_member, golem_activity_registration
|
||||
from . import golem_member, golem_activity_registration, golem_activity
|
||||
|
34
golem_activity_registration_payment/models/golem_activity.py
Normal file
34
golem_activity_registration_payment/models/golem_activity.py
Normal file
@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
""" GOLEM Activity adaptations """
|
||||
|
||||
from odoo import models, fields, api
|
||||
|
||||
class GolemActivity(models.Model):
|
||||
""" GOLEM Activity adaptations """
|
||||
_inherit = 'golem.activity'
|
||||
|
||||
free_activity = fields.Boolean(default=False)
|
||||
|
||||
@api.onchange('free_activity')
|
||||
def onchange_free_activity(self):
|
||||
""" If free activity, price should be 0.0 """
|
||||
for activity in self:
|
||||
if activity.free_activity:
|
||||
activity.list_price = 0.0
|
@ -31,3 +31,4 @@ class GolemActivityRegistration(models.Model):
|
||||
invoice_id = fields.Many2one(related='invoice_line_id.invoice_id')
|
||||
invoice_state = fields.Selection(related='invoice_line_id.invoice_id.state',
|
||||
store=True)
|
||||
free_activity = fields.Boolean(related='activity_id.free_activity')
|
||||
|
@ -35,6 +35,7 @@ class GolemMember(models.Model):
|
||||
regis = member.activity_registration_ids
|
||||
regis = regis.filtered(
|
||||
lambda r: (r.state == 'confirmed' and
|
||||
not r.activity_id.free_activity and
|
||||
(not r.invoice_line_id or
|
||||
r.invoice_line_id.invoice_id.state == 'cancel'))
|
||||
)
|
||||
@ -52,9 +53,10 @@ class GolemMember(models.Model):
|
||||
self.ensure_one()
|
||||
member = self[0]
|
||||
registrations = member.activity_registration_ids.filtered(
|
||||
lambda r: r.state == 'confirmed' and
|
||||
lambda r: (r.state == 'confirmed' and
|
||||
not r.activity_id.free_activity and
|
||||
(not r.invoice_line_id or
|
||||
r.invoice_line_id.invoice_id.state == 'cancel')
|
||||
r.invoice_line_id.invoice_id.state == 'cancel'))
|
||||
)
|
||||
if registrations:
|
||||
invoicing = self.env['golem.activity.registration.invoicing'].create({
|
||||
|
@ -45,6 +45,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="inherit_id"
|
||||
ref="golem_activity_registration_state.golem_activity_registration_tree_inherit_state" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="activity_price" position="before">
|
||||
<field name="free_activity" readonly="1" />
|
||||
</field>
|
||||
<field name="activity_price" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('free_activity', '=', True)]}</attribute>
|
||||
</field>
|
||||
<field name="state" position="after">
|
||||
<field name="invoice_line_id" invisible="1" />
|
||||
<field name="invoice_state" string="Invoice state" />
|
||||
|
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- Forms -->
|
||||
<record id="golem_activity_form_inherit_activity_registration_payment"
|
||||
model="ir.ui.view">
|
||||
<field name="name">Golem activity form adaptations</field>
|
||||
<field name="model">golem.activity</field>
|
||||
<field name="inherit_id" ref="golem_activity.golem_activity_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="list_price" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('free_activity', '=', True)]}</attribute>
|
||||
</field>
|
||||
<field name="list_price" position="before">
|
||||
<field name='free_activity' />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search -->
|
||||
<record id="golem_activity_search_inherit_activity_registration_payment"
|
||||
model="ir.ui.view">
|
||||
<field name="name">Golem Activity Search adaptations</field>
|
||||
<field name="model">golem.activity</field>
|
||||
<field name="inherit_id" ref="golem_activity.golem_activity_search" />
|
||||
<field name="arch" type="xml">
|
||||
<filter name="season_default" position="after">
|
||||
<filter name="free_activity" string="Free activity"
|
||||
domain="[('free_activity', '=', True)]" />
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
@ -29,9 +29,11 @@ class GolemActivityRegistrationInvoicingLine(models.TransientModel):
|
||||
_description = 'GOLEM Activity Registration Invoicing Lines'
|
||||
|
||||
invoicing_id = fields.Many2one('golem.activity.registration.invoicing',
|
||||
required=True)
|
||||
registration_id = fields.Many2one('golem.activity.registration', required=True)
|
||||
activity_id = fields.Many2one('golem.activity', required=True, readonly=True)
|
||||
required=True, ondelete='cascade')
|
||||
registration_id = fields.Many2one('golem.activity.registration', required=True,
|
||||
ondelete='cascade')
|
||||
activity_id = fields.Many2one('golem.activity', required=True, readonly=True,
|
||||
ondelete='cascade')
|
||||
price = fields.Monetary()
|
||||
currency_id = fields.Many2one(related='activity_id.currency_id')
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
'name': 'GOLEM Activity Session Member Registrations States',
|
||||
'summary': 'GOLEM Activities Session Member Registration states',
|
||||
'description': 'GOLEM Activities Session Member Registration states',
|
||||
'version': '10.0.2.2.0',
|
||||
'version': '10.0.2.2.1',
|
||||
'category': 'GOLEM',
|
||||
'author': 'Fabien Bourgeois',
|
||||
'license': 'AGPL-3',
|
||||
|
@ -18,7 +18,7 @@
|
||||
""" GOLEM Activity Registration State """
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
class GolemMember(models.Model):
|
||||
""" GOLEM Member adaptations """
|
||||
@ -89,9 +89,10 @@ class GolemActivityRegistration(models.Model):
|
||||
def state_remove(self):
|
||||
""" Remove registrations, only if canceled """
|
||||
if self.filtered(lambda r: r.state != 'canceled'):
|
||||
uerr = _('You can not confirm a canceled registration.')
|
||||
uerr = _('You can not remove a uncanceled registration.')
|
||||
raise UserError(uerr)
|
||||
self.unlink()
|
||||
return {'type': 'ir.actions.client', 'tag': 'reload'}
|
||||
|
||||
@api.multi
|
||||
def write(self, values):
|
||||
|
@ -45,20 +45,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<attribute name="delete">0</attribute>
|
||||
</tree>
|
||||
<tree position="inside">
|
||||
<field name="id" invisible="1" />
|
||||
<field name="state" readonly="1" />
|
||||
<button type="object" name="state_draft" string="Reset to draft"
|
||||
icon="fa-arrow-up" attrs="{'invisible': [('state', '=', 'draft')]}"
|
||||
icon="fa-arrow-up" attrs="{'invisible': ['|', ('id', '=', False), ('state', '=', 'draft')]}"
|
||||
invisible="not context.get('action_show', 1)" />
|
||||
<button type="object" name="state_confirm" string="Confirm"
|
||||
icon="fa-check" attrs="{'invisible': [('state', '!=', 'draft')]}"
|
||||
icon="fa-check" attrs="{'invisible': ['|', ('id', '=', False), ('state', '!=', 'draft')]}"
|
||||
invisible="not context.get('action_show', 1)" />
|
||||
<button type="object" name="state_cancel" string="Cancel"
|
||||
icon="fa-ban" attrs="{'invisible': [('state', '=', 'canceled')]}"
|
||||
icon="fa-ban" attrs="{'invisible': ['|', ('id', '=', False), ('state', '=', 'canceled')]}"
|
||||
invisible="not context.get('action_show', 1)" />
|
||||
<button type="object" name="state_remove" string="Remove"
|
||||
icon="fa-trash"
|
||||
confirm="Are you sure you want to remove this subscription ?"
|
||||
attrs="{'invisible': [('state', '!=', 'canceled')]}"
|
||||
attrs="{'invisible': ['|', ('id', '=', False), ('state', '!=', 'canceled')]}"
|
||||
invisible="not context.get('action_show', 1)" />
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -14,3 +14,5 @@
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from . import models
|
||||
|
@ -22,7 +22,7 @@
|
||||
- New application on top menu ;
|
||||
- Management of users and groups, companies ;
|
||||
- Good default access / rights to do. ''',
|
||||
'version': '10.0.0.1.0',
|
||||
'version': '10.0.0.1.3',
|
||||
'category': 'GOLEM',
|
||||
'author': 'Fabien Bourgeois',
|
||||
'license': 'AGPL-3',
|
||||
|
18
golem_admin/models/__init__.py
Normal file
18
golem_admin/models/__init__.py
Normal file
@ -0,0 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from . import res_partner
|
39
golem_admin/models/res_partner.py
Normal file
39
golem_admin/models/res_partner.py
Normal file
@ -0,0 +1,39 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
""" Partner adaptations """
|
||||
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class Partner(models.Model):
|
||||
""" Partner adaptations """
|
||||
_inherit = 'res.partner'
|
||||
|
||||
signup_token = fields.Char(groups="golem_base.group_golem_manager")
|
||||
signup_type = fields.Char(groups="golem_base.group_golem_manager")
|
||||
signup_expiration = fields.Datetime(groups="golem_base.group_golem_manager")
|
||||
|
||||
@api.multi
|
||||
def write(self, vals):
|
||||
""" Overwrite native function to workaround admin only write on fields
|
||||
signup*, as it's impossible to overwrite groups attribute """
|
||||
if (('signup_token' in vals or 'signup_type' in vals or
|
||||
'signup_expiration' in vals)
|
||||
and self.env.user.has_group('golem_base.group_golem_manager')):
|
||||
return super(Partner, self.sudo()).write(vals)
|
||||
return super(Partner, self).write(vals)
|
19
golem_pcs/__init__.py
Normal file
19
golem_pcs/__init__.py
Normal file
@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from . import models
|
33
golem_pcs/__manifest__.py
Normal file
33
golem_pcs/__manifest__.py
Normal file
@ -0,0 +1,33 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
{
|
||||
'name': 'GOLEM Professions and Socioprofessional Categories',
|
||||
'summary': 'GOLEM Professions and Socioprofessional Categories',
|
||||
'version': '10.0.0.2.0',
|
||||
'category': 'GOLEM',
|
||||
'author': 'Fabien Bourgeois, Youssef El ouahby',
|
||||
'license': 'AGPL-3',
|
||||
'application': False,
|
||||
'installable': True,
|
||||
'depends': ['golem_member'],
|
||||
'data': ['security/ir.model.access.csv',
|
||||
'data/golem_pcs_data.xml',
|
||||
'views/golem_member_views.xml',
|
||||
'views/res_partner_views.xml']
|
||||
}
|
277
golem_pcs/data/golem_pcs_data.xml
Normal file
277
golem_pcs/data/golem_pcs_data.xml
Normal file
@ -0,0 +1,277 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<!-- Groupes socioprofessionnels -->
|
||||
<record model="golem.pcs" id="golem_pcs_agriculteurs_exploitants">
|
||||
<field name="name">Agriculteurs exploitants</field>
|
||||
<field name="code">01</field>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_artisans_commercants_et_chefs_entreprise">
|
||||
<field name="name">Artisans, commerçants et chefs d’entreprise</field>
|
||||
<field name="code">02</field>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_cadres_et_professions_intellectuelles_superieures">
|
||||
<field name="name">Cadres et professions intellectuelles supérieures</field>
|
||||
<field name="code">03</field>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_professions_intermediaires">
|
||||
<field name="name">Professions intermédiaires</field>
|
||||
<field name="code">04</field>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_employes">
|
||||
<field name="name">Employés</field>
|
||||
<field name="code">05</field>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_ouvriers">
|
||||
<field name="name">Ouvriers</field>
|
||||
<field name="code">06</field>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_retraites">
|
||||
<field name="name">Retraités</field>
|
||||
<field name="code">07</field>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_autres_personnes_sans_activite_professionnelle">
|
||||
<field name="name">Autres personnes sans activité professionnelle</field>
|
||||
<field name="code">08</field>
|
||||
</record>
|
||||
|
||||
<!-- Catégories socioprofessionnelles -->
|
||||
<record model="golem.pcs" id="golem_pcs_agriculteurs_sur_petite_exploitation">
|
||||
<field name="name">Agriculteurs sur petite exploitation</field>
|
||||
<field name="code">11</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_agriculteurs_exploitants')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_agriculteurs_sur_moyenne_exploitation">
|
||||
<field name="name">Agriculteurs sur moyenne exploitation</field>
|
||||
<field name="code">12</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_agriculteurs_exploitants')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_agriculteurs_sur_grande_exploitation">
|
||||
<field name="name">Agriculteurs sur grande exploitation</field>
|
||||
<field name="code">13</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_agriculteurs_exploitants')"/>
|
||||
</record>
|
||||
|
||||
<record model="golem.pcs" id="golem_pcs_artisan">
|
||||
<field name="name">Artisan</field>
|
||||
<field name="code">21</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_artisans_commercants_et_chefs_entreprise')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_commercant_et_assimiles">
|
||||
<field name="name">Commerçant et assimilés</field>
|
||||
<field name="code">22</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_artisans_commercants_et_chefs_entreprise')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_Chefs_entreprise_de_10_salaries_ou_plus">
|
||||
<field name="name">Chefs d’entreprise de 10 salariés ou plus</field>
|
||||
<field name="code">23</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_artisans_commercants_et_chefs_entreprise')"/>
|
||||
</record>
|
||||
|
||||
<record model="golem.pcs" id="golem_pcs_professions_liberales">
|
||||
<field name="name">Professions libérales</field>
|
||||
<field name="code">31</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_cadres_et_professions_intellectuelles_superieures')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_cadres_de_la_fonction_publique">
|
||||
<field name="name">Cadres de la fonction publique </field>
|
||||
<field name="code">33</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_cadres_et_professions_intellectuelles_superieures')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_professeurs_professions_scientifiques">
|
||||
<field name="name">Professeurs, professions scientifiques </field>
|
||||
<field name="code">34</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_cadres_et_professions_intellectuelles_superieures')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_professions_de_l_information_des_arts_et_des_spectacles">
|
||||
<field name="name">Professions de l’information, des arts et des spectacles</field>
|
||||
<field name="code">35</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_cadres_et_professions_intellectuelles_superieures')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_cadres_administratifs_et_commerciaux_d_entreprise">
|
||||
<field name="name">Cadres administratifs et commerciaux d’entreprise</field>
|
||||
<field name="code">37</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_cadres_et_professions_intellectuelles_superieures')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_ingenieurs_et_cadres_techniques_d_entreprise">
|
||||
<field name="name">Ingénieurs et cadres techniques d’entreprise</field>
|
||||
<field name="code">38</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_cadres_et_professions_intellectuelles_superieures')"/>
|
||||
</record>
|
||||
|
||||
<record model="golem.pcs" id="golem_pcs_professeurs_des_ecoles_instituteurs_et_assimiles">
|
||||
<field name="name">Professeurs des écoles, instituteurs et assimilés</field>
|
||||
<field name="code">42</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_professions_intermediaires')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_professions_intermediaires_de_la_sante_et_du_travail_social">
|
||||
<field name="name">Professions intermédiaires de la santé et du travail social </field>
|
||||
<field name="code">43</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_professions_intermediaires')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_clerge_religieux">
|
||||
<field name="name">Clergé, religieux</field>
|
||||
<field name="code">44</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_professions_intermediaires')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_professions_intermediaires_administratives_de_la_fonction_publique">
|
||||
<field name="name">Professions intermédiaires administratives de la fonction publique</field>
|
||||
<field name="code">45</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_professions_intermediaires')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_professions_intermediaires_administratives_et_commerciales_des_entreprises">
|
||||
<field name="name">Professions intermédiaires administratives et commerciales des entreprises</field>
|
||||
<field name="code">46</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_professions_intermediaires')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_techniciens">
|
||||
<field name="name">Techniciens</field>
|
||||
<field name="code">47</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_professions_intermediaires')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_contremaitres_agents_de_maitrise">
|
||||
<field name="name">Contremaîtres, agents de maîtrise</field>
|
||||
<field name="code">48</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_professions_intermediaires')"/>
|
||||
</record>
|
||||
|
||||
<record model="golem.pcs" id="golem_pcs_employes_civils_et_agents_de_service_de_la_fonction_publique">
|
||||
<field name="name">Employés civils et agents de service de la fonction publique</field>
|
||||
<field name="code">52</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_employes')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_policiers_et_militaires">
|
||||
<field name="name">Policiers et militaires</field>
|
||||
<field name="code">53</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_employes')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_employes_administratifs_d_entreprise">
|
||||
<field name="name">Employés administratifs d’entreprise</field>
|
||||
<field name="code">54</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_employes')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_employes_de_commerce">
|
||||
<field name="name">Employés de commerce</field>
|
||||
<field name="code">55</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_employes')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_personnels_des_services_directs_aux_particuliers">
|
||||
<field name="name">Personnels des services directs aux particuliers </field>
|
||||
<field name="code">56</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_employes')"/>
|
||||
</record>
|
||||
|
||||
<record model="golem.pcs" id="golem_pcs_ouvriers_qualifies_de_type_industriel">
|
||||
<field name="name">Ouvriers qualifiés de type industriel</field>
|
||||
<field name="code">62</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_ouvriers')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_ouvriers_qualifies_de_type_artisanal">
|
||||
<field name="name">Ouvriers qualifiés de type artisanal</field>
|
||||
<field name="code">63</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_ouvriers')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_chauffeurs">
|
||||
<field name="name">Chauffeurs</field>
|
||||
<field name="code">64</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_ouvriers')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_ouvriers_qualifies_de_la_manutention_du_magasinage_et_du_transport ">
|
||||
<field name="name">Ouvriers qualifiés de la manutention, du magasinage et du transport </field>
|
||||
<field name="code">65</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_ouvriers')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_ouvriers_non_qualifies_de_type_industriel">
|
||||
<field name="name">Ouvriers non qualifiés de type industriel</field>
|
||||
<field name="code">67</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_ouvriers')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_ouvriers_non_qualifies_de_type_artisanal">
|
||||
<field name="name">Ouvriers non qualifiés de type artisanal</field>
|
||||
<field name="code">68</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_ouvriers')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_ouvriers_agricoles">
|
||||
<field name="name">Ouvriers agricoles</field>
|
||||
<field name="code">69</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_ouvriers')"/>
|
||||
</record>
|
||||
|
||||
<record model="golem.pcs" id="golem_pcs_anciens_agriculteurs_exploitants">
|
||||
<field name="name">Anciens agriculteurs exploitants</field>
|
||||
<field name="code">71</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_retraites')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_anciens_artisans_commercants_et_chefs_d_entreprise">
|
||||
<field name="name">Anciens artisans, commerçants et chefs d’entreprise</field>
|
||||
<field name="code">72</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_retraites')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_anciens_cadres">
|
||||
<field name="name">Anciens cadres</field>
|
||||
<field name="code">74</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_retraites')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_anciennes_professions_intermediaires">
|
||||
<field name="name">Anciennes professions intermédiaires</field>
|
||||
<field name="code">75</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_retraites')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_anciens_employes">
|
||||
<field name="name">Anciens employés</field>
|
||||
<field name="code">77</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_retraites')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_anciens_ouvriers">
|
||||
<field name="name">Anciens ouvriers</field>
|
||||
<field name="code">78</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_retraites')"/>
|
||||
</record>
|
||||
|
||||
<record model="golem.pcs" id="golem_pcs_chomeurs_n_ayant_jamais_travaille">
|
||||
<field name="name">Chômeurs n’ayant jamais travaillé</field>
|
||||
<field name="code">81</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_autres_personnes_sans_activite_professionnelle')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_militaires_du_contingent">
|
||||
<field name="name">Militaires du contingent </field>
|
||||
<field name="code">83</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_autres_personnes_sans_activite_professionnelle')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_eleves_etudiants">
|
||||
<field name="name">Élèves, étudiants</field>
|
||||
<field name="code">84</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_autres_personnes_sans_activite_professionnelle')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_personnes_diverses_sans_activite_professionnelle_de_moins_de_60_ans_sauf_retraites">
|
||||
<field name="name">Personnes diverses sans activité professionnelle de moins de 60 ans (sauf retraités)</field>
|
||||
<field name="code">85</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_autres_personnes_sans_activite_professionnelle')"/>
|
||||
</record>
|
||||
<record model="golem.pcs" id="golem_pcs_personnes_diverses_sans_activite_professionnelle_de_60_ans_et_plus_sauf_retraites">
|
||||
<field name="name">Personnes diverses sans activité professionnelle de 60 ans et plus (sauf retraités) </field>
|
||||
<field name="code">86</field>
|
||||
<field name="parent_id" eval="ref('golem_pcs.golem_pcs_autres_personnes_sans_activite_professionnelle')"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
106
golem_pcs/i18n/fr.po
Normal file
106
golem_pcs/i18n/fr.po
Normal file
@ -0,0 +1,106 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * golem_pcs
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-09-24 14:16+0000\n"
|
||||
"PO-Revision-Date: 2018-09-24 16:17+0200\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: golem_pcs
|
||||
#: model:ir.ui.view,arch_db:golem_pcs.golem_member_search_inherit_golem_pcs
|
||||
msgid "By PCS"
|
||||
msgstr "Par PCS"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_code
|
||||
msgid "Code"
|
||||
msgstr "Code"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Créé par"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_create_date
|
||||
msgid "Created on"
|
||||
msgstr "Créé le"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nom affiché"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_full_name
|
||||
msgid "Full name"
|
||||
msgstr "Nom"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model,name:golem_pcs.model_golem_member
|
||||
msgid "GOLEM Member"
|
||||
msgstr "Adhérent"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs___last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Dernière Modification le"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Dernière mise à jour par"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Dernière mise à jour le"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_name
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_member_pcs_id
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_res_partner_pcs_id
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_res_users_pcs_id
|
||||
msgid "PCS"
|
||||
msgstr "PCS"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_parent_id
|
||||
msgid "Parent id"
|
||||
msgstr "Parent"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model,name:golem_pcs.model_res_partner
|
||||
msgid "Partner"
|
||||
msgstr "Partenaire"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,help:golem_pcs.field_golem_member_pcs_id
|
||||
#: model:ir.model.fields,help:golem_pcs.field_res_partner_pcs_id
|
||||
#: model:ir.model.fields,help:golem_pcs.field_res_users_pcs_id
|
||||
msgid "Professions and Socioprofessional Categories"
|
||||
msgstr "Professions et catégories socioprofessionnelles"
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model,name:golem_pcs.model_golem_pcs
|
||||
msgid "golem.pcs"
|
||||
msgstr "golem.pcs"
|
||||
|
106
golem_pcs/i18n/golem_pcs.pot
Normal file
106
golem_pcs/i18n/golem_pcs.pot
Normal file
@ -0,0 +1,106 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * golem_pcs
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-09-24 14:16+0000\n"
|
||||
"PO-Revision-Date: 2018-09-24 14:16+0000\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: golem_pcs
|
||||
#: model:ir.ui.view,arch_db:golem_pcs.golem_member_search_inherit_golem_pcs
|
||||
msgid "By PCS"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_code
|
||||
msgid "Code"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_create_uid
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_create_date
|
||||
msgid "Created on"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_display_name
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_full_name
|
||||
msgid "Full name"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model,name:golem_pcs.model_golem_member
|
||||
msgid "GOLEM Member"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs___last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_name
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_member_pcs_id
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_res_partner_pcs_id
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_res_users_pcs_id
|
||||
msgid "PCS"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,field_description:golem_pcs.field_golem_pcs_parent_id
|
||||
msgid "Parent id"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model,name:golem_pcs.model_res_partner
|
||||
msgid "Partner"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model.fields,help:golem_pcs.field_golem_member_pcs_id
|
||||
#: model:ir.model.fields,help:golem_pcs.field_res_partner_pcs_id
|
||||
#: model:ir.model.fields,help:golem_pcs.field_res_users_pcs_id
|
||||
msgid "Professions and Socioprofessional Categories"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_pcs
|
||||
#: model:ir.model,name:golem_pcs.model_golem_pcs
|
||||
msgid "golem.pcs"
|
||||
msgstr ""
|
||||
|
19
golem_pcs/models/__init__.py
Normal file
19
golem_pcs/models/__init__.py
Normal file
@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from . import res_partner, golem_pcs
|
38
golem_pcs/models/golem_pcs.py
Normal file
38
golem_pcs/models/golem_pcs.py
Normal file
@ -0,0 +1,38 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
""" GOLEM PCS """
|
||||
|
||||
from odoo import models, fields, api
|
||||
|
||||
class GolemPCS(models.Model):
|
||||
""" GOLEM PCS """
|
||||
_name = 'golem.pcs'
|
||||
_rec_name = 'full_name'
|
||||
_order = 'code asc'
|
||||
|
||||
full_name = fields.Char(compute='_compute_full_name', store=True, index=True)
|
||||
name = fields.Char(required=True)
|
||||
code = fields.Char()
|
||||
parent_id = fields.Many2one('golem.pcs', ondelete='cascade')
|
||||
|
||||
@api.depends('name', 'code')
|
||||
def _compute_full_name(self):
|
||||
""" Computes full name """
|
||||
for pcs in self:
|
||||
pcs.full_name = u'%s - %s' % (pcs.code, pcs.name) if pcs.code else pcs.name
|
28
golem_pcs/models/res_partner.py
Normal file
28
golem_pcs/models/res_partner.py
Normal file
@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
""" Partner adaptations """
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
class ResPartner(models.Model):
|
||||
""" Partner extention """
|
||||
_inherit = 'res.partner'
|
||||
|
||||
pcs_id = fields.Many2one('golem.pcs', string='PCS', index=True,
|
||||
help='Professions and Socioprofessional Categories')
|
4
golem_pcs/security/ir.model.access.csv
Normal file
4
golem_pcs/security/ir.model.access.csv
Normal file
@ -0,0 +1,4 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_golem_pcs_user,Access GOLEM PCS User,model_golem_pcs,base.group_user,1,0,0,0
|
||||
access_golem_pcs_golem_user,Access GOLEM PCS GOLEM User,model_golem_pcs,golem_base.group_golem_user,1,0,0,0
|
||||
access_golem_pcs_golem_manager,Access GOLEM PCS GOLEM Manager,model_golem_pcs,golem_base.group_golem_manager,1,1,1,1
|
|
51
golem_pcs/views/golem_member_views.xml
Normal file
51
golem_pcs/views/golem_member_views.xml
Normal file
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<!-- Forms -->
|
||||
<record model="ir.ui.view" id="golem_member_form_inherit_golem_pcs">
|
||||
<field name="name">GOLEM Member Form PCS adaptations</field>
|
||||
<field name="model">golem.member</field>
|
||||
<field name="inherit_id" ref="golem_member.golem_member_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name='function' position='after'>
|
||||
<field name='pcs_id' options="{'no_create':True, 'no_open': True}" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search -->
|
||||
<record model="ir.ui.view" id="golem_member_search_inherit_golem_pcs">
|
||||
<field name="name">GOLEM Member Search PCS adaptations</field>
|
||||
<field name="model">golem.member</field>
|
||||
<field name="inherit_id" ref="golem_member.golem_member_search" />
|
||||
<field name="arch" type="xml">
|
||||
<field name='category_id' position='after'>
|
||||
<field name='pcs_id' />
|
||||
</field>
|
||||
<filter name="group_city" position='after'>
|
||||
<filter name="group_pcs" string="By PCS" context="{'group_by': 'pcs_id'}" />
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
48
golem_pcs/views/res_partner_views.xml
Normal file
48
golem_pcs/views/res_partner_views.xml
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
||||
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<!-- Forms -->
|
||||
<record model="ir.ui.view" id="res_partner_form_inherit_golem_pcs">
|
||||
<field name="name">Partner Form PCS adaptations</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name='function' position='after'>
|
||||
<field name='pcs_id' options="{'no_create':True, 'no_open': True}" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search -->
|
||||
<record model="ir.ui.view" id="view_partner_search_inherit_golem_pcs">
|
||||
<field name="name">Partner Search PCS adaptations</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_res_partner_filter" />
|
||||
<field name="arch" type="xml">
|
||||
<field name='category_id' position='after'>
|
||||
<field name='pcs_id' />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
Loading…
Reference in New Issue
Block a user