[REF]GOLEM Member Family Quotient : small refactorings

This commit is contained in:
Fabien BOURGEOIS 2019-01-21 11:18:41 +01:00
parent 6482489aa9
commit 408dc00e1b
6 changed files with 64 additions and 22 deletions

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017-2018 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2017-2019 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
@ -18,7 +18,7 @@
{
'name': 'GOLEM Member Family Quotient',
'summary': 'GOLEM Members Family Quotients',
'version': '10.0.1.1.0',
'version': '10.0.1.2.0',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-26 15:40+0000\n"
"PO-Revision-Date: 2018-08-26 17:43+0200\n"
"POT-Creation-Date: 2019-01-21 10:17+0000\n"
"PO-Revision-Date: 2019-01-21 11:18+0100\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -23,6 +23,12 @@ msgid "CAF Number"
msgstr "Numéro CAF"
#. module: golem_member_familyquotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_golem_member_analysis_currency_id
msgid "Currency"
msgstr "Devise"
#. module: golem_member_familyquotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_golem_member_analysis_family_quotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_golem_member_family_quotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_res_partner_family_quotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_res_users_family_quotient
@ -30,12 +36,27 @@ msgid "Family quotient"
msgstr "Quotient familial"
#. module: golem_member_familyquotient
#: model:ir.model,name:golem_member_familyquotient.model_golem_member
msgid "GOLEM Member"
msgstr "Usager"
#: model:ir.model,name:golem_member_familyquotient.model_golem_member_analysis_wizard
msgid "GOLEM Members Analysis Wizard Adaptation"
msgstr "GOLEM Members Analysis Wizard Adaptation"
#. module: golem_member_familyquotient
#: model:ir.model,name:golem_member_familyquotient.model_golem_member_analysis
msgid "GOLEM Members Analysis Adaption"
msgstr "GOLEM Members Analysis Adaption"
#. module: golem_member_familyquotient
#: model:ir.model,name:golem_member_familyquotient.model_res_partner
msgid "Partner"
msgstr "Partenaire"
#. module: golem_member_familyquotient
#: model:ir.ui.view,arch_db:golem_member_familyquotient.golem_member_analysis_pivot_fquotient_area
msgid "Service User Analysis"
msgstr "Analyse des usagers"
#. module: golem_member_familyquotient
#: model:ir.model.fields,help:golem_member_familyquotient.field_golem_member_analysis_currency_id
msgid "Utility field to express amount currency"
msgstr "Champ utile pour indiquer le montant de la monnaie"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-26 15:40+0000\n"
"PO-Revision-Date: 2018-08-26 15:40+0000\n"
"POT-Creation-Date: 2019-01-21 10:17+0000\n"
"PO-Revision-Date: 2019-01-21 10:17+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -23,6 +23,12 @@ msgid "CAF Number"
msgstr ""
#. module: golem_member_familyquotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_golem_member_analysis_currency_id
msgid "Currency"
msgstr ""
#. module: golem_member_familyquotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_golem_member_analysis_family_quotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_golem_member_family_quotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_res_partner_family_quotient
#: model:ir.model.fields,field_description:golem_member_familyquotient.field_res_users_family_quotient
@ -30,8 +36,13 @@ msgid "Family quotient"
msgstr ""
#. module: golem_member_familyquotient
#: model:ir.model,name:golem_member_familyquotient.model_golem_member
msgid "GOLEM Member"
#: model:ir.model,name:golem_member_familyquotient.model_golem_member_analysis_wizard
msgid "GOLEM Members Analysis Wizard Adaptation"
msgstr ""
#. module: golem_member_familyquotient
#: model:ir.model,name:golem_member_familyquotient.model_golem_member_analysis
msgid "GOLEM Members Analysis Adaption"
msgstr ""
#. module: golem_member_familyquotient
@ -39,3 +50,13 @@ msgstr ""
msgid "Partner"
msgstr ""
#. module: golem_member_familyquotient
#: model:ir.ui.view,arch_db:golem_member_familyquotient.golem_member_analysis_pivot_fquotient_area
msgid "Service User Analysis"
msgstr ""
#. module: golem_member_familyquotient
#: model:ir.model.fields,help:golem_member_familyquotient.field_golem_member_analysis_currency_id
msgid "Utility field to express amount currency"
msgstr ""

View File

@ -18,10 +18,7 @@
""" GOLEM Members Analysis Pivot Adaption """
import logging
from odoo import models, fields, api, _
_LOGGER = logging.getLogger(__name__)
from odoo import models, fields, api
class GolemMemberAnalysisPivot(models.TransientModel):

View File

@ -20,16 +20,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<odoo>
<data>
<!--pivot-->
<!-- Pivot -->
<record id="golem_member_analysis_pivot_fquotient_area" model="ir.ui.view">
<field name="name">Golem Member Analysis Fquotient and Area Pivot</field>
<field name="model">golem.member.analysis</field>
<field name="arch" type="xml">
<pivot string="Golem Member Analysis">
<pivot string="Service User Analysis">
<field name="area_id" type="row"/>
<field name="family_quotient" type="col"/>
</pivot>
</field>
</record>
</data>
</odoo>

View File

@ -18,9 +18,7 @@
""" GOLEM Members Analysis Adaptation """
import logging
from odoo import models, fields, api, _
_LOGGER = logging.getLogger(__name__)
from odoo import models, fields, api
class GolemMemberAnalysis(models.TransientModel):
@ -39,6 +37,9 @@ class GolemMemberAnalysis(models.TransientModel):
pivot_view = super(GolemMemberAnalysis, self).get_pivot_view()
if pivot_view:
return pivot_view
elif rec.analyse_type == 'fquotient_area':
if rec.analyse_type == 'fquotient_area':
return self.env.ref(
'golem_member_familyquotient.golem_member_analysis_pivot_fquotient_area', False)
'golem_member_familyquotient.golem_member_analysis_pivot_fquotient_area',
False
)
return False