Browse Source

[UPD] b_shifts : traductions and terms

pull/125/head
Elouan Le Bars 5 years ago
parent
commit
1d3c2d07c1
  1. 4
      beesdoo_shift/data/mail_template.xml
  2. 470
      beesdoo_shift/i18n/fr.po
  3. 470
      beesdoo_shift/i18n/fr_BE.po
  4. 567
      beesdoo_shift/i18n/nl_BE.po
  5. 6
      beesdoo_shift/models/attendance_sheet.py
  6. 2
      beesdoo_shift/views/attendance_sheet.xml
  7. 6
      beesdoo_shift/wizard/subscribe.py
  8. 20
      beesdoo_shift/wizard/validate_attendance_sheet.py
  9. 2
      beesdoo_shift/wizard/validate_attendance_sheet.xml

4
beesdoo_shift/data/mail_template.xml

@ -30,6 +30,7 @@
% endif % endif
% if object.replaced_id: % if object.replaced_id:
You were supposed to replace ${object.worker_id.name}.
You have to do ${(object.replaced_id.cooperative_status_ids.sr + object.replaced_id.cooperative_status_ids.sc) * -1 } shifts before your next regular shift.<br> You have to do ${(object.replaced_id.cooperative_status_ids.sr + object.replaced_id.cooperative_status_ids.sc) * -1 } shifts before your next regular shift.<br>
% else: % else:
You have to do ${(object.worker_id.cooperative_status_ids.sr + object.worker_id.cooperative_status_ids.sc) * -1 } shifts before your next regular shift.<br> You have to do ${(object.worker_id.cooperative_status_ids.sr + object.worker_id.cooperative_status_ids.sc) * -1 } shifts before your next regular shift.<br>
@ -47,8 +48,7 @@
% endif % endif
% if object.replaced_id: % if object.replaced_id:
You were supposed to replace ${object.worker_id.name} and your
current status is "${object.replaced_id.cooperative_status_ids.get_status_value()}".
Your current status is "${object.replaced_id.cooperative_status_ids.get_status_value()}".
% else: % else:
<br><br>Your current status is "${object.worker_id.cooperative_status_ids.get_status_value()}". <br><br>Your current status is "${object.worker_id.cooperative_status_ids.get_status_value()}".
% endif % endif

470
beesdoo_shift/i18n/fr.po
File diff suppressed because it is too large
View File

470
beesdoo_shift/i18n/fr_BE.po
File diff suppressed because it is too large
View File

567
beesdoo_shift/i18n/nl_BE.po
File diff suppressed because it is too large
View File

6
beesdoo_shift/models/attendance_sheet.py

@ -370,7 +370,7 @@ class AttendanceSheet(models.Model):
) )
if worker.working_mode not in ("regular", "irregular"): if worker.working_mode not in ("regular", "irregular"):
raise UserError( raise UserError(
_("%s is %s and should be regular or irregular.")
_("%s's working mode is %s and should be regular or irregular.")
% (worker.name, worker.working_mode) % (worker.name, worker.working_mode)
) )
@ -384,7 +384,7 @@ class AttendanceSheet(models.Model):
return return
if shift.worker_id == worker and shift.replaced_id: if shift.worker_id == worker and shift.replaced_id:
raise UserError( raise UserError(
_("%s was expected as replaced.") % worker.name
_("%s is registered as replaced.") % worker.name
) )
is_compensation = worker.working_mode == "regular" is_compensation = worker.working_mode == "regular"
@ -430,7 +430,7 @@ class AttendanceSheet(models.Model):
workers = [] workers = []
for task in tasks: for task in tasks:
# Only one shift is added if multiple similar exist
# Only one shift is added if multiple similar exist
if task.worker_id and task.worker_id not in workers and (task.state != "cancel") : if task.worker_id and task.worker_id not in workers and (task.state != "cancel") :
expected_shift.create( expected_shift.create(
{ {

2
beesdoo_shift/views/attendance_sheet.xml

@ -147,7 +147,7 @@
<field name="state" widget="statusbar" readonly="True" class="oe_inline"/> <field name="state" widget="statusbar" readonly="True" class="oe_inline"/>
<button type="object" <button type="object"
name="validate_with_checks" name="validate_with_checks"
string="Validate Sheet"
string="Comment and validate"
confirm="Beware : a validated sheet cannot be edited anymore confirm="Beware : a validated sheet cannot be edited anymore
and you won't be able to add any latecomers. and you won't be able to add any latecomers.
The counters of those who didn't attend will be updated The counters of those who didn't attend will be updated

6
beesdoo_shift/wizard/subscribe.py

@ -75,11 +75,11 @@ class Subscribe(models.TransientModel):
nb_shifts = fields.Integer(string='Number of shifts', default=_get_nb_shifts) nb_shifts = fields.Integer(string='Number of shifts', default=_get_nb_shifts)
reset_counter = fields.Boolean(default=_get_reset_counter_default) reset_counter = fields.Boolean(default=_get_reset_counter_default)
reset_compensation_counter = fields.Boolean(default=False) reset_compensation_counter = fields.Boolean(default=False)
unsubscribed = fields.Boolean(default=False, string="Are you sure to unsubscribe this cooperator")
unsubscribed = fields.Boolean(default=False, string="Are you sure to remove this cooperator from his subscribed shift ?")
irregular_start_date = fields.Date(string="Start Date", default=fields.Date.today) irregular_start_date = fields.Date(string="Start Date", default=fields.Date.today)
resigning = fields.Boolean(default=False, help="Want to leave the beescoop") resigning = fields.Boolean(default=False, help="Want to leave the beescoop")
@api.multi @api.multi
def unsubscribe(self): def unsubscribe(self):
@ -109,7 +109,7 @@ class Subscribe(models.TransientModel):
if self.working_mode != 'regular': if self.working_mode != 'regular':
#Remove existing shift then subscribe to the new shift #Remove existing shift then subscribe to the new shift
self.cooperator_id.sudo().write({'subscribed_shift_ids': [(5,)]}) self.cooperator_id.sudo().write({'subscribed_shift_ids': [(5,)]})
data = { data = {
'info_session': self.info_session, 'info_session': self.info_session,

20
beesdoo_shift/wizard/validate_attendance_sheet.py

@ -57,7 +57,9 @@ class ValidateAttendanceSheet(models.TransientModel):
active_sheet = fields.Many2one( active_sheet = fields.Many2one(
"beesdoo.shift.sheet", default=_get_active_sheet "beesdoo.shift.sheet", default=_get_active_sheet
) )
card_support = fields.Boolean(default=_get_card_support_setting)
card_support = fields.Boolean(
default=_get_card_support_setting, string="Card validation"
)
login = fields.Char(string="Login") login = fields.Char(string="Login")
password = fields.Char(string="Password") password = fields.Char(string="Password")
barcode = fields.Char(string="Barcode") barcode = fields.Char(string="Barcode")
@ -66,8 +68,16 @@ class ValidateAttendanceSheet(models.TransientModel):
default=_get_warning_regular_workers, default=_get_warning_regular_workers,
help="Is any regular worker doing its regular shift as an added one ?", help="Is any regular worker doing its regular shift as an added one ?",
) )
notes = fields.Text(related="active_sheet.notes", default="")
feedback = fields.Text(related="active_sheet.feedback", default="")
notes = fields.Text(
related="active_sheet.notes",
string="Notes about the attendance for the Members Office",
default="",
)
feedback = fields.Text(
related="active_sheet.feedback",
string="Comments about the shift",
default="",
)
worker_nb_feedback = fields.Selection( worker_nb_feedback = fields.Selection(
related="active_sheet.worker_nb_feedback" related="active_sheet.worker_nb_feedback"
) )
@ -87,7 +97,9 @@ class ValidateAttendanceSheet(models.TransientModel):
sheet = self.active_sheet sheet = self.active_sheet
if not self.worker_nb_feedback: if not self.worker_nb_feedback:
raise UserError(_("Please give your feedback on the number of workers."))
raise UserError(
_("Please give your feedback on the number of workers.")
)
if self.card_support: if self.card_support:
# Login with barcode # Login with barcode

2
beesdoo_shift/wizard/validate_attendance_sheet.xml

@ -35,7 +35,7 @@
<footer> <footer>
<button type="object" <button type="object"
name="validate_sheet" name="validate_sheet"
string="Comment and validate"
string="Validate"
class="oe_highlight" class="oe_highlight"
/> />
<button type="object" name="save" <button type="object" name="save"

Loading…
Cancel
Save