forked from Yaltik/golem
[IMP][UI]Member : add name compsoed with number and name, for form view
This commit is contained in:
parent
5ddb5a91e7
commit
ad2afa09dc
@ -6,8 +6,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 10.0\n"
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2017-06-04 17:02+0000\n"
|
"POT-Creation-Date: 2017-06-05 06:43+0000\n"
|
||||||
"PO-Revision-Date: 2017-06-04 17:02+0000\n"
|
"PO-Revision-Date: 2017-06-05 06:43+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -620,6 +620,11 @@ msgstr "Adhérent"
|
|||||||
msgid "Member Tags"
|
msgid "Member Tags"
|
||||||
msgstr "Catégories de l'adhérent"
|
msgstr "Catégories de l'adhérent"
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_name_4212
|
||||||
|
msgid "Member computed name"
|
||||||
|
msgstr "Numéro et nom du membre"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: model:ir.ui.view,arch_db:golem_member.golem_member_form
|
#: model:ir.ui.view,arch_db:golem_member.golem_member_form
|
||||||
msgid "Member form"
|
msgid "Member form"
|
||||||
@ -682,8 +687,8 @@ msgid "Nationality"
|
|||||||
msgstr "Nationalité"
|
msgstr "Nationalité"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: code:addons/golem_member/models/golem_member.py:229
|
#: code:addons/golem_member/models/golem_member.py:235
|
||||||
#: code:addons/golem_member/models/golem_member.py:232
|
#: code:addons/golem_member/models/golem_member.py:238
|
||||||
#: selection:golem.member.numberconfig,is_automatic:0
|
#: selection:golem.member.numberconfig,is_automatic:0
|
||||||
#: selection:golem.member.numberconfig,is_per_season:0
|
#: selection:golem.member.numberconfig,is_per_season:0
|
||||||
#, python-format
|
#, python-format
|
||||||
@ -981,7 +986,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."
|
msgstr "Ce champ contient l'image utilisée comme photo d'identité pour ce contact, limitée à 1024x1024px."
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: code:addons/golem_member/models/golem_member.py:92
|
#: code:addons/golem_member/models/golem_member.py:66
|
||||||
#: sql_constraint:golem.member:0
|
#: sql_constraint:golem.member:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "This member number has already been used."
|
msgid "This member number has already been used."
|
||||||
@ -1073,8 +1078,8 @@ msgid "Website of Partner or Company"
|
|||||||
msgstr "Site Web pour les Partenaires ou les Sociétés"
|
msgstr "Site Web pour les Partenaires ou les Sociétés"
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: code:addons/golem_member/models/golem_member.py:229
|
#: code:addons/golem_member/models/golem_member.py:235
|
||||||
#: code:addons/golem_member/models/golem_member.py:232
|
#: code:addons/golem_member/models/golem_member.py:238
|
||||||
#: selection:golem.member.numberconfig,is_automatic:0
|
#: selection:golem.member.numberconfig,is_automatic:0
|
||||||
#: selection:golem.member.numberconfig,is_per_season:0
|
#: selection:golem.member.numberconfig,is_per_season:0
|
||||||
#, python-format
|
#, python-format
|
||||||
|
@ -6,8 +6,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 10.0\n"
|
"Project-Id-Version: Odoo Server 10.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2017-06-04 17:02+0000\n"
|
"POT-Creation-Date: 2017-06-05 06:43+0000\n"
|
||||||
"PO-Revision-Date: 2017-06-04 17:02+0000\n"
|
"PO-Revision-Date: 2017-06-05 06:43+0000\n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: <>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -613,6 +613,11 @@ msgstr ""
|
|||||||
msgid "Member Tags"
|
msgid "Member Tags"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: golem_member
|
||||||
|
#: model:ir.model.fields,field_description:golem_member.field_golem_member_number_name_4212
|
||||||
|
msgid "Member computed name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: model:ir.ui.view,arch_db:golem_member.golem_member_form
|
#: model:ir.ui.view,arch_db:golem_member.golem_member_form
|
||||||
msgid "Member form"
|
msgid "Member form"
|
||||||
@ -675,8 +680,8 @@ msgid "Nationality"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: code:addons/golem_member/models/golem_member.py:229
|
#: code:addons/golem_member/models/golem_member.py:235
|
||||||
#: code:addons/golem_member/models/golem_member.py:232
|
#: code:addons/golem_member/models/golem_member.py:238
|
||||||
#: selection:golem.member.numberconfig,is_automatic:0
|
#: selection:golem.member.numberconfig,is_automatic:0
|
||||||
#: selection:golem.member.numberconfig,is_per_season:0
|
#: selection:golem.member.numberconfig,is_per_season:0
|
||||||
#, python-format
|
#, python-format
|
||||||
@ -972,7 +977,7 @@ msgid "This field holds the image used as avatar for this contact, limited to 10
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: code:addons/golem_member/models/golem_member.py:92
|
#: code:addons/golem_member/models/golem_member.py:66
|
||||||
#: sql_constraint:golem.member:0
|
#: sql_constraint:golem.member:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "This member number has already been used."
|
msgid "This member number has already been used."
|
||||||
@ -1064,8 +1069,8 @@ msgid "Website of Partner or Company"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: golem_member
|
#. module: golem_member
|
||||||
#: code:addons/golem_member/models/golem_member.py:229
|
#: code:addons/golem_member/models/golem_member.py:235
|
||||||
#: code:addons/golem_member/models/golem_member.py:232
|
#: code:addons/golem_member/models/golem_member.py:238
|
||||||
#: selection:golem.member.numberconfig,is_automatic:0
|
#: selection:golem.member.numberconfig,is_automatic:0
|
||||||
#: selection:golem.member.numberconfig,is_per_season:0
|
#: selection:golem.member.numberconfig,is_per_season:0
|
||||||
#, python-format
|
#, python-format
|
||||||
|
@ -74,6 +74,7 @@ class GolemMember(models.Model):
|
|||||||
domain = [('is_default', '=', True)]
|
domain = [('is_default', '=', True)]
|
||||||
return self.env['golem.season'].search(domain, limit=1)
|
return self.env['golem.season'].search(domain, limit=1)
|
||||||
|
|
||||||
|
number_name = fields.Char('Member computed name', compute='_compute_number_name')
|
||||||
number = fields.Char('Member number', store=True, readonly=True)
|
number = fields.Char('Member number', store=True, readonly=True)
|
||||||
number_manual = fields.Char('Manual number', size=50, index=True,
|
number_manual = fields.Char('Manual number', size=50, index=True,
|
||||||
help='Manual number overwriting automatic '
|
help='Manual number overwriting automatic '
|
||||||
@ -90,6 +91,12 @@ class GolemMember(models.Model):
|
|||||||
is_number_manual = fields.Boolean('Is number manual?', store=False,
|
is_number_manual = fields.Boolean('Is number manual?', store=False,
|
||||||
compute='_compute_is_number_manual')
|
compute='_compute_is_number_manual')
|
||||||
|
|
||||||
|
@api.depends('number', 'name')
|
||||||
|
def _compute_number_name(self):
|
||||||
|
""" Computes a name composed with number and name """
|
||||||
|
for member in self:
|
||||||
|
member.number_name = u'{} - {}'.format(member.number, member.name)
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
@api.depends('season_ids')
|
@api.depends('season_ids')
|
||||||
def compute_is_current(self):
|
def compute_is_current(self):
|
||||||
|
@ -33,7 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<h1>
|
<h1>
|
||||||
<field name="image" widget="image" class="oe_left oe_avatar"
|
<field name="image" widget="image" class="oe_left oe_avatar"
|
||||||
options="{'preview_image': 'image_medium', 'size': [90, 90]}" />
|
options="{'preview_image': 'image_medium', 'size': [90, 90]}" />
|
||||||
<field name="name" class="oe_inline" readonly="True" />
|
<field name="number_name" class="oe_inline" readonly="True"
|
||||||
|
style="margin-left: 2%" />
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="oe_right oe_button_box" name="buttons" />
|
<div class="oe_right oe_button_box" name="buttons" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user