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.

471 lines
19 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
[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
[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
[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
[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
[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
[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
[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
[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
[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. # -*- coding: utf8 -*-
  2. # Copyright 2017-2018 Rémy Taymans <remytaymans@gmail.com>
  3. # Copyright 2017-2018 Thibault François
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  5. from ast import literal_eval
  6. from datetime import datetime, timedelta
  7. from itertools import groupby
  8. from pytz import timezone, utc
  9. from openerp import http, fields
  10. from openerp.http import request
  11. from openerp.addons.beesdoo_shift.models.planning import float_to_time
  12. from openerp.addons.beesdoo_shift.models.cooperative_status import PERIOD
  13. class WebsiteShiftController(http.Controller):
  14. def is_user_worker(self):
  15. user = request.env['res.users'].browse(request.uid)
  16. share_type = user.partner_id.cooperator_type
  17. return share_type == 'share_a'
  18. def is_user_irregular(self):
  19. user = request.env['res.users'].browse(request.uid)
  20. working_mode = user.partner_id.working_mode
  21. return working_mode == 'irregular'
  22. def is_user_regular(self):
  23. user = request.env['res.users'].browse(request.uid)
  24. working_mode = user.partner_id.working_mode
  25. return working_mode == 'regular'
  26. def is_user_regular_without_shift(self):
  27. user = request.env['res.users'].browse(request.uid)
  28. return (not user.partner_id.subscribed_shift_ids.id
  29. and self.is_user_regular())
  30. def is_user_exempted(self):
  31. user = request.env['res.users'].browse(request.uid)
  32. working_mode = user.partner_id.working_mode
  33. return working_mode == 'exempt'
  34. def user_can_subscribe(self, user=None):
  35. """Return True if a user can subscribe to a shift. A user can
  36. subiscribe if:
  37. * the user is an irregular worker
  38. * the user is not unsubscribed
  39. * the user is not resigning
  40. """
  41. if not user:
  42. user = request.env['res.users'].browse(request.uid)
  43. return (user.partner_id.working_mode == 'irregular'
  44. and user.partner_id.state != 'unsubscribed'
  45. and user.partner_id.state != 'resigning')
  46. def add_days(self, datetime, days):
  47. """
  48. Add the number of days to datetime. This take the DST in
  49. account, meaning that the UTC time will be correct even if the
  50. new datetime has cross the DST boundary.
  51. :param datetime: a naive datetime expressed in UTC
  52. :return: a naive datetime expressed in UTC with the added days
  53. """
  54. # Ensure that the datetime given is without a timezone
  55. assert datetime.tzinfo is None
  56. # Get current user and user timezone
  57. # Take user tz, if empty use context tz, if empty use UTC
  58. cur_user = request.env['res.users'].browse(request.uid)
  59. user_tz = utc
  60. if cur_user.tz:
  61. user_tz = timezone(cur_user.tz)
  62. elif request.env.context['tz']:
  63. user_tz = timezone(request.env.context['tz'])
  64. # Convert to UTC
  65. dt_utc = utc.localize(datetime, is_dst=False)
  66. # Convert to user TZ
  67. dt_local = dt_utc.astimezone(user_tz)
  68. # Add the number of days
  69. newdt_local = dt_local + timedelta(days=days)
  70. # If the newdt_local has cross the DST boundary, its tzinfo is
  71. # no longer correct. So it will be replaced by the correct one.
  72. newdt_local = user_tz.localize(newdt_local.replace(tzinfo=None))
  73. # Now the newdt_local has the right DST so it can be converted
  74. # to UTC.
  75. newdt_utc = newdt_local.astimezone(utc)
  76. return newdt_utc.replace(tzinfo=None)
  77. @http.route('/my/shift', auth='user', website=True)
  78. def my_shift(self, **kw):
  79. """
  80. Personal page for managing your shifts
  81. """
  82. if self.is_user_irregular():
  83. return request.render(
  84. 'beesdoo_website_shift.my_shift_irregular_worker',
  85. self.my_shift_irregular_worker(nexturl='/my/shift')
  86. )
  87. if self.is_user_regular_without_shift():
  88. return request.render(
  89. 'beesdoo_website_shift.my_shift_regular_worker_without_shift',
  90. self.my_shift_regular_worker_without_shift()
  91. )
  92. if self.is_user_regular():
  93. return request.render(
  94. 'beesdoo_website_shift.my_shift_regular_worker',
  95. self.my_shift_regular_worker()
  96. )
  97. if self.is_user_exempted():
  98. return request.render(
  99. 'beesdoo_website_shift.my_shift_exempted_worker',
  100. self.my_shift_exempted_worker()
  101. )
  102. if self.is_user_worker():
  103. return request.render(
  104. 'beesdoo_website_shift.my_shift_new_worker',
  105. {}
  106. )
  107. return request.render(
  108. 'beesdoo_website_shift.my_shift_non_worker',
  109. {}
  110. )
  111. @http.route('/shift/<int:shift_id>/subscribe', auth='user', website=True)
  112. def subscribe_to_shift(self, shift_id=-1, **kw):
  113. """
  114. Subscribe the current connected user into the given shift
  115. This is done only if :
  116. * shift sign up is authorised via configuration panel
  117. * the user can subscribe
  118. * the given shift exist
  119. * the shift status is open
  120. * the shift is free for subscription
  121. * the shift is starting in more than 20 minutes
  122. """
  123. # Get current user
  124. cur_user = request.env['res.users'].browse(request.uid)
  125. # Get the shift
  126. shift = request.env['beesdoo.shift.shift'].sudo().browse(shift_id)
  127. # Get config
  128. irregular_enable_sign_up = literal_eval(request.env['ir.config_parameter'].get_param(
  129. 'beesdoo_website_shift.irregular_enable_sign_up'))
  130. # Set start time limit
  131. start_time_limit = datetime.now() + timedelta(minutes = 20)
  132. shift_start_time = fields.Datetime.from_string(shift.start_time)
  133. request.session['success'] = False
  134. if (irregular_enable_sign_up
  135. and self.user_can_subscribe()
  136. and shift
  137. and shift.state == "open"
  138. and shift_start_time > start_time_limit
  139. and not shift.worker_id):
  140. shift.worker_id = cur_user.partner_id
  141. request.session['success'] = True
  142. return request.redirect(kw['nexturl'])
  143. @http.route('/shift_irregular_worker', auth='public', website=True)
  144. def public_shift_irregular_worker(self, **kw):
  145. """
  146. Show a public access page that show all the available shifts for irregular worker.
  147. """
  148. nexturl = '/shift_irregular_worker'
  149. irregular_enable_sign_up = False
  150. # Create template context
  151. template_context = {}
  152. template_context.update(self.available_shift_irregular_worker(
  153. irregular_enable_sign_up, nexturl
  154. ))
  155. return request.render(
  156. 'beesdoo_website_shift.public_shift_irregular_worker',
  157. template_context
  158. )
  159. @http.route('/shift_template_regular_worker', auth='public', website=True)
  160. def public_shift_template_regular_worker(self, **kw):
  161. """
  162. Show a public access page that show all the available shift templates for regular worker.
  163. """
  164. # Get all the task template
  165. template = request.env['beesdoo.shift.template']
  166. task_templates = template.sudo().search([], order="planning_id, day_nb_id, start_time")
  167. # Get config
  168. regular_highlight_rule = literal_eval(
  169. request.env['ir.config_parameter'].get_param(
  170. 'beesdoo_website_shift.regular_highlight_rule'
  171. )
  172. )
  173. task_tpls_data = []
  174. for task_tpl in task_templates:
  175. has_enough_workers = (
  176. task_tpl.remaining_worker <= (
  177. task_tpl.worker_nb * regular_highlight_rule / 100
  178. )
  179. )
  180. task_tpls_data.append((task_tpl, has_enough_workers))
  181. return request.render(
  182. 'beesdoo_website_shift.public_shift_template_regular_worker',
  183. {
  184. 'task_tpls_data': task_tpls_data,
  185. 'float_to_time': float_to_time,
  186. }
  187. )
  188. def my_shift_irregular_worker(self, nexturl=""):
  189. """
  190. Return template variables for 'beesdoo_website_shift.my_shift_irregular_worker' template
  191. """
  192. # Get config
  193. irregular_enable_sign_up = literal_eval(request.env['ir.config_parameter'].get_param(
  194. 'beesdoo_website_shift.irregular_enable_sign_up'))
  195. # Create template context
  196. template_context = {}
  197. template_context.update(self.my_shift_worker_status())
  198. template_context.update(self.my_shift_next_shifts())
  199. template_context.update(self.my_shift_past_shifts())
  200. template_context.update(self.available_shift_irregular_worker(
  201. irregular_enable_sign_up and self.user_can_subscribe(), nexturl
  202. ))
  203. # Add feedback about the success or the fail of the subscription
  204. template_context['back_from_subscription'] = False
  205. if 'success' in request.session:
  206. template_context['back_from_subscription'] = True
  207. template_context['success'] = request.session.get('success')
  208. del request.session['success']
  209. return template_context
  210. def my_shift_regular_worker_without_shift(self):
  211. """
  212. Return template variables for 'beesdoo_website_shift.my_shift_regular_worker_without_shift' template
  213. """
  214. return self.my_shift_worker_status()
  215. def my_shift_regular_worker(self):
  216. """
  217. Return template variables for 'beesdoo_website_shift.my_shift_regular_worker' template
  218. """
  219. # Create template context
  220. template_context = {}
  221. # Get all the task template
  222. template = request.env['beesdoo.shift.template']
  223. task_templates = template.sudo().search([], order="planning_id, day_nb_id, start_time")
  224. template_context.update(self.my_shift_worker_status())
  225. template_context.update(self.my_shift_next_shifts())
  226. template_context.update(self.my_shift_past_shifts())
  227. template_context.update(
  228. {
  229. 'task_templates': task_templates,
  230. 'float_to_time': float_to_time,
  231. }
  232. )
  233. return template_context
  234. def my_shift_exempted_worker(self):
  235. """
  236. Return template variables for 'beesdoo_website_shift.my_shift_exempted_worker' template
  237. """
  238. return self.my_shift_worker_status()
  239. def available_shift_irregular_worker(self, irregular_enable_sign_up=False,
  240. nexturl=""):
  241. """
  242. Return template variables for
  243. 'beesdoo_website_shift.available_shift_irregular_worker' template
  244. """
  245. # Get current user
  246. cur_user = request.env['res.users'].browse(request.uid)
  247. # Get all the shifts in the future with no worker
  248. now = datetime.now()
  249. shifts = request.env['beesdoo.shift.shift'].sudo().search(
  250. [('start_time', '>', now.strftime("%Y-%m-%d %H:%M:%S")),
  251. ('worker_id', '=', False),
  252. ('state', '=', 'open')],
  253. order="start_time, task_template_id, task_type_id",
  254. )
  255. # Get shifts where user is subscribed
  256. subscribed_shifts = request.env['beesdoo.shift.shift'].sudo().search(
  257. [('start_time', '>', now.strftime("%Y-%m-%d %H:%M:%S")),
  258. ('worker_id', '=', cur_user.partner_id.id)],
  259. order="start_time, task_template_id, task_type_id",
  260. )
  261. # Get config
  262. irregular_shift_limit = int(
  263. request.env['ir.config_parameter']
  264. .get_param('beesdoo_website_shift.irregular_shift_limit')
  265. )
  266. highlight_rule_pc = int(
  267. request.env['ir.config_parameter']
  268. .get_param('beesdoo_website_shift.highlight_rule_pc')
  269. )
  270. hide_rule = int(
  271. request.env['ir.config_parameter']
  272. .get_param('beesdoo_website_shift.hide_rule')
  273. ) / 100.0
  274. # Grouby task_template_id, if no task_template_id is specified
  275. # then group by start_time, if no start_time specified sort by
  276. # task_type
  277. groupby_iter = groupby(
  278. shifts,
  279. lambda s: (s.task_template_id, s.start_time, s.task_type_id)
  280. )
  281. shifts_count_subscribed = []
  282. nb_displayed_shift = 0 # Number of shift displayed
  283. for (keys, grouped_shifts) in groupby_iter:
  284. (task_template, start_time, task_type) = keys
  285. nb_displayed_shift = nb_displayed_shift + 1
  286. shift_list = list(grouped_shifts)
  287. # Compute available space
  288. free_space = len(shift_list)
  289. # Is the current user subscribed to this task_template
  290. is_subscribed = any(
  291. (sub_shift.task_template_id == task_template and
  292. sub_shift.start_time == start_time and
  293. sub_shift.task_type_id == task_type)
  294. for sub_shift in subscribed_shifts)
  295. # Check the necessary number of worker based on the
  296. # highlight_rule_pc
  297. has_enough_workers = free_space <= (task_template.worker_nb
  298. * highlight_rule_pc) / 100
  299. if free_space >= task_template.worker_nb * hide_rule:
  300. shifts_count_subscribed.append([
  301. shift_list[0],
  302. free_space,
  303. is_subscribed,
  304. has_enough_workers,
  305. ])
  306. # Stop showing shifts if the limit is reached
  307. if irregular_shift_limit > 0 and nb_displayed_shift >= irregular_shift_limit:
  308. break
  309. return {
  310. 'shift_templates': shifts_count_subscribed,
  311. 'nexturl': nexturl,
  312. 'irregular_enable_sign_up': irregular_enable_sign_up,
  313. }
  314. def my_shift_next_shifts(self):
  315. """
  316. Return template variables for 'beesdoo_website_shift.my_shift_next_shifts' template
  317. """
  318. # Get current user
  319. cur_user = request.env['res.users'].browse(request.uid)
  320. # Get shifts where user is subscribed
  321. now = datetime.now()
  322. subscribed_shifts_rec = request.env['beesdoo.shift.shift'].sudo().search(
  323. [('start_time', '>', now.strftime("%Y-%m-%d %H:%M:%S")),
  324. ('worker_id', '=', cur_user.partner_id.id)],
  325. order="start_time, task_template_id, task_type_id",
  326. )
  327. # Create a list of record in order to add new record to it later
  328. subscribed_shifts = []
  329. for rec in subscribed_shifts_rec:
  330. subscribed_shifts.append(rec)
  331. # In case of regular worker, we compute his fictive next shifts
  332. # according to the regular_next_shift_limit
  333. if self.is_user_regular():
  334. # Compute main shift
  335. nb_subscribed_shifts = len(subscribed_shifts)
  336. if nb_subscribed_shifts > 0:
  337. main_shift = subscribed_shifts[-1]
  338. else:
  339. task_template = request.env['beesdoo.shift.template'].sudo().search(
  340. [('worker_ids', 'in', cur_user.partner_id.id)],
  341. limit=1,
  342. )
  343. main_shift = request.env['beesdoo.shift.shift'].sudo().search(
  344. [('task_template_id', '=', task_template[0].id),
  345. ('start_time', '!=', False),
  346. ('end_time', '!=', False)],
  347. order="start_time desc",
  348. limit=1,
  349. )
  350. # Get config
  351. regular_next_shift_limit = int(request.env['ir.config_parameter'].get_param(
  352. 'beesdoo_website_shift.regular_next_shift_limit'))
  353. for i in range(nb_subscribed_shifts, regular_next_shift_limit):
  354. # Create the fictive shift
  355. shift = main_shift.new()
  356. shift.name = main_shift.name
  357. shift.task_template_id = shift.task_template_id
  358. shift.planning_id = main_shift.planning_id
  359. shift.task_type_id = main_shift.task_type_id
  360. shift.worker_id = main_shift.worker_id
  361. shift.state = "draft"
  362. shift.super_coop_id = main_shift.super_coop_id
  363. shift.color = main_shift.color
  364. shift.is_regular = main_shift.is_regular
  365. shift.replaced_id = main_shift.replaced_id
  366. shift.revert_info = main_shift.revert_info
  367. # Set new date
  368. shift.start_time = self.add_days(
  369. fields.Datetime.from_string(main_shift.start_time),
  370. days=i * PERIOD
  371. )
  372. shift.end_time = self.add_days(
  373. fields.Datetime.from_string(main_shift.end_time),
  374. days=i * PERIOD
  375. )
  376. # Add the fictive shift to the list of shift
  377. subscribed_shifts.append(shift)
  378. return {
  379. 'is_regular': self.is_user_regular(),
  380. 'subscribed_shifts': subscribed_shifts,
  381. }
  382. def my_shift_past_shifts(self):
  383. """
  384. Return template variables for 'beesdoo_website_shift.my_shift_past_shifts' template
  385. """
  386. # Get current user
  387. cur_user = request.env['res.users'].browse(request.uid)
  388. # Get config
  389. past_shift_limit = 0
  390. if self.is_user_irregular():
  391. past_shift_limit = int(request.env['ir.config_parameter'].get_param(
  392. 'beesdoo_website_shift.irregular_past_shift_limit'))
  393. if self.is_user_regular():
  394. past_shift_limit = int(request.env['ir.config_parameter'].get_param(
  395. 'beesdoo_website_shift.regular_past_shift_limit'))
  396. # Get shifts where user was subscribed
  397. now = datetime.now()
  398. if past_shift_limit > 0:
  399. past_shifts = request.env['beesdoo.shift.shift'].sudo().search(
  400. [('start_time', '<=', now.strftime("%Y-%m-%d %H:%M:%S")),
  401. ('worker_id', '=', cur_user.partner_id.id)],
  402. order="start_time desc, task_template_id, task_type_id",
  403. limit=past_shift_limit,
  404. )
  405. else:
  406. past_shifts = request.env['beesdoo.shift.shift'].sudo().search(
  407. [('start_time', '<=', now.strftime("%Y-%m-%d %H:%M:%S")),
  408. ('worker_id', '=', cur_user.partner_id.id)],
  409. order="start_time desc, task_template_id, task_type_id",
  410. )
  411. return {
  412. 'past_shifts': past_shifts,
  413. }
  414. def my_shift_worker_status(self):
  415. """
  416. Return template variables for 'beesdoo_website_shift.my_shift_worker_status_*' template
  417. """
  418. cur_user = request.env['res.users'].browse(request.uid)
  419. return {
  420. 'status': cur_user.partner_id.cooperative_status_ids,
  421. }