[FIX]GOLEM Payment fixes

* Allow direct creation of schedule days ;
* Cascade delete for days and schedules.
This commit is contained in:
Fabien BOURGEOIS 2018-08-05 06:36:58 +02:00
parent 2ce0ddfc8c
commit 970fa991b5
3 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,7 @@
'name': 'GOLEM Activity Member Registration Payments', 'name': 'GOLEM Activity Member Registration Payments',
'summary': 'GOLEM Activities Member Registration Payments', 'summary': 'GOLEM Activities Member Registration Payments',
'description': 'GOLEM Activities Member Registration Payments', 'description': 'GOLEM Activities Member Registration Payments',
'version': '10.0.0.3.5', 'version': '10.0.0.3.6',
'category': 'GOLEM', 'category': 'GOLEM',
'author': 'Fabien Bourgeois', 'author': 'Fabien Bourgeois',
'license': 'AGPL-3', 'license': 'AGPL-3',

View File

@ -37,7 +37,7 @@ class GolemPaymentScheduleDay(models.Model):
day = fields.Date(required=True) day = fields.Date(required=True)
schedule_id = fields.Many2one('golem.payment.schedule', required=True, schedule_id = fields.Many2one('golem.payment.schedule', required=True,
auto_join=True) auto_join=True, ondelete='cascade')
class GolemPaymentSchedule(models.Model): class GolemPaymentSchedule(models.Model):

View File

@ -30,10 +30,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<group> <group>
<field name="name" /> <field name="name" />
<field name="season_id" options="{'no_open': True, 'no_create': True}" /> <field name="season_id" options="{'no_open': True, 'no_create': True}" />
<field name="day_ids"> <field name="day_ids" context="{'default_schedule_id': active_id}">
<tree editable="bottom"> <tree editable="bottom">
<field name="day" /> <field name="day" />
<field name="schedule_id" invisible="1" /> <field name="schedule_id" invisible="1" required="0" />
</tree> </tree>
</field> </field>
<field name="occurences" /> <field name="occurences" />