[TYPO]GOLEM Member : is_service_user betten than is_member
This commit is contained in:
parent
bb51ff6c25
commit
04cfcf43e4
@ -20,7 +20,7 @@
|
||||
'name': 'GOLEM non-profit members',
|
||||
'summary': 'Extends Odoo contacts for MJC',
|
||||
'description': 'Extends Odoo contacts for MJC',
|
||||
'version': '10.0.2.2.3',
|
||||
'version': '10.0.2.2.4',
|
||||
'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-01 05:38+0000\n"
|
||||
"PO-Revision-Date: 2018-08-01 07:39+0200\n"
|
||||
"POT-Creation-Date: 2018-08-01 08:51+0000\n"
|
||||
"PO-Revision-Date: 2018-08-01 10:51+0200\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -418,9 +418,6 @@ msgstr "Adhérent libre"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model,name:golem_member.model_golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_member_id
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_partner_member_id
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_users_member_id
|
||||
msgid "GOLEM Member"
|
||||
msgstr "Adhérent"
|
||||
|
||||
@ -474,8 +471,8 @@ msgstr "Genre"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.ui.view,arch_db:golem_member.res_partner_form_inherit_golem_member
|
||||
msgid "Go to member form"
|
||||
msgstr "Voir la fiche adhérent"
|
||||
msgid "Go to service user form"
|
||||
msgstr "Voir la fiche usager"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.actions.report.xml,name:golem_member.golem_member_report_html
|
||||
@ -590,19 +587,19 @@ msgstr "Est un Client"
|
||||
msgid "Is a Vendor"
|
||||
msgstr "Est un Fournisseur"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_is_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_partner_is_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_users_is_member
|
||||
#: model:ir.ui.view,arch_db:golem_member.res_partner_kanban_inherit_golem_member
|
||||
msgid "Is member"
|
||||
msgstr "Est un adhérent"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_is_number_manual
|
||||
msgid "Is number manual?"
|
||||
msgstr "Le numéro d'adhérent est-il saisi manuellement?"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_is_service_user
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_partner_is_service_user
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_users_is_service_user
|
||||
#: model:ir.ui.view,arch_db:golem_member.res_partner_kanban_inherit_golem_member
|
||||
msgid "Is service user"
|
||||
msgstr "Est un usager"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,help:golem_member.field_golem_member_membership_state
|
||||
msgid "It indicates the membership state.\n"
|
||||
@ -974,6 +971,13 @@ msgstr "Fiche usager"
|
||||
msgid "Service Users"
|
||||
msgstr "Usagers"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_member_id
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_partner_member_id
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_users_member_id
|
||||
msgid "Service user"
|
||||
msgstr "Usager"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.ui.menu,name:golem_member.golem_member_user_menu
|
||||
msgid "Service users"
|
||||
@ -1039,7 +1043,7 @@ msgstr "Rue..."
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_street2
|
||||
msgid "Street2"
|
||||
msgstr "Rue 2"
|
||||
msgstr "Complément de rue"
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.actions.act_window,name:golem_member.golem_member_action
|
||||
|
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-08-01 05:38+0000\n"
|
||||
"PO-Revision-Date: 2018-08-01 05:38+0000\n"
|
||||
"POT-Creation-Date: 2018-08-01 08:51+0000\n"
|
||||
"PO-Revision-Date: 2018-08-01 08:51+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -418,9 +418,6 @@ msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model,name:golem_member.model_golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_member_id
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_partner_member_id
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_users_member_id
|
||||
msgid "GOLEM Member"
|
||||
msgstr ""
|
||||
|
||||
@ -474,7 +471,7 @@ msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.ui.view,arch_db:golem_member.res_partner_form_inherit_golem_member
|
||||
msgid "Go to member form"
|
||||
msgid "Go to service user form"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
@ -591,16 +588,16 @@ msgid "Is a Vendor"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_is_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_partner_is_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_users_is_member
|
||||
#: model:ir.ui.view,arch_db:golem_member.res_partner_kanban_inherit_golem_member
|
||||
msgid "Is member"
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_is_number_manual
|
||||
msgid "Is number manual?"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_is_number_manual
|
||||
msgid "Is number manual?"
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_is_service_user
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_partner_is_service_user
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_users_is_service_user
|
||||
#: model:ir.ui.view,arch_db:golem_member.res_partner_kanban_inherit_golem_member
|
||||
msgid "Is service user"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
@ -966,6 +963,13 @@ msgstr ""
|
||||
msgid "Service Users"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.model.fields,field_description:golem_member.field_golem_member_member_id
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_partner_member_id
|
||||
#: model:ir.model.fields,field_description:golem_member.field_res_users_member_id
|
||||
msgid "Service user"
|
||||
msgstr ""
|
||||
|
||||
#. module: golem_member
|
||||
#: model:ir.ui.menu,name:golem_member.golem_member_user_menu
|
||||
msgid "Service users"
|
||||
|
@ -39,16 +39,16 @@ class ResPartner(models.Model):
|
||||
# Gender overwriting : no need for 'other' choice
|
||||
gender = fields.Selection([('male', _('Male')), ('female', _('Female'))])
|
||||
|
||||
member_id = fields.One2many('golem.member', 'partner_id', 'GOLEM Member',
|
||||
member_id = fields.One2many('golem.member', 'partner_id', 'Service user',
|
||||
readonly=True)
|
||||
is_member = fields.Boolean(compute='_compute_is_member')
|
||||
is_service_user = fields.Boolean(compute='_compute_is_service_user')
|
||||
member_number = fields.Char(related='member_id.number')
|
||||
|
||||
@api.depends('member_id')
|
||||
def _compute_is_member(self):
|
||||
def _compute_is_service_user(self):
|
||||
""" Computes is member """
|
||||
for partner in self:
|
||||
partner.is_member = len(partner.member_id) > 0
|
||||
partner.is_service_user = len(partner.member_id) > 0
|
||||
|
||||
@api.multi
|
||||
def view_member(self):
|
||||
|
@ -31,19 +31,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
style="background-color: #ccc; color: #fff; font-size: 150%; font-weight: bold; padding: 0.5%; text-align: center; margin-bottom: 1%;">Contact form</div>
|
||||
</div>
|
||||
<h1 position="after">
|
||||
<field name="is_member" invisible="1" />
|
||||
<field name="is_service_user" invisible="1" />
|
||||
<label for="member_id"
|
||||
attrs="{'invisible': ['|', ('is_company', '=', True),
|
||||
('is_member', '=', False)]}" />
|
||||
attrs="{'invisible': ['|', ('is_company', '=', True), ('is_service_user', '=', False)]}" />
|
||||
<field name="member_id" invisible="1" />
|
||||
<button name="view_member" string="Go to member form" type="object"
|
||||
<button name="view_member" string="Go to service user form" type="object"
|
||||
class="oe_link"
|
||||
attrs="{'invisible': ['|', ('is_company', '=', True),
|
||||
('is_member', '=', False)]}" />
|
||||
('is_service_user', '=', False)]}" />
|
||||
<button type="object" name="create_golem_member"
|
||||
string="Create a service user from this contact"
|
||||
attrs="{'invisible': ['|', ('is_company', '=', True),
|
||||
('is_member', '!=', False)]}" />
|
||||
('is_service_user', '!=', False)]}" />
|
||||
</h1>
|
||||
</field>
|
||||
</record>
|
||||
@ -55,12 +54,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="inherit_id" ref="base.res_partner_kanban_view" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="type" position="after">
|
||||
<field name="is_member" />
|
||||
<field name="is_service_user" />
|
||||
</field>
|
||||
<xpath expr="//div[@class='oe_kanban_global_click o_res_partner_kanban']"
|
||||
position="inside">
|
||||
<hr style="clear: both; background-color: #ecffe2; height: 10%; margin: 2% 0 0 0;"
|
||||
title="Is member" t-if="!!record.is_member.raw_value" />
|
||||
title="Is service user" t-if="!!record.is_service_user.raw_value" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@ -72,7 +71,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="inherit_id" ref="base.view_partner_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="display_name" position="before">
|
||||
<field name="member_number" />
|
||||
<field name="member_number"
|
||||
attrs="{'invisible': [('member_number', '=', False)]}" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
Loading…
x
Reference in New Issue
Block a user