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