Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
T
third-party
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • cooperatic-foodcoops
  • third-party
  • Merge Requests
  • !205

Merged
Opened Oct 08, 2022 by Yvon Kerdoncuff@Yvon 
  • Report abuse
Report abuse

give explanation when you add or delete makeup and display it point movements screen in odoo

  • Discussion 10
  • Commits 4
  • Pipelines 4
  • Changes 3
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Damien Moulard
    @DamienM started a discussion on an old version of the diff Oct 12, 2022
    Resolved by Damien Moulard Oct 13, 2022
    members/static/js/admin/manage_makeups.js
    151 151 const member = makeups_members.find(m => m.id == member_id);
    152 152
    153 153 openModal(
    154 `Enlever un rattrapage à ${member.name} ?`,
    154 `Enlever un rattrapage à ${member.name} ?
    155 <br><br><label>Explication : </label><input class="" type="text" id="decr-explanation">
    • Damien Moulard @DamienM commented Oct 12, 2022
      Developer

      Habituellement on utilise un système de templates pour les modales, pour éviter de rajouter trop d'HTML depuis le JS.

      Par exemple tu peux voir dans templates/members/admin/manage_regular_shifts.html la div <div id="templates" style="display:none;"> qui contient différentes templates. Ensuite dans le js on récupère le contenu de la template qui nous intéresse en insérant les données dynamiques (voir manage_regular_shifts.js ligne 106 par exemple)

      Edited Oct 12, 2022 by Damien Moulard
      Habituellement on utilise un système de templates pour les modales, pour éviter de rajouter trop d'HTML depuis le JS. Par exemple tu peux voir dans `templates/members/admin/manage_regular_shifts.html` la div `<div id="templates" style="display:none;">` qui contient différentes templates. Ensuite dans le js on récupère le contenu de la template qui nous intéresse en insérant les données dynamiques (voir `manage_regular_shifts.js` ligne 106 par exemple)
    • Yvon Kerdoncuff @Yvon

      changed this line in version 2 of the diff

      Oct 13, 2022

      changed this line in version 2 of the diff

      changed this line in [version 2 of the diff](https://gl.cooperatic.fr/cooperatic-foodcoops/third-party/merge_requests/205/diffs?diff_id=1839&start_sha=39e18e62beb14ce77f30764f24ee753122b4651a#34892f05a25cfb3fd8a30d99c63ee6aedfa3ea3d_155_158)
      Toggle commit list
    Please register or sign in to reply
  • Damien Moulard @DamienM commented Oct 12, 2022
    Developer

    Il faudrait je pense mettre un message par défaut si les champs ne sont pas remplis, sinon voilà ce qui s'affiche dans Odoo : image Le message par défaut pourrait être le message qu'il y avait avant.

    Il faudrait je pense mettre un message par défaut si les champs ne sont pas remplis, sinon voilà ce qui s'affiche dans Odoo : ![image](/uploads/7897e54abcd6fdb22a2072832e863961/image.png) Le message par défaut pourrait être le message qu'il y avait avant.
  • Yvon Kerdoncuff @Yvon

    added 1 commit

    • d5b889ca - move html out of js and write default message and signature if none provided

    Compare with previous version

    Oct 13, 2022

    added 1 commit

    • d5b889ca - move html out of js and write default message and signature if none provided

    Compare with previous version

    added 1 commit <ul><li>d5b889ca - move html out of js and write default message and signature if none provided</li></ul> [Compare with previous version](https://gl.cooperatic.fr/cooperatic-foodcoops/third-party/merge_requests/205/diffs?diff_id=1839&start_sha=39e18e62beb14ce77f30764f24ee753122b4651a)
    Toggle commit list
  • Yvon Kerdoncuff @Yvon commented Oct 13, 2022
    Master

    Hello, merci pour tes remarques, j'ai pushé les améliorations proposées.

    Hello, merci pour tes remarques, j'ai pushé les améliorations proposées.
  • Damien Moulard
    @DamienM started a discussion on an old version of the diff Oct 13, 2022
    Resolved by Damien Moulard Oct 13, 2022
    members/static/js/admin/manage_makeups.js
    332 354 });
    333 355
    334 356 openModal(
    335 `Ajouter un rattrapage à ${member.name} ?`,
    357 `Ajouter un rattrapage à ${member.name} ?
    358 <br><br><label>Explication : </label><input class="" type="text" id="incr-explanation">
    • Damien Moulard @DamienM commented Oct 13, 2022
      Developer

      tu as oublié celle-ci !

      tu as oublié celle-ci !
    • Yvon Kerdoncuff @Yvon

      changed this line in version 3 of the diff

      Oct 13, 2022

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gl.cooperatic.fr/cooperatic-foodcoops/third-party/merge_requests/205/diffs?diff_id=1842&start_sha=d5b889ca3e13d9ceb42b4b3c63284380ba6e6f88#34892f05a25cfb3fd8a30d99c63ee6aedfa3ea3d_358_361)
      Toggle commit list
    Please register or sign in to reply
  • Damien Moulard
    @DamienM started a discussion on an old version of the diff Oct 13, 2022
    Resolved by Damien Moulard Oct 13, 2022
    members/static/js/admin/manage_makeups.js
    150 150
    151 151 const member = makeups_members.find(m => m.id == member_id);
    152 152
    153 let modal_template = $("#modal_decr_makeup_counter");
    154
    155 modal_template.find(".member_name").text(member.name);
    156
    153 157 openModal(
    154 `Enlever un rattrapage à ${member.name} ?`,
    158 modal_template.html(),
    155 159 () => {
    156 update_members_makeups([member_id], "decrement");
    160 update_members_makeups(
    161 [member_id],
    162 "decrement",
    163 ($("#decr-signature")[0].value || "pas d'explication") + ' : ' + ($("#decr-explanation")[0].value || "auteur inconnu")
    • Damien Moulard @DamienM commented Oct 13, 2022
      Developer

      tu as inversé ici : #decr-signature est associé à "pas d'explication"; et #decr-explanation à "auteur inconnu"

      tu as inversé ici : `#decr-signature` est associé à `"pas d'explication"`; et `#decr-explanation` à `"auteur inconnu"`
    • Yvon Kerdoncuff @Yvon

      changed this line in version 3 of the diff

      Oct 13, 2022

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gl.cooperatic.fr/cooperatic-foodcoops/third-party/merge_requests/205/diffs?diff_id=1842&start_sha=d5b889ca3e13d9ceb42b4b3c63284380ba6e6f88#34892f05a25cfb3fd8a30d99c63ee6aedfa3ea3d_163_163)
      Toggle commit list
    Please register or sign in to reply
  • Damien Moulard
    @DamienM started a discussion on an old version of the diff Oct 13, 2022
    Resolved by Damien Moulard Oct 13, 2022
    members/static/js/admin/manage_makeups.js
    167 175
    168 176 const member = makeups_members.find(m => m.id == member_id);
    169 177
    178 let modal_template = $("#modal_incr_makeup_counter");
    179
    180 modal_template.find(".member_name").text(member.name);
    181
    170 182 openModal(
    171 `Ajouter un rattrapage à ${member.name} ?`,
    183 modal_template.html(),
    172 184 () => {
    173 update_members_makeups([member_id], "increment");
    185 update_members_makeups(
    186 [member_id],
    187 "increment",
    188 ($("#incr-signature")[0].value || "pas d'explication") + ' : ' + ($("#incr-explanation")[0].value || "auteur inconnu")
    • Damien Moulard @DamienM commented Oct 13, 2022
      Developer

      idem

      idem
    • Yvon Kerdoncuff @Yvon

      changed this line in version 3 of the diff

      Oct 13, 2022

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gl.cooperatic.fr/cooperatic-foodcoops/third-party/merge_requests/205/diffs?diff_id=1842&start_sha=d5b889ca3e13d9ceb42b4b3c63284380ba6e6f88#34892f05a25cfb3fd8a30d99c63ee6aedfa3ea3d_188_188)
      Toggle commit list
    Please register or sign in to reply
  • Damien Moulard
    @DamienM started a discussion on an old version of the diff Oct 13, 2022
    Resolved by Damien Moulard Oct 13, 2022
    members/static/js/admin/manage_makeups.js
    198 214 if (first_select) {
    199 215 $("#decrement_selected_members_makeups").on("click", () => {
    200 216 openModal(
    201 `Enlever un rattrapage aux membres sélectionnés ?`,
    217 $("#modal_decr_selected_makeup_counter").html(),
    202 218 () => {
    203 update_members_makeups(selected_rows, "decrement");
    219 update_members_makeups(
    220 selected_rows,
    221 "decrement",
    222 ($("#decr-signature-selected")[0].value || "pas d'explication") + ' : ' + ($("#decr-explanation-selected")[0].value || "auteur inconnu")
    • Damien Moulard @DamienM commented Oct 13, 2022
      Developer

      idem

      idem
    • Yvon Kerdoncuff @Yvon

      changed this line in version 3 of the diff

      Oct 13, 2022

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gl.cooperatic.fr/cooperatic-foodcoops/third-party/merge_requests/205/diffs?diff_id=1842&start_sha=d5b889ca3e13d9ceb42b4b3c63284380ba6e6f88#34892f05a25cfb3fd8a30d99c63ee6aedfa3ea3d_222_222)
      Toggle commit list
    Please register or sign in to reply
  • Damien Moulard
    @DamienM started a discussion on an old version of the diff Oct 13, 2022
    Resolved by Damien Moulard Oct 13, 2022
    members/static/js/admin/manage_makeups.js
    332 354 });
    333 355
    334 356 openModal(
    335 `Ajouter un rattrapage à ${member.name} ?`,
    357 `Ajouter un rattrapage à ${member.name} ?
    358 <br><br><label>Explication : </label><input class="" type="text" id="incr-explanation">
    359 <br><br><label>Signature : </label><input class="" type="text" id="incr-signature">`,
    336 360 () => {
    337 update_members_makeups([member.id], "increment");
    361 update_members_makeups(
    362 [member.id],
    363 "increment",
    364 $("#incr-signature")[0].value + ' : ' + $("#incr-explanation")[0].value
    • Damien Moulard @DamienM commented Oct 13, 2022
      Developer

      à rajouter ici aussi !

      à rajouter ici aussi !
    • Yvon Kerdoncuff @Yvon

      changed this line in version 3 of the diff

      Oct 13, 2022

      changed this line in version 3 of the diff

      changed this line in [version 3 of the diff](https://gl.cooperatic.fr/cooperatic-foodcoops/third-party/merge_requests/205/diffs?diff_id=1842&start_sha=d5b889ca3e13d9ceb42b4b3c63284380ba6e6f88#34892f05a25cfb3fd8a30d99c63ee6aedfa3ea3d_364_366)
      Toggle commit list
    Please register or sign in to reply
  • Damien Moulard @DamienM commented Oct 13, 2022
    Developer

    Il y a aussi des merge conflicts. N'hésite pas à me demander si tu n'es pas sûr sur un conflit !

    Il y a aussi des merge conflicts. N'hésite pas à me demander si tu n'es pas sûr sur un conflit !
  • Yvon Kerdoncuff @Yvon

    added 1 commit

    • e097f04a - reverse pas d'explication and auteur inconnu and properly get rid of html in js where forgot

    Compare with previous version

    Oct 13, 2022

    added 1 commit

    • e097f04a - reverse pas d'explication and auteur inconnu and properly get rid of html in js where forgot

    Compare with previous version

    added 1 commit <ul><li>e097f04a - reverse pas d&#39;explication and auteur inconnu and properly get rid of html in js where forgot</li></ul> [Compare with previous version](https://gl.cooperatic.fr/cooperatic-foodcoops/third-party/merge_requests/205/diffs?diff_id=1842&start_sha=d5b889ca3e13d9ceb42b4b3c63284380ba6e6f88)
    Toggle commit list
  • Yvon Kerdoncuff @Yvon

    added 13 commits

    • e097f04a...326486b1 - 12 commits from branch dev_cooperatic
    • 76290dbe - Merge branch 'dev_cooperatic' into…

    Compare with previous version

    Oct 13, 2022

    added 13 commits

    • e097f04a...326486b1 - 12 commits from branch dev_cooperatic
    • 76290dbe - Merge branch 'dev_cooperatic' into…

    Compare with previous version

    added 13 commits <ul><li>e097f04a...326486b1 - 12 commits from branch <code>dev_cooperatic</code></li><li>76290dbe - Merge branch &#39;dev_cooperatic&#39; into…</li></ul> [Compare with previous version](https://gl.cooperatic.fr/cooperatic-foodcoops/third-party/merge_requests/205/diffs?diff_id=1843&start_sha=e097f04acbd11007d83dd166e3c5c326edb7660a)
    Toggle commit list
  • Yvon Kerdoncuff @Yvon commented Oct 13, 2022
    Master

    Olala je fais n'imp... merci, et c'est bon pour le merge aussi. J'ai pushé.

    Olala je fais n'imp... merci, et c'est bon pour le merge aussi. J'ai pushé.
  • Damien Moulard @DamienM

    resolved all discussions

    Oct 13, 2022

    resolved all discussions

    resolved all discussions
    Toggle commit list
  • Damien Moulard @DamienM

    merged

    Oct 13, 2022

    merged

    merged
    Toggle commit list
  • Damien Moulard @DamienM

    mentioned in commit 90a84df1

    Oct 13, 2022

    mentioned in commit 90a84df1

    mentioned in commit 90a84df1706a72bf616c918ce5fea9149197a17d
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
Reference: cooperatic-foodcoops/third-party!205
×

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.
×

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.