[IMP]GOLEM Activity enhancements : new tree view, better duplicate handling, translation fix
This commit is contained in:
parent
e03757ca4b
commit
c92645158c
@ -461,8 +461,8 @@ msgstr "Prix de vente"
|
||||
|
||||
#. module: golem_activity
|
||||
#: field:golem.activity,season_id:0
|
||||
msgid "Seasons"
|
||||
msgstr "Saisons"
|
||||
msgid "Season"
|
||||
msgstr "Saison"
|
||||
|
||||
#. module: golem_activity
|
||||
#: help:golem.activity,categ_id:0
|
||||
|
@ -32,12 +32,16 @@ class GolemActivity(models.Model):
|
||||
_inherits = {'product.template': 'product_id'}
|
||||
_rec_name = 'activity_name'
|
||||
|
||||
season_id = fields.Many2one('golem.season', string='Seasons',
|
||||
required=True)
|
||||
# Copy the default code
|
||||
default_code = fields.Char(copy=True)
|
||||
|
||||
# Own fields
|
||||
season_id = fields.Many2one('golem.season', string='Season',
|
||||
copy=False, required=True)
|
||||
animator_id = fields.Many2one('res.partner', string='Animator',
|
||||
domain=[('is_company', '=', False)])
|
||||
date_start = fields.Date('Start date')
|
||||
date_end = fields.Date('End date')
|
||||
date_start = fields.Date('Start date', copy=False)
|
||||
date_end = fields.Date('End date', copy=False)
|
||||
|
||||
@api.constrains('date_start', 'date_end')
|
||||
def _check_period(self):
|
||||
|
@ -74,6 +74,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Trees -->
|
||||
<record model="ir.ui.view" id="view_tree">
|
||||
<field name="name">GOLEM Activity Tree/List</field>
|
||||
<field name="model">golem.activity</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="GOLEM Activities">
|
||||
<field name="default_code" />
|
||||
<field name="name" />
|
||||
<field name="season_id" />
|
||||
<field name="animator_id" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Searches -->
|
||||
<record id="view_filter" model="ir.ui.view">
|
||||
<field name="name">GOLEM Activity Filters</field>
|
||||
@ -81,6 +95,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="activity_name" />
|
||||
<field name="categ_id" widget="many2one" />
|
||||
<field name="season_id" widget="many2one" />
|
||||
<filter name="season_default" string="Default season"
|
||||
domain="[('is_current', '=', True)]" />
|
||||
@ -92,7 +107,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Actions -->
|
||||
<record id="action" model="ir.actions.act_window">
|
||||
<field name="name">GOLEM Activities</field>
|
||||
|
Loading…
Reference in New Issue
Block a user