You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

966 lines
32 KiB

[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
[IMP] website_shift: Refactor and fix bugs (s0030g) [IMP] website_shift: Next shifts for regular Refactor the generation of the next shift for regular worker. Fix: no next shifts shown when the worker is a new worker and doesn't have any past shift Fix: no next shifts shown when the next shift of the worker is not generated yet. [ADD] website_shift: Help texts [FIX] website_shift: Help texts Fix help text for the status based on the input from the members office [IMP] website_shift: Help texts translation Add translation for the help texts. [IMP] website_shift: Future alert date The future alert date has moved to beesdoo_shift module. So we use this one instead of re-compute it in the controller. [IMP] website_shift: Update manifest [FIX] website_shift: Better position for help text On a small screen help texts appear on the top of the page leaving useful info on the bottom. Now help texts is moved on the bottom of the page. [ADD] website_shift: Feedback when subscribing Add a feedback to the user about the successfulness of the subscription. [FIX] website_shift: Super-cooperator info modal The modal showing the super-cooperator information didn't work for the 'fictive' shift generated for regular workers. It's due to the fact that a 'fictive' shift doesn't have an id. So we should not use it to generate xml ids. Instead we use the index of the foreach loop. [FIX] website_shift: Wrong time when crossing DST The issue: There was a time difference of one hour when the fictive shifts cross the DST (Daylight Saving Time). Explanation: Python works with two types of datetime. The datetime without a timezone called *naive* and the one with a timezone called *non-naive*. `timedelta()` is used to add a number of day to a datetime. However, changing a non-naive datetime with `timedelta` just change the date but leave the timezone unchanged. That's no correct because the new date may not be in the same timezone because of the DST. If the new date is after a change of time, due to DST, the timezone of the non-naive datetime should be updated. Python don't do that because `timedelta` doesn't realy add days but add the corresponding hours ! So when adding hours it's consistent to not change the timezone (you can use `normalize()` to get your datetime in the right timezone after a cross of DST). To fix this, after adding a `timedelta` the timezone of the datetime should be set to none and the relocalized with the `localize()` function of the `pytz` corresponding timezone. [FIX] website_shift: Translations
6 years ago
[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2017-2018 Rémy Taymans <remytaymans@gmail.com>
  4. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  5. -->
  6. <openerp>
  7. <!-- Add menu entries -->
  8. <template id="my_shift_link" name="Link to frontend portal" inherit_id="website.layout">
  9. <xpath expr="//li[@id='o_logout']" position="before">
  10. <li><a href="/my/shift" role="menuitem">My Shift</a></li>
  11. </xpath>
  12. </template>
  13. <!-- Reusable templates -->
  14. <template
  15. id="my_shift_title"
  16. name="My Shift Title">
  17. <div class="oe_structure"/>
  18. <section class="wrap">
  19. <div class="container">
  20. <div class="row">
  21. <div class="col-md-12">
  22. <h1 class="text-center">
  23. Your shifts
  24. </h1>
  25. </div>
  26. </div>
  27. </div>
  28. </section>
  29. <div class="oe_structure"/>
  30. </template>
  31. <template
  32. id="my_shift_worker_status_title"
  33. name="My Shift Worker Status Title">
  34. <div class="oe_structure"/>
  35. <section class="wrap">
  36. <div class="container">
  37. <div class="row">
  38. <div class="col-md-12">
  39. <h2>
  40. Worker status
  41. <span t-att-class="'label %s pull-right' % ('label-success' if status.can_shop else 'label-danger',)">
  42. <span class="fa fa-shopping-cart"></span>
  43. <t t-if="status.can_shop">
  44. <span class="fa fa-check"></span>
  45. </t>
  46. <t t-if="not status.can_shop">
  47. <span class="fa fa-times"></span>
  48. </t>
  49. </span>
  50. </h2>
  51. </div>
  52. </div>
  53. </div>
  54. </section>
  55. <div class="oe_structure"/>
  56. </template>
  57. <template
  58. id="my_shift_worker_status_common"
  59. name="My Shift Worker Status Common">
  60. <p>
  61. <label>Working Mode:</label>
  62. <t t-esc="dict(status.fields_get(allfields=['working_mode'])['working_mode']['selection'])[status.working_mode]"/>
  63. </p>
  64. <p t-if="status.super">
  65. You are a Super Cooperator
  66. </p>
  67. <p>
  68. <label>Status:</label>
  69. <t t-esc="dict(status.fields_get(allfields=['status'])['status']['selection'])[status.status]"/>
  70. </p>
  71. <p t-if="status.holiday_start_time and status.holiday_start_time > status.today or status.status == 'holiday'">
  72. <label>Begin of Holiday:</label>
  73. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.holiday_start_time, '%Y-%m-%d'))"/>
  74. </p>
  75. <p t-if="status.holiday_end_time and status.holiday_end_time > status.today or status.status == 'holiday'">
  76. <label>End of Holiday:</label>
  77. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.holiday_end_time, '%Y-%m-%d'))"/>
  78. </p>
  79. </template>
  80. <template
  81. id="shift_status_label"
  82. name="Shift Status Label">
  83. <span t-if="shift.state == 'draft'"
  84. t-attf-class="label label-default {{label_css}}">
  85. <t t-esc="shift.state"/>
  86. </span>
  87. <span t-if="shift.state == 'done'"
  88. t-attf-class="label label-success {{label_css}}">
  89. <t t-esc="shift.state"/>
  90. </span>
  91. <span t-if="shift.state == 'absent_2'"
  92. t-attf-class="label label-warning {{label_css}}">
  93. <t t-esc="shift.state"/>
  94. </span>
  95. <span t-if="shift.state == 'absent_1'"
  96. t-attf-class="label label-info {{label_css}}">
  97. <t t-esc="shift.state"/>
  98. </span>
  99. <span t-if="shift.state == 'absent_0'"
  100. t-attf-class="label label-info {{label_css}}">
  101. <t t-esc="shift.state"/>
  102. </span>
  103. <span t-if="shift.state == 'cancel'"
  104. t-attf-class="label label-danger {{label_css}}">
  105. <t t-esc="shift.state"/>
  106. </span>
  107. </template>
  108. <template
  109. id="my_shift_next_shifts"
  110. name="My Shift : Next Shifts">
  111. <div class="oe_structure"/>
  112. <section class="wrap">
  113. <div class="container">
  114. <div class="row">
  115. <div class="col-md-12">
  116. <h2>
  117. Your next shifts
  118. </h2>
  119. </div>
  120. </div>
  121. </div>
  122. </section>
  123. <div class="oe_structure"/>
  124. <section class="wrap" t-if="is_regular">
  125. <div class="container">
  126. <div class="row">
  127. <div class="col-md-12">
  128. <div class="alert alert-warning">
  129. <strong>Warning !</strong> For the moment public holidays are not taken into account. If your shift
  130. occures during a public holiday, you do not have to do it.
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. </section>
  136. <div class="oe_structure"/>
  137. <div class="visible-xs" t-foreach="subscribed_shifts" t-as="shift">
  138. <div class="panel panel-default">
  139. <div class="panel-heading clearfix">
  140. <div class="panel-title">
  141. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  142. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  143. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  144. <t t-call="beesdoo_website_shift.shift_status_label">
  145. <t t-set="label_css" t-value="'pull-right'"/>
  146. </t>
  147. </div>
  148. </div>
  149. <div class="panel-body">
  150. <t t-esc="shift.task_type_id.name"/>
  151. <button type="button" class="btn btn-default btn-sm pull-right"
  152. t-if="shift.super_coop_id.name"
  153. data-toggle="modal"
  154. t-att-data-target="'#super_coop-shift-%s' % shift_index">
  155. <span class="fa fa-info" aria-hidden="true"></span>
  156. Super Cooperator Info
  157. </button>
  158. </div>
  159. </div>
  160. </div>
  161. <table class="hidden-xs table table-striped" t-if="subscribed_shifts">
  162. <thead>
  163. <tr>
  164. <th>Day</th>
  165. <th>Date</th>
  166. <th>Time</th>
  167. <th>Type of Shift</th>
  168. <th>Status</th>
  169. <th class="text-center">Super Cooperator Info</th>
  170. </tr>
  171. </thead>
  172. <tbody>
  173. <t t-foreach="subscribed_shifts" t-as="shift">
  174. <tr t-att-class="'danger text-danger' if shift.state == 'cancel' else ''">
  175. <td>
  176. <t t-esc="time.strftime('%A', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  177. </td>
  178. <td>
  179. <t t-esc="time.strftime('%d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  180. </td>
  181. <td>
  182. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  183. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  184. </td>
  185. <td>
  186. <t t-esc="shift.task_type_id.name"/>
  187. </td>
  188. <td>
  189. <t t-esc="shift.state"/>
  190. </td>
  191. <td class="text-center">
  192. <button type="button" class="btn btn-default btn-sm"
  193. t-if="shift.super_coop_id.name"
  194. data-toggle="modal"
  195. t-att-data-target="'#super_coop-shift-%s' % shift_index">
  196. <span class="fa fa-info" aria-hidden="true"></span>
  197. </button>
  198. </td>
  199. </tr>
  200. </t>
  201. </tbody>
  202. </table>
  203. <!-- Super Cooperator info modal -->
  204. <t t-foreach="subscribed_shifts" t-as="shift">
  205. <div class="modal fade" t-if="shift.super_coop_id.name" t-att-id="'super_coop-shift-%s' % shift_index" tabindex="-1" role="dialog"
  206. t-att-aria-labelledby="'super_coop-shift-%s-label' % shift_index">
  207. <div class="modal-dialog" role="document">
  208. <div class="modal-content">
  209. <div class="modal-header">
  210. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  211. <span aria-hidden="true">×</span>
  212. </button>
  213. <h4 class="modal-title" t-att-id="'super_coop-shift-%s-label' % shift_index">
  214. <t t-esc="shift.super_coop_id.name"/>
  215. </h4>
  216. </div>
  217. <div class="modal-body">
  218. <i class="fa fa-phone" aria-hidden="true"></i> <t t-esc="shift.super_coop_id.phone"/><br/>
  219. <i class="fa fa-envelope" aria-hidden="true"></i>
  220. <a t-att-href="'mailto:%s' % shift.super_coop_id.email">
  221. <t t-esc="shift.super_coop_id.email"/>
  222. </a>
  223. </div>
  224. <div class="modal-footer">
  225. <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </t>
  231. <section class="wrap" t-if="not subscribed_shifts">
  232. <div class="container">
  233. <div class="row">
  234. <div class="col-md-12">
  235. <div class="alert alert-warning">
  236. <strong>Warning !</strong> You have not yet signed up to a shift.
  237. </div>
  238. </div>
  239. </div>
  240. </div>
  241. </section>
  242. <div class="oe_structure"/>
  243. </template>
  244. <template
  245. id="my_shift_past_shifts"
  246. name="My Shift : Past Shifts">
  247. <div class="oe_structure"/>
  248. <section class="wrap">
  249. <div class="container">
  250. <div class="row">
  251. <div class="col-md-12">
  252. <h2>
  253. Your past shifts
  254. </h2>
  255. </div>
  256. </div>
  257. </div>
  258. </section>
  259. <div class="oe_structure"/>
  260. <div class="visible-xs" t-foreach="past_shifts" t-as="shift">
  261. <div class="panel panel-default">
  262. <div class="panel-heading clearfix">
  263. <div class="panel-title">
  264. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  265. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  266. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  267. <t t-call="beesdoo_website_shift.shift_status_label">
  268. <t t-set="label_css" t-value="'pull-right'"/>
  269. </t>
  270. </div>
  271. </div>
  272. <div class="panel-body">
  273. <t t-esc="shift.task_type_id.name"/>
  274. </div>
  275. </div>
  276. </div>
  277. <table class="hidden-xs table table-striped" t-if="past_shifts">
  278. <thead>
  279. <tr>
  280. <th>Day</th>
  281. <th>Date</th>
  282. <th>Time</th>
  283. <th>Type of Shift</th>
  284. <th>Status</th>
  285. </tr>
  286. </thead>
  287. <tbody>
  288. <t t-foreach="past_shifts" t-as="shift">
  289. <tr>
  290. <td>
  291. <t t-esc="time.strftime('%A', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  292. </td>
  293. <td>
  294. <t t-esc="time.strftime('%d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  295. </td>
  296. <td>
  297. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  298. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  299. </td>
  300. <td>
  301. <t t-esc="shift.task_type_id.name"/>
  302. </td>
  303. <td>
  304. <t t-esc="shift.state"/>
  305. </td>
  306. </tr>
  307. </t>
  308. </tbody>
  309. </table>
  310. <section class="wrap" t-if="not past_shifts">
  311. <div class="container">
  312. <div class="row">
  313. <div class="col-md-12">
  314. <div class="alert alert-info">
  315. <strong>Info !</strong> You don't have any past shift.
  316. </div>
  317. </div>
  318. </div>
  319. </div>
  320. </section>
  321. <div class="oe_structure"/>
  322. </template>
  323. <template
  324. id="available_shift_irregular_worker"
  325. name="Available Shift for Irregular Worker">
  326. <div class="oe_structure"/>
  327. <div class="visible-xs" t-foreach="shift_templates" t-as="shift_count_subscribed">
  328. <t t-set="shift" t-value="shift_count_subscribed[0]" />
  329. <t t-set="count" t-value="shift_count_subscribed[1]" />
  330. <t t-set="is_subscribed" t-value="shift_count_subscribed[2]" />
  331. <t t-set="has_enough_workers" t-value="shift_count_subscribed[3]" />
  332. <t t-set="highlight_class" t-value="'panel-warning' if not has_enough_workers else 'panel-default'"/>
  333. <div t-att-class="'panel %s' % highlight_class">
  334. <div class="panel-heading clearfix">
  335. <div class="panel-title pull-left">
  336. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  337. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  338. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  339. </div>
  340. <div class="label label-default pull-right">
  341. <t t-esc="count"/> space(s)
  342. </div>
  343. </div>
  344. <div class="panel-body clearfix">
  345. <t t-esc="shift.task_type_id.name"/>
  346. <t t-if="is_subscribed">
  347. <div class="label label-success pull-right">
  348. <span class="fa fa-check" aria-hidden="true"></span>
  349. Subscribed
  350. </div>
  351. </t>
  352. <t t-if="irregular_enable_sign_up and not is_subscribed">
  353. <button type="button" class="btn btn-default btn-sm pull-right" data-toggle="modal"
  354. t-att-data-target="'#subscribe-shift-%s' % shift.id">
  355. <span class="fa fa-user-plus" aria-hidden="true"></span>
  356. Subscribe
  357. </button>
  358. </t>
  359. </div>
  360. </div>
  361. </div>
  362. <table class="hidden-xs table table-striped">
  363. <thead>
  364. <tr>
  365. <th>Day</th>
  366. <th>Date</th>
  367. <th>Time</th>
  368. <th>Type of Shift</th>
  369. <th class="text-center">Available Spaces</th>
  370. <th class="text-center" t-if="irregular_enable_sign_up">Subscribed</th>
  371. </tr>
  372. </thead>
  373. <tbody>
  374. <t t-foreach="shift_templates" t-as="shift_count_subscribed">
  375. <t t-set="shift" t-value="shift_count_subscribed[0]" />
  376. <t t-set="count" t-value="shift_count_subscribed[1]" />
  377. <t t-set="is_subscribed" t-value="shift_count_subscribed[2]" />
  378. <t t-set="has_enough_workers" t-value="shift_count_subscribed[3]"/>
  379. <tr t-attf-class="{{ 'warning' if not has_enough_workers else '' }}">
  380. <td>
  381. <t t-esc="time.strftime('%A', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  382. </td>
  383. <td>
  384. <t t-esc="time.strftime('%d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  385. </td>
  386. <td>
  387. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  388. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  389. </td>
  390. <td>
  391. <t t-esc="shift.task_type_id.name"/>
  392. </td>
  393. <td class="text-center">
  394. <t t-esc="count"/>
  395. </td>
  396. <td class="text-center" t-if="irregular_enable_sign_up">
  397. <t t-if="is_subscribed">
  398. <div class="label label-success">
  399. <span class="fa fa-check" aria-hidden="true"></span>
  400. Subscribed
  401. </div>
  402. </t>
  403. <t t-if="not is_subscribed">
  404. <button type="button" class="btn btn-default btn-sm" data-toggle="modal"
  405. t-att-data-target="'#subscribe-shift-%s' % shift.id">
  406. <span class="fa fa-user-plus" aria-hidden="true"></span>
  407. Subscribe
  408. </button>
  409. </t>
  410. </td>
  411. </tr>
  412. </t>
  413. </tbody>
  414. </table>
  415. <!-- Subscribe check -->
  416. <t t-foreach="shift_templates" t-as="shift_count_subscribed">
  417. <t t-set="shift" t-value="shift_count_subscribed[0]" />
  418. <t t-set="count" t-value="shift_count_subscribed[1]" />
  419. <t t-set="is_subscribed" t-value="shift_count_subscribed[2]" />
  420. <div class="modal fade" t-att-id="'subscribe-shift-%s' % shift.id" tabindex="-1" role="dialog"
  421. t-att-aria-labelledby="'subscribe-shift-%s-label' % shift.id">
  422. <div class="modal-dialog" role="document">
  423. <div class="modal-content">
  424. <div class="modal-header">
  425. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  426. <span aria-hidden="true">×</span>
  427. </button>
  428. <h4 class="modal-title" t-att-id="'subscribe-shift-%s-label' % shift.id">
  429. Please confirm subscription
  430. </h4>
  431. </div>
  432. <div class="modal-body">
  433. <t t-esc="time.strftime('%A', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  434. <t t-esc="time.strftime('%d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  435. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  436. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/><br/>
  437. <t t-esc="shift.task_type_id.name"/><br/>
  438. <t t-esc="count"/> available space(s)
  439. </div>
  440. <div class="modal-footer">
  441. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  442. <a class="btn btn-primary"
  443. t-if="irregular_enable_sign_up"
  444. t-att-href="'/shift/%s/subscribe?nexturl=%s' % (shift.id, nexturl)">
  445. Subscribe
  446. </a>
  447. </div>
  448. </div>
  449. </div>
  450. </div>
  451. </t>
  452. <div class="oe_structure"/>
  453. </template>
  454. <!-- Help Texts -->
  455. <template
  456. id="help_text_title"
  457. name="Help Text Title">
  458. <div class="oe_structure"/>
  459. <section class="wrap">
  460. <div class="container">
  461. <div class="row">
  462. <div class="col-md-12">
  463. <h2>
  464. Help
  465. </h2>
  466. </div>
  467. </div>
  468. </div>
  469. </section>
  470. <div class="oe_structure"/>
  471. </template>
  472. <template
  473. id="help_text_common"
  474. name="Help Text Common">
  475. <div class="oe_structure alert alert-info">
  476. <strong>Info!</strong> If you do not agree with your status, please contact the members office by mail (membre@bees-coop.be) or during the open hours of the office (Monday 5PM to 7:30PM, Wednesday 5PM to 7:30 PM and Friday 2:30PM to 5 PM).
  477. </div>
  478. <p class="oe_structure">
  479. Explanation of the status:
  480. </p>
  481. <p class="oe_structure">
  482. <strong>Up To Date:</strong>
  483. That's perfect! You are in order. Thanks a lot. You can come and shop, so can your eaters if you have any.
  484. </p>
  485. </template>
  486. <template
  487. id="help_text_regular_worker"
  488. name="Help Text for Regular Worker">
  489. <p class="oe_structure">
  490. <strong>Alert:</strong>
  491. If you are in alert status, that means you didn't do your last shift. You have
  492. until your next scheduled shift to do your compensation shift according to your situation.
  493. Your compensation is either simple or double. If you don't how how many compensation shifts you have to do, please contact your supercooperator.
  494. To do your compensation shift, no need to subscribe in advance : you come at the beginning of the shift that best suits you.
  495. Add your name and the indication "compensation shift" on the attendance list.
  496. No panic, you still can come and shop, so can your eaters if you have any.
  497. </p>
  498. <p class="oe_structure">
  499. <strong>Suspended:</strong>
  500. If you are suspended, that means you didn't come to a shift and you didn't do you compensation shifts in the delay (4 weeks).
  501. You cannot shop (so as your eaters). But no need to panic : a two-weeks delay is activable on demand at the entrance of the supermarket.
  502. You will be able to shop during 2 more weeks and to put your situation in order.
  503. To do your compensation shift, no need to subscribe in advance : you come at the beginning of the shift that best suits you.
  504. Add your name and the indication "compensation shift" on the attendance list.
  505. </p>
  506. <p class="oe_structure">
  507. <strong>Auto-Extension:</strong>
  508. You didn't manage to do your compensation shifts in the delay but you benefit from the auto-extension.
  509. This is two more weeks to do your compensation shifts. You can shop.
  510. If you don't do your compensation shifts, you'll be suspended.
  511. </p>
  512. <p class="oe_structure">
  513. <strong>Unsubscribed:</strong>
  514. You did not attend two consecutive shifts. You are now unsubscribed. You cannot shop (nor can your eaters) nor come to work.
  515. To subscribe again, please contact membre@bees-coop.be or come to the members office during the opening hours.
  516. </p>
  517. </template>
  518. <template
  519. id="help_text_irregular_worker"
  520. name="Help Text for Irregular Worker">
  521. <p class="oe_structure">
  522. <strong>Alert:</strong>
  523. If you are in alert status, that means you didn't anticipate enough shifts.
  524. Your counter is now negative, directly to -2.
  525. You have 4 weeks to do 2 shifts to be up to date.
  526. For the compensation shifts, subscribe like you do for a normal shift.
  527. Be careful, in addition to these 2 shifts, don't forget to do your normal shift in the same delay to prevent to be in the same situation next month.
  528. </p>
  529. <p class="oe_structure">
  530. <strong>Suspended:</strong>
  531. You did not anticipate enough shifts and you did not come back to a normal situation in the delay.
  532. You cannot shop anymore, nor can your eaters.
  533. But no need to panic : a two-weeks delay is activable on demand at the entrance of the supermarket.
  534. You will be able to shop during 2 more weeks and to put your situation in order.
  535. For the compensation shifts, subscribe like you do for a normal shift.
  536. </p>
  537. <p class="oe_structure">
  538. <strong>Auto-Extension:</strong>
  539. You didn't manage to do your compensation shifts in the delay but you benefit from the auto-extension.
  540. This is two more weeks to do your compensation shifts. You can shop.
  541. If you don't do your compensation shifts, you'll be suspended.
  542. </p>
  543. <p class="oe_structure">
  544. <strong>Unsubscribed:</strong>
  545. Your counter is negative and you haven't come to work for more than 8 weeks.
  546. You are unsubscribed. You cannot shop nor can your eaters.
  547. To subscribe again of if it's a mistake, please contact membre@bees-coop.be or come to the members office during the opening hours.
  548. </p>
  549. </template>
  550. <!-- Shift for non-worker -->
  551. <template
  552. id="my_shift_non_worker"
  553. name="My Shift for Non Worker"
  554. page="True">
  555. <t t-call="website.layout">
  556. <t t-call="beesdoo_website_shift.my_shift_title"/>
  557. <section class="wrap">
  558. <div class="container">
  559. <div class="row">
  560. <div class="col-md-12">
  561. <div class="alert alert-info">
  562. You don't have to participate to shift system.
  563. </div>
  564. </div>
  565. </div>
  566. </div>
  567. </section>
  568. <div class="oe_structure"/>
  569. </t>
  570. </template>
  571. <!-- Shift for new worker -->
  572. <template
  573. id="my_shift_new_worker"
  574. name="My Shift for New Worker"
  575. page="True">
  576. <t t-call="website.layout">
  577. <t t-call="beesdoo_website_shift.my_shift_title"/>
  578. <section class="wrap">
  579. <div class="container">
  580. <div class="row">
  581. <div class="col-md-12">
  582. <div class="alert alert-info">
  583. Please contact the members office to suscribe to shifts.
  584. </div>
  585. </div>
  586. </div>
  587. </div>
  588. </section>
  589. <div class="oe_structure"/>
  590. </t>
  591. </template>
  592. <!-- Shifts Exempted Workers -->
  593. <template
  594. id="my_shift_exempted_worker"
  595. name="My Shifts for Exempted Workers"
  596. page="True">
  597. <t t-call="website.layout">
  598. <t t-call="beesdoo_website_shift.my_shift_title"/>
  599. <section class="wrap">
  600. <div class="container">
  601. <div class="row">
  602. <div class="col-xs-12 col-md-4 pull-right text-justify">
  603. <t t-call="beesdoo_website_shift.my_shift_worker_status_title"/>
  604. <t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
  605. <p t-if="status.exempt_reason_id">
  606. <label>Exempt Reason:</label>
  607. <t t-esc="status.exempt_reason_id.name"/>
  608. </p>
  609. <div class="oe_structure"/>
  610. </div>
  611. <div class="col-xs-12 col-md-8">
  612. <section class="wrap">
  613. <div class="container">
  614. <div class="row">
  615. <div class="col-md-12">
  616. <div class="alert alert-info">
  617. You don't have to participate to shift system.
  618. </div>
  619. </div>
  620. </div>
  621. </div>
  622. </section>
  623. <div class="oe_structure"/>
  624. </div> <!-- col-md-8 -->
  625. </div> <!-- row -->
  626. </div> <!-- container -->
  627. </section>
  628. <div class="oe_structure"/>
  629. </t>
  630. </template>
  631. <!-- Shifts regular worker without shift -->
  632. <template
  633. id="my_shift_regular_worker_without_shift"
  634. name="My Shifts for regular worker without shift"
  635. page="True">
  636. <t t-call="website.layout">
  637. <t t-call="beesdoo_website_shift.my_shift_title"/>
  638. <section class="wrap">
  639. <div class="container">
  640. <div class="row">
  641. <div class="col-xs-12 col-md-4 pull-right text-justify">
  642. <t t-call="beesdoo_website_shift.my_shift_worker_status_title"/>
  643. <t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
  644. <div class="oe_structure"/>
  645. </div>
  646. <div class="col-xs-12 col-md-8">
  647. <section class="wrap">
  648. <div class="container">
  649. <div class="row">
  650. <div class="col-md-12">
  651. <div class="alert alert-info">
  652. Please contact the members office to suscribe to shifts.
  653. </div>
  654. </div>
  655. </div>
  656. </div>
  657. </section>
  658. <div class="oe_structure"/>
  659. </div> <!-- col-md-8 -->
  660. </div> <!-- row -->
  661. </div> <!-- container -->
  662. </section>
  663. <div class="oe_structure"/>
  664. </t>
  665. </template>
  666. <!-- Shifts for Regular Workers -->
  667. <template
  668. id="my_shift_regular_worker"
  669. name="My Shifts for Regular Workers"
  670. page="True">
  671. <t t-call="website.layout">
  672. <t t-call="beesdoo_website_shift.my_shift_title"/>
  673. <section class="wrap">
  674. <div class="container">
  675. <div class="row">
  676. <div class="col-xs-12 col-md-4 pull-right text-justify">
  677. <t t-call="beesdoo_website_shift.my_shift_worker_status_title"/>
  678. <t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
  679. <p t-if="status.sr != 0">
  680. <label>Shift in Advance:</label>
  681. <t t-esc="status.sr"/>
  682. </p>
  683. <p t-if="status.sc != 0">
  684. <label>Compensation Shift:</label>
  685. <t t-esc="status.sc"/>
  686. </p>
  687. <p t-if="status.alert_start_time">
  688. <label>In Alert Since:</label>
  689. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.alert_start_time, '%Y-%m-%d'))"/>
  690. </p>
  691. <p t-if="status.extension_start_time">
  692. <label>In Extension Since:</label>
  693. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.extension_start_time, '%Y-%m-%d'))"/>
  694. </p>
  695. <div class="oe_structure"/>
  696. </div>
  697. <div class="col-xs-12 col-md-8">
  698. <t t-call="beesdoo_website_shift.my_shift_next_shifts"/>
  699. <t t-call="beesdoo_website_shift.my_shift_past_shifts"/>
  700. </div> <!-- col-md-8 -->
  701. <div class="col-xs-12 col-md-4 text-justify">
  702. <div class="oe_structure"/>
  703. <t t-call="beesdoo_website_shift.help_text_title"/>
  704. <t t-call="beesdoo_website_shift.help_text_common"/>
  705. <t t-call="beesdoo_website_shift.help_text_irregular_worker"/>
  706. <div class="oe_structure"/>
  707. </div> <!-- col-md-4 -->
  708. </div> <!-- row -->
  709. </div> <!-- container -->
  710. </section>
  711. <div class="oe_structure"/>
  712. </t>
  713. </template>
  714. <!-- Shifts for Irregular Workers -->
  715. <template
  716. id="my_shift_irregular_worker"
  717. name="Shifts for Irregular Workers"
  718. page="True">
  719. <t t-call="website.layout">
  720. <t t-call="beesdoo_website_shift.my_shift_title"/>
  721. <section class="wrap">
  722. <div class="container">
  723. <div class="row">
  724. <div class="col-xs-12 col-md-4 pull-right text-justify">
  725. <t t-call="beesdoo_website_shift.my_shift_worker_status_title"/>
  726. <t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
  727. <p>
  728. <label>Shift in Advance:</label>
  729. <t t-esc="status.sr"/>
  730. </p>
  731. <p t-if="status.next_countdown_date">
  732. <label>Next Countdown Date:</label>
  733. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.next_countdown_date, '%Y-%m-%d'))"/>
  734. </p>
  735. <p t-if="status.future_alert_date">
  736. <label>Future Date of Alert:</label>
  737. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.future_alert_date, '%Y-%m-%d'))"/>
  738. </p>
  739. <p t-if="status.irregular_absence_date">
  740. <label>Last Absence Date:</label>
  741. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.irregular_absence_date, '%Y-%m-%d'))"/>
  742. </p>
  743. <p t-if="status.irregular_absence_counter">
  744. <label>Number of Absence:</label>
  745. <t t-esc="status.irregular_absence_counter"/>
  746. </p>
  747. <div class="oe_structure"/>
  748. </div>
  749. <div class="col-xs-12 col-md-8">
  750. <div t-if="back_from_subscription"
  751. role="alert"
  752. t-att-class="'alert alert-%s alert-dismissible' % ('success' if success else 'danger',)">
  753. <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  754. <span aria-hidden="true">×</span>
  755. </button>
  756. <t t-if="success">
  757. <strong>Success!</strong> Your subscription has succeded.
  758. </t>
  759. <t t-if="not success">
  760. <strong>Failed!</strong> Your subscription has failed. Someone
  761. subscribed before you or the shift was deleted. Try again in a
  762. moment.
  763. Please note that you can't subscribe <t t-esc="subscription_time_limit"/> minutes before the shift.
  764. </t>
  765. </div>
  766. <t t-call="beesdoo_website_shift.my_shift_next_shifts"/>
  767. <section class="wrap">
  768. <div class="container">
  769. <div class="row">
  770. <div class="col-md-12">
  771. <h2>
  772. Available Shifts
  773. </h2>
  774. </div>
  775. </div>
  776. </div>
  777. </section>
  778. <div class="oe_structure"/>
  779. <section class="wrap">
  780. <div class="container">
  781. <div class="row">
  782. <div class="col-xs-12 col-sm-6 text-justify">
  783. <p>
  784. Please, subscribe, in priority, to the highlighted shifts. To sign up to a shift click on the
  785. subscribe button. Notice that you can not unsubscribe online. To unsubscribe to a shift, please,
  786. contact us.
  787. </p>
  788. </div>
  789. </div>
  790. </div>
  791. </section>
  792. <div class="oe_structure"/>
  793. <t t-call="beesdoo_website_shift.available_shift_irregular_worker"/>
  794. <t t-call="beesdoo_website_shift.my_shift_past_shifts"/>
  795. </div> <!-- col-md-8 -->
  796. <div class="col-xs-12 col-md-4 text-justify">
  797. <div class="oe_structure"/>
  798. <t t-call="beesdoo_website_shift.help_text_title"/>
  799. <t t-call="beesdoo_website_shift.help_text_common"/>
  800. <t t-call="beesdoo_website_shift.help_text_irregular_worker"/>
  801. <div class="oe_structure"/>
  802. </div> <!-- col-md-4 -->
  803. </div> <!-- row -->
  804. </div> <!-- container -->
  805. </section>
  806. <div class="oe_structure"/>
  807. </t>
  808. </template>
  809. </openerp>