forked from Yaltik/golem
[BUG] Add option saison field
This commit is contained in:
parent
f3260ca757
commit
26c592204b
@ -44,14 +44,7 @@ class GolemPaymentSchedule(models.Model):
|
||||
day_ids = fields.Many2many('golem.payment.schedule.day', string='Days')
|
||||
occurences = fields.Integer(compute='_compute_occurences')
|
||||
|
||||
@api.model
|
||||
def _default_season(self):
|
||||
""" Get default season """
|
||||
domain = [('is_default', '=', True)]
|
||||
return self.env['golem.season'].search(domain, limit=1)
|
||||
|
||||
season_id = fields.Many2one('golem.season', string='Seasons',
|
||||
readonly=True, default=_default_season)
|
||||
season_id = fields.Many2one('golem.season', 'Season', required=True)
|
||||
|
||||
|
||||
@api.depends('day_ids')
|
||||
|
@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="season_id" />
|
||||
<field name="season_id" options="{'no_open': True, 'no_create': True}" />
|
||||
<field name="day_ids" widget="many2many_tags" />
|
||||
<field name="occurences" />
|
||||
</group>
|
||||
|
Loading…
Reference in New Issue
Block a user