[IMP][UI]Add Kanban green box for GOLEM members

This commit is contained in:
Fabien Bourgeois 2017-06-04 19:03:34 +02:00
parent ec9b16c1eb
commit f89074e257
4 changed files with 55 additions and 14 deletions

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-04 16:02+0000\n"
"PO-Revision-Date: 2017-06-04 16:02+0000\n"
"POT-Creation-Date: 2017-06-04 17:02+0000\n"
"PO-Revision-Date: 2017-06-04 17:02+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -502,6 +502,14 @@ 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?"
@ -674,8 +682,8 @@ msgid "Nationality"
msgstr "Nationalité"
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:221
#: code:addons/golem_member/models/golem_member.py:224
#: code:addons/golem_member/models/golem_member.py:229
#: code:addons/golem_member/models/golem_member.py:232
#: selection:golem.member.numberconfig,is_automatic:0
#: selection:golem.member.numberconfig,is_per_season:0
#, python-format
@ -973,7 +981,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:84
#: code:addons/golem_member/models/golem_member.py:92
#: sql_constraint:golem.member:0
#, python-format
msgid "This member number has already been used."
@ -1065,8 +1073,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:221
#: code:addons/golem_member/models/golem_member.py:224
#: code:addons/golem_member/models/golem_member.py:229
#: code:addons/golem_member/models/golem_member.py:232
#: selection:golem.member.numberconfig,is_automatic:0
#: selection:golem.member.numberconfig,is_per_season:0
#, python-format

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-04 16:01+0000\n"
"PO-Revision-Date: 2017-06-04 16:01+0000\n"
"POT-Creation-Date: 2017-06-04 17:02+0000\n"
"PO-Revision-Date: 2017-06-04 17:02+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -501,6 +501,14 @@ msgstr ""
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"
msgstr ""
#. module: golem_member
#: model:ir.model.fields,field_description:golem_member.field_golem_member_is_number_manual
msgid "Is number manual?"
@ -667,8 +675,8 @@ msgid "Nationality"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:221
#: code:addons/golem_member/models/golem_member.py:224
#: code:addons/golem_member/models/golem_member.py:229
#: code:addons/golem_member/models/golem_member.py:232
#: selection:golem.member.numberconfig,is_automatic:0
#: selection:golem.member.numberconfig,is_per_season:0
#, python-format
@ -964,7 +972,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:84
#: code:addons/golem_member/models/golem_member.py:92
#: sql_constraint:golem.member:0
#, python-format
msgid "This member number has already been used."
@ -1056,8 +1064,8 @@ msgid "Website of Partner or Company"
msgstr ""
#. module: golem_member
#: code:addons/golem_member/models/golem_member.py:221
#: code:addons/golem_member/models/golem_member.py:224
#: code:addons/golem_member/models/golem_member.py:229
#: code:addons/golem_member/models/golem_member.py:232
#: selection:golem.member.numberconfig,is_automatic:0
#: selection:golem.member.numberconfig,is_per_season:0
#, python-format

View File

@ -37,8 +37,16 @@ class ResPartner(models.Model):
member_id = fields.One2many('golem.member', 'partner_id', 'GOLEM Member',
readonly=True)
is_member = fields.Boolean('Is member', compute='_compute_is_member')
member_number = fields.Char('Member number', related='member_id.number')
@api.depends('member_id')
def _compute_is_member(self):
""" Computes is member """
for partner in self:
partner.is_member = len(partner.member_id) > 0
@api.multi
def create_golem_member(self):
""" Member creation from partner form """

View File

@ -45,6 +45,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</field>
</record>
<!-- Kanban -->
<record model="ir.ui.view" id="res_partner_kanban_inherit_golem_member">
<field name="name">Partner Kanban adaptations</field>
<field name="model">res.partner</field>
<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>
<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" />
</xpath>
</field>
</record>
<!-- Trees -->
<record model="ir.ui.view" id="res_partner_tree_inherit_golem_member">
<field name="name">Add member number to tree</field>