[IMP]GOLEM Activity Session Registration state field for validation
This commit is contained in:
parent
3485948978
commit
eb062cae35
@ -63,6 +63,9 @@ class GolemActivitySessionRegistration(models.Model):
|
||||
_name = 'golem.activity.session.registration'
|
||||
_description = 'GOLEM Activity Session Registration'
|
||||
|
||||
state = fields.Selection([('draft', 'Draft'), ('confirmed', 'Confirmed'),
|
||||
('canceled', 'Canceled')], required=True,
|
||||
default='draft')
|
||||
member_id = fields.Many2one('golem.member', string='Member', required=True,
|
||||
ondelete='cascade')
|
||||
session_id = fields.Many2one('golem.activity.session', required=True,
|
||||
|
@ -40,7 +40,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="name">Session registration list</field>
|
||||
<field name="model">golem.activity.session.registration</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree create="true" edit="false" delete="false" editable="top">
|
||||
<tree create="true" edit="false" delete="false" editable="top"
|
||||
colors="red: state == 'canceled';grey: state == 'draft';">
|
||||
<field name="state" invisible="1" />
|
||||
<field name="season_id" readonly="1" />
|
||||
<field name="member_id" domain="[('is_current', '=', True)]" />
|
||||
<field name="session_id" domain="[('is_current', '=', True)]" />
|
||||
|
@ -33,7 +33,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="places_remain" readonly="True" />
|
||||
<field name="activity_session_registration_ids"
|
||||
context="{'default_session_id': active_id}">
|
||||
<tree editable="top">
|
||||
<tree editable="top"
|
||||
colors="red: state == 'canceled';grey: state == 'draft';">
|
||||
<field name="state" invisible="1" />
|
||||
<field name="member_id"
|
||||
domain="[('season_ids', '=', season_id)]" />
|
||||
<field name="session_id" readonly="1" />
|
||||
|
@ -29,7 +29,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<p>Default season activities</p>
|
||||
<field name="activity_session_registration_ids"
|
||||
context="{'default_member_id': active_id}">
|
||||
<tree editable="top">
|
||||
<tree editable="top"
|
||||
colors="red: state == 'canceled';grey: state == 'draft';">
|
||||
<field name="state" invisible="1" />
|
||||
<field name="session_id"
|
||||
domain="[('is_current', '=', True)]" />
|
||||
<field name="season_id" readonly="1" />
|
||||
|
Loading…
Reference in New Issue
Block a user