[IMP]GOLEM Activity Session Registrations filters and searches

This commit is contained in:
Fabien Bourgeois 2016-09-22 10:15:02 +02:00
parent 0608acf109
commit 5b233e19ee
4 changed files with 33 additions and 4 deletions

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 8.0\n" "Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-22 07:55+0000\n" "POT-Creation-Date: 2016-09-22 08:13+0000\n"
"PO-Revision-Date: 2016-09-22 07:55+0000\n" "PO-Revision-Date: 2016-09-22 08:13+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -38,6 +38,12 @@ msgid "Created on"
msgstr "Créé le" msgstr "Créé le"
#. module: golem_activity_session_registration #. module: golem_activity_session_registration
#: field:golem.activity.session.registration,is_current:0
msgid "Current season?"
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 #: field:golem.activity.session.registration,season_default_id:0
msgid "Default season" msgid "Default season"
msgstr "Saison par défaut" msgstr "Saison par défaut"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 8.0\n" "Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-22 07:53+0000\n" "POT-Creation-Date: 2016-09-22 08:13+0000\n"
"PO-Revision-Date: 2016-09-22 07:53+0000\n" "PO-Revision-Date: 2016-09-22 08:13+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -37,6 +37,12 @@ msgid "Created on"
msgstr "" msgstr ""
#. module: golem_activity_session_registration #. module: golem_activity_session_registration
#: field:golem.activity.session.registration,is_current:0
msgid "Current season?"
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 #: field:golem.activity.session.registration,season_default_id:0
msgid "Default season" msgid "Default season"
msgstr "" msgstr ""

View File

@ -77,6 +77,8 @@ class GolemActivitySessionRegistration(models.Model):
season_default_id = fields.Many2one('golem.season', 'Default season', season_default_id = fields.Many2one('golem.season', 'Default season',
compute='_compute_season_default') compute='_compute_season_default')
is_current = fields.Boolean('Current season?',
related='session_id.is_current')
@api.one @api.one
@api.depends('session_id') @api.depends('session_id')

View File

@ -51,12 +51,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record> </record>
<!-- Search --> <!-- Search -->
<record id="searches" model="ir.ui.view">
<field name="name">GOLEM Activity Sesion Registration searches</field>
<field name="model">golem.activity.session.registration</field>
<field name="arch" type="xml">
<search>
<field name="season_id" widget="many2one" />
<field name="member_id" widget="many2one" />
<field name="session_id" widget="many2one" />
<field name="invoice_id" widget="many2one" />
<filter name="season_default" string="Default season"
domain="[('is_current', '=', True)]" />
</search>
</field>
</record>
<!-- Action --> <!-- Action -->
<record id="registration_action_list" model="ir.actions.act_window"> <record id="registration_action_list" model="ir.actions.act_window">
<field name="name">GOLEM Activity Session Registration List</field> <field name="name">GOLEM Activity Session Registration List</field>
<field name="res_model">golem.activity.session.registration</field> <field name="res_model">golem.activity.session.registration</field>
<field name="view_mode">tree</field> <field name="view_mode">tree</field>
<field name="context">{'search_default_season_default': True}</field>
</record> </record>
<!-- Menu --> <!-- Menu -->