Skip to content
Snippets Groups Projects
  1. Nov 17, 2020
  2. Nov 18, 2020
  3. Nov 17, 2020
  4. Nov 18, 2020
    • Goffin Simon's avatar
      [FIX] website: Delete the current website · ae6515a5
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Delete the current website
      - Go to homepage
      
      Bug:
      
      An error 500 was displayrd
      
      opw:2381929
      
      closes odoo/odoo#61849
      
      X-original-commit: 0e7faad49ed78f5def56d9af90c383cbbfa42e9f
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      ae6515a5
    • Pierre Masereel's avatar
      [FIX] point_of_sale: avoid trouble when no chart template installed · 17bc5d31
      Pierre Masereel authored
      
      When a session is created and no orders can be created because of
      misconfiguration. We should be able to close the session.
      
      When a chart of account is installed, we should not try to create
      payment methods on config that have active session as it is forbidden.
      
      Check that there is at least one payment method configured when
      launching a session.
      
      closes odoo/odoo#61933
      
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      17bc5d31
    • Thibault Francois's avatar
      [FIX] sale_project: Fix access error on action read · ff43c875
      Thibault Francois authored
      
      Problem
      -------
      When a sale order has more than one task within the same project
      clicking on X tasks lead to an access error since regular user
      cannot read action anymore
      
      Solution
      ---------
      use _for_xml_id method to fetch action data
      
      closes odoo/odoo#61928
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      ff43c875
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] stock: avoid recomputing qty_to_order when not in scheduler · 0d4ab53b
      Andrea Grazioso (agr-odoo) authored
      
      Configure a reorder rule and a restock route for a product A
      Go to Inventory / Operations / Replenishment
      Remove all filters, find product A and under column 'To Order' input a
      quantity, then hit the button 'Order Once'
      
      The user quantity will be overwritten by the '_compute_qty_to_order'.
      This is a fine tuning of f5054446
      
      opw-2375317
      
      closes odoo/odoo#61884
      
      Signed-off-by: default avataragr-odoo <agr-odoo@users.noreply.github.com>
      0d4ab53b
    • Odoo's Mergebot's avatar
      [FIX] website: align website dashboard actions and list view · d66063ea
      Odoo's Mergebot authored
      
      Before this commit, click on a button stat from the website dashboard, don't always respect the current filter.
      
      Date filter was missing, website_id wrongly filtered, or domain not exactly the same.
      
      Now, we try to align the dashboard data with the actions.
      
      opw-2369420
      Fixes #44926, fixes #51125
      
      closes odoo/odoo#61883
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      Signed-off-by: default avatarRomain Derie <rdeodoo@users.noreply.github.com>
      Unverified
      d66063ea
    • Romain Derie's avatar
      [FIX] website_sale: align dashboard data · 23e65d70
      Romain Derie authored
      Before this commit, the python domain on sale.report would not get today's data
      as it would do `date >= 2020-03-03`, but it means `2020-03-03 00:00:00`,
      actually excluding today.
      Then the JS domains to retrieve those data once you click on the metric (it
      loads an act window with his domain + additional domain though js) would have
      a different date domain, including today.
      
      Note that there is still some inconsistencies between python and JS such as
      last month filter which is in python (in template filter) today - 30 days
      while in JS it is moment.subtract 1 month which might be 31 days.
      23e65d70
    • Romain Derie's avatar
      [FIX] website_sale: restore date filters · 0fd1a8ce
      Romain Derie authored
      Those were removed with f9874b2b and restored in 14.0 (master at that point) with cc6000ab.
      
      This commit restores the missing filters for the context filters to work on
      the view used in stable.
      0fd1a8ce
    • Romain Derie's avatar
      [FIX] website_sale: align domain from route and act window · b31abe06
      Romain Derie authored
      Act window domain are used to load tree view data when clicking on dashboard
      metric.
      That metric is retrieved through domain in backend.
      
      This domain part wasn't adapted in act window domain (can't use ref).
      As searching on website is enough to get ecommerce order, this line can be
      safely removed, it is an old code that was needed before website_id was set on
      order, as it can be noticed in f6fc7c23.
      b31abe06
    • Romain Derie's avatar
      [FIX] website_sale: make dashboard action domain same as displayed data · 84a759af
      Romain Derie authored
      The metrics displayed on the dashboard are retrieved through a domain used in
      `fetch_dashboard_data()` route.
      When clicking on one of those metrics, an action is called with a domain.
      
      This commit fixes incoherences between those domains.
      
      task-2369420
      84a759af
    • Romain Derie's avatar
      [FIX] website: use correct action domain on dashboard · 06f95478
      Romain Derie authored
      Without this commit, when clicking on a metric on the website dashboard, it
      would not load the correct data.
      Indeed, the dashboard is loaded for a specific website only, but clicking on a
      metric opens the data for every website together.
      
      Step to reproduce:
        - Make some orders on 2 differents website ecommerce
        - OPTIONAL: Get through the payment on some orders, then just leave some
          products in the cart afterward to have some unpaid orders
        - Go to the website dashboard, you see some metrics
        - Change the selected website on top right, you see the metrics adapts
          correctly
        - Click on a metric, it doesn't fit the number you clicked on. For instance,
          if you had 1 Unpaid Orders for website 1 and 3 Unpaid Orders for website 2,
          you see 4 orders in the tree view once you have clicked the metric.
      
      This commit ensures the correct website is appended to every dashboard action
      domain.
      
      opw-2369420
      Fixes #44926, fixes #51125
      06f95478
    • Nicolas Martinelli's avatar
      [IMP] project: kanban label in tasks tree · 26e26181
      Nicolas Martinelli authored
      
      Some projects may not need the tags, while others use the state heavily.
      This makes both fields available and optional.
      
      closes odoo/odoo#61924
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      26e26181
  5. Nov 17, 2020
  6. Nov 18, 2020
    • Aaron Bohy's avatar
      [FIX] web: race condition with x2many control panel · e8e64f75
      Aaron Bohy authored
      The ControlPanel has been converted in Owl [1], and the code using
      it has been adapted accordingly. However, in the FieldX2Many, we
      didn't properly wait for the ControlPanel to be updated (an update
      of the ControlPanel was synchronous before owl, and is now async,
      like every Owl renderings, as it waits for the nextAnimationFrame).
      
      As a consequence, we might have tricky issues because the mounted
      hook of the control panel might be called multiple times for a
      single call to willUnmount later on. In mobile, we bind a global
      event handler (on scroll) in mounted, and unbind it in willUnmount,
      so we had leftover event handlers, that crashed when called after
      the ControlPanel was destroyed. Note that even if the issue popped
      in mobile, calling mounted on already mounted Components isn't a
      good idea, and this should be fixed anyway.
      
      The issue could be reproduced for instance in FieldService (with
      collaborative pads activated in Project), in mobile, by opening
      a task in Edit mode. Then, you might get a traceback by scrolling
      after having discarded the edition
      
      Here is a description of what technically happened:
       - when clicking on Edit, all widgets (including the FieldX2Many
         are destroyed and re-instantiated in 'edit' mode).
       - the pad widget directly triggers a field_changed event which
         causes a reset of the FieldX2Many (i.e. 'render' is called
         again)
       - the FieldX2Many detects that it already has a renderer (and a
         ControlPanel) so it updates them
       - it first updates the renderer, and when it's done, it updates
         the ControlPanel BUT doesn't wait for its promise, so the
         promise returned by that call to 'render' in FieldX2Many is
         resolved before the ControlPanel is actually updated
       - note that at this point, all thoses new widgets are not in the
         DOM yet
       - when all widgets are ready, the renderer patches the view (i.e.
         the former content is removed from the DOM, and the new one is
         attached into the DOM). As soon as this is done, the renderer
         calls 'on_attach_callback' on its children, including the
         FieldX2Many, which leads to a call to 'mounted' on the CP.
       - then, just before the nextAnimationFrame, Owl complete the
         rendering of the CP, and detects that it is now in the DOM (it
         wasn't at the beginning), so 'mounted' is called a second time,
         will cause the issue described above.
      
      This commit fixes the issue by properly waiting for the CP to be
      rendered in the FieldX2Many. However, this required on cascade
      changes:
       - Form view renderings with a FieldX2Many are now *really* async
         (+- 16ms), meaning that the user can easily trigger concurrent
         renderings by, e.g. clicking quickly several times on 'Edit',
         'Save' or 'Discard'. Concurrent renderings are properly handled
         so to prevent this from happening, we disable the buttons and
         re-enable them when the rendering is done (like already done in
         [2])
       - in the FieldX2Many, '_updateControlPanel' was called at several
         placed, but we never waited for it. As this method was
         originally sync, its calls have probably been naively adapted,
         whereas their should have been deeply rethought (for instance,
         as it is async, and we need to wait for it, we don't want it
         to be called multiple times sequentially when something happens).
         This commit does that work, i.e. we clean the places where this
         function is called such that it is (hopefully) never called
         sequentially twice. To do so, we changed a bit the spec of the
         pager in multi page, and we also fixed a paging-related  bug.
         In a few words, here is what we did/do when adding a new row
         in the bottom of a full page:
           - before: tweak the count in the data to fool the pager and
             make it think that no new record has been added (so
             basically, let it display something wrong)
           - now: temporarily increase the pager limit so that the new
             record is displayed on the current pager, and the pager
             values are correct w.r.t. the displayed records.
          Some tests needed to be adapted accordingly.
       - By waiting for the ControlPanel when updating the FieldX2Many,
         a bunch of QUnit tests failed. Those tests have something in
         common: they spawn an X2Many (list or kanban theoretically,
         but always list in practice) containing a FieldBoolean (only
         field widget of /web converted in owl). When the FieldX2Many
         is updated, we update the renderer (i.e. re-renderer the
         FieldBoolean, so we have to wait for the nextAnimationFrame),
         and when this is done, we update the page (again, we have
         to wait for the nextAnimationFrame). So basically, we have
         to wait for two nextAnimationFrames to see the result in the
         DOM. For this, we added a new test util which basically does
         a nextTick ('owlCompatibilityNextTick'), and called it
         everywhere it was necessary. When everything will be written
         in Owl, we could get rid of this util and its calls.
      
      [1] https://github.com/odoo/odoo/commit/fbf347498f1cc7b74ef373179b7bcae201715c24
      [2] https://github.com/odoo/odoo/commit/39f08950d6e20460e3a20a5b9c33e4ddf66dce78
      
      
      
      closes odoo/odoo#61593
      
      Signed-off-by: default avatarAdrien Dieudonné (adr) <adr@odoo.com>
      e8e64f75
    • Kevin Baptiste's avatar
      [IMP] project: simplify project quick creation · 64ec3127
      Kevin Baptiste authored
      
      Removed all the settings related to billable projects in the quick
      create dialog. There were too many settings which slowed down the quick
      creation of a project.
      
      closes odoo/odoo#61568
      
      Taskid: 2376401
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      64ec3127
  7. Nov 17, 2020
    • ppr-odoo's avatar
      [FIX] hr_holidays: fix traceback to add timezone · 05c373a9
      ppr-odoo authored
      
      Currently, Traceback occurs when we do timezone filters in every one
      report of time off because the timezone is non-stored compute field in
      hr leave model.
      
      So in this commit, get the timzone value based on compute field from
      resource or timezone of the current company's calendar OR user's tz
      and at last 'UTC'.
      
      closes odoo/odoo#57597
      
      Taskid: 2334866
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      05c373a9
  8. Oct 20, 2020
    • Mahendra Barad's avatar
      [FIX] calendar_sms: Fix traceback on 'send SMS to attendee' · 200ab9fd
      Mahendra Barad authored
      
      Currently, when go to calendar > list view > action > send sms
      to attendees, it will generate the the traceback because default
      composition_mode is comment while when you process through the
      list then sms_composition mode should be 'mass'.
      
      So in this commit, pass the sms_composition_mode as 'guess' so
      it will automatically check the record and take the correct
      composition mode and also pass the active_ids as res_ids.
      
      closes odoo/odoo#60330
      
      Taskid: 2344284
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      200ab9fd
  9. Nov 17, 2020
  10. Oct 23, 2020
  11. Nov 17, 2020
  12. Nov 12, 2020
    • Arnaud Joset's avatar
      [FIX] payment_test: fix token name. · a0e012f1
      Arnaud Joset authored
      
      This commit fixes two bugs with payment_test:
      
      First:
      Before, payment test would create token without a name.
      
      When you tried to pay your subscription on the portal with these, the following error would occurs:
      
      ```
      Error to render compiling AST
      AttributeError: 'bool' object has no attribute 'replace'
      Template: sale_subscription.subscription
      Path: /t/t[2]/div/t/t[2]/ul/li[1]/div[3]/t
      Node: <t t-esc="account.payment_token_id.short_name"/>
      
      The error occured while rendering the template sale_subscription.subscription and evaluating the following expression: <t t-esc="account.payment_token_id.short_name"/>
      ```
      
      This commit add a distinct name for these token to avoid errors and confusion.
      
      Secondly,
      
      Before this commit when user tried to make a payment with the payment_test acquirer, the callback method was never called.
      This had an impact on module where the callback method is used (mostly subscription).
      
      closes odoo/odoo#60510
      
      Taskid: 2367508
      Related: odoo/enterprise#14329
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      a0e012f1
  13. Nov 17, 2020
  14. Nov 10, 2020
    • Goffin Simon's avatar
      [FIX] sale_timesheet: Non billable task in project Overview · 46d254e7
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider a product P with price=100€, Timesheets on tasks and Create a task in sales order's project
      - Create a SO with 1 P and confirm it
      - A project PR and a task T have been created
      - Assign an employee E to T and record 01:00 hour
      - Create an invoice I from the SO and confirm I
      - Go to the project overview of the SO
      
      Bug:
      
      100€ was counted twice in Non billable task and in Billed on Timesheets
      
      PS:
      
      When validating I, an analytic line L is created and L is not linked to PR.
      That's why 100€ was counted twice because L was counted once in the 'Invoiced' part
      and once in the 'Other revenue'
      
      opw:2370418
      
      closes odoo/odoo#61433
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      46d254e7
Loading