Browse Source

[FIX] make beesdoo_shift installable

on an empty db.
pull/143/head
odoo-pda 4 years ago
parent
commit
d4f8d2c32a
  1. 1
      beesdoo_shift/__manifest__.py
  2. 1
      beesdoo_shift/models/cooperative_status.py
  3. 2
      beesdoo_shift/models/planning.py
  4. 2
      beesdoo_shift/security/group.xml
  5. 2
      beesdoo_shift/views/task_template.xml
  6. 1
      beesdoo_shift_atttendance/__manifest__.py
  7. 1
      beesdoo_shift_atttendance/wizard/__init__.py
  8. 0
      beesdoo_shift_atttendance/wizard/generate_missing_attendance_sheets.py
  9. 0
      beesdoo_shift_atttendance/wizard/generate_missing_attendance_sheets.xml

1
beesdoo_shift/__manifest__.py

@ -36,7 +36,6 @@
"wizard/extension.xml",
"wizard/holiday.xml",
"wizard/temporary_exemption.xml",
"wizard/generate_missing_attendance_sheets.xml",
],
'demo': [
"demo/cooperators.xml",

1
beesdoo_shift/models/cooperative_status.py

@ -114,7 +114,6 @@ class CooperativeStatus(models.Model):
elif rec.working_mode == 'exempt':
rec.status = 'ok'
_sql_constraints = [
('cooperator_uniq', 'unique (cooperator_id)', _('You can only set one cooperator status per cooperator')),
]

2
beesdoo_shift/models/planning.py

@ -82,7 +82,7 @@ class TaskTemplate(models.Model):
planning_id = fields.Many2one('beesdoo.shift.planning', required=True)
day_nb_id = fields.Many2one('beesdoo.shift.daynumber', string='Day', required=True)
task_type_id = fields.Many2one('beesdoo.shift.type', string="Type")
attendance_sheet_id = fields.Many2one('beesdoo.shift.sheet', string="Attendance Sheet")
# attendance_sheet_id = fields.Many2one('beesdoo.shift.sheet', string="Attendance Sheet") FIXME removed because beesdoo.shift.sheet is from another module.
start_time = fields.Float(required=True)
end_time = fields.Float(required=True)
super_coop_id = fields.Many2one('res.users', string="Super Cooperative", domain=[('partner_id.super', '=', True)])

2
beesdoo_shift/security/group.xml

@ -2,7 +2,7 @@
<record id="group_shift_attendance" model="res.groups">
<field name="name">Shift and Worker Read Access</field>
<field name="category_id" ref="base.module_category_cooperative_management"/>
<field name="implied_ids" eval="[(4, ref('group_shift_attendance_sheet'))]"/>
<!-- <field name="implied_ids" eval="[(4, ref('group_shift_attendance_sheet'))]"/> FIXME this group has been moved to beesdoo_shift_attendance-->
</record>
<record id="group_shift_management" model="res.groups">
<field name="name">Shifts and Attendance Sheets Management</field>

2
beesdoo_shift/views/task_template.xml

@ -160,7 +160,7 @@
</record>
<menuitem name="Shift Management" id="menu_root"
groups="beesdoo_shift.group_shift_attendance_sheet,beesdoo_shift.group_shift_attendance" />
groups="beesdoo_shift.group_shift_attendance" />
<menuitem name="Templates" id="menu_template_top" parent="menu_root"
groups="beesdoo_shift.group_shift_management"
sequence="20" />

1
beesdoo_shift_atttendance/__manifest__.py

@ -30,6 +30,7 @@
"security/ir.model.access.csv",
"views/res_config_settings_view.xml",
"wizard/validate_attendance_sheet.xml",
"wizard/generate_missing_attendance_sheets.xml",
"views/attendance_sheet.xml",
],
'demo': []

1
beesdoo_shift_atttendance/wizard/__init__.py

@ -1 +1,2 @@
from . import validate_attendance_sheet
from . import generate_missing_attendance_sheets

0
beesdoo_shift/wizard/generate_missing_attendance_sheets.py → beesdoo_shift_atttendance/wizard/generate_missing_attendance_sheets.py

0
beesdoo_shift/wizard/generate_missing_attendance_sheets.xml → beesdoo_shift_atttendance/wizard/generate_missing_attendance_sheets.xml

Loading…
Cancel
Save