forked from Yaltik/golem
[IMP]GOLEM Activity Session Registration : usage of existing related is_current instead of reocmputed default_season + fixes on registrations from activities
This commit is contained in:
parent
5b233e19ee
commit
65898e80b7
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-09-22 08:13+0000\n"
|
||||
"PO-Revision-Date: 2016-09-22 08:13+0000\n"
|
||||
"POT-Creation-Date: 2016-09-22 08:22+0000\n"
|
||||
"PO-Revision-Date: 2016-09-22 08:22+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -44,7 +44,6 @@ msgstr "Saison par défaut?"
|
||||
|
||||
#. module: golem_activity_session_registration
|
||||
#: view:golem.activity.session.registration:golem_activity_session_registration.searches
|
||||
#: field:golem.activity.session.registration,season_default_id:0
|
||||
msgid "Default season"
|
||||
msgstr "Saison par défaut"
|
||||
|
||||
|
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-09-22 08:13+0000\n"
|
||||
"PO-Revision-Date: 2016-09-22 08:13+0000\n"
|
||||
"POT-Creation-Date: 2016-09-22 08:22+0000\n"
|
||||
"PO-Revision-Date: 2016-09-22 08:22+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -43,7 +43,6 @@ msgstr ""
|
||||
|
||||
#. module: golem_activity_session_registration
|
||||
#: view:golem.activity.session.registration:golem_activity_session_registration.searches
|
||||
#: field:golem.activity.session.registration,season_default_id:0
|
||||
msgid "Default season"
|
||||
msgstr ""
|
||||
|
||||
|
@ -74,15 +74,5 @@ class GolemActivitySessionRegistration(models.Model):
|
||||
ondelete='set null')
|
||||
season_id = fields.Many2one(string='Season',
|
||||
related='session_id.season_id')
|
||||
|
||||
season_default_id = fields.Many2one('golem.season', 'Default season',
|
||||
compute='_compute_season_default')
|
||||
is_current = fields.Boolean('Current season?',
|
||||
related='session_id.is_current')
|
||||
|
||||
@api.one
|
||||
@api.depends('session_id')
|
||||
def _compute_season_default(self):
|
||||
""" Compute default season """
|
||||
domain = [('is_default', '=', True)]
|
||||
self.season_default_id = self.env['golem.season'].search(domain).id
|
||||
|
@ -34,9 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="activity_session_registration_ids"
|
||||
context="{'default_session_id': active_id}">
|
||||
<tree editable="top">
|
||||
<field name="season_default_id" invisible="1" />
|
||||
<field name="member_id"
|
||||
domain="[('season_ids', '=', season_default_id)]" />
|
||||
domain="[('season_ids', '=', season_id)]" />
|
||||
<field name="session_id" readonly="1" />
|
||||
<field name="season_id" readonly="1" />
|
||||
<field name="invoice_id" readonly="1" />
|
||||
|
@ -30,9 +30,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="activity_session_registration_ids"
|
||||
context="{'default_member_id': active_id}">
|
||||
<tree editable="top">
|
||||
<field name="season_default_id" invisible="1" />
|
||||
<field name="session_id"
|
||||
domain="[('season_id', '=', season_default_id)]" />
|
||||
domain="[('is_current', '=', True)]" />
|
||||
<field name="season_id" readonly="1" />
|
||||
<field name="member_id" readonly="1" />
|
||||
<field name="invoice_id" readonly="1" />
|
||||
|
Loading…
Reference in New Issue
Block a user