Skip to content
Snippets Groups Projects
  1. Feb 01, 2021
    • Christophe Monniez's avatar
      [FIX] packaging: add a bom to nsi script · 3d0871d1
      Christophe Monniez authored
      
      When using the windows installer in French language, the `Hôte` label
      used to configure postgresql server does not display correctly.
      
      The LangString documentation does not specify how to use the special
      characters but after some tests, specifying a BOM for the nsi file seems
      to be the way to go.
      
      closes odoo/odoo#65354
      
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      3d0871d1
    • nie's avatar
      [FIX] account: clearer bank account holder validation message · b76e9ef6
      nie authored
      
      Steps:
      - Go to Accounting > Configuration > Accounting > Bank Accounts
      - Create a new Bank Account
        - "Bank Account" field: create and edit a new one
          - Account Holder: Anyone but your company
      - Save
      
      Bug:
      Validation Error: The holder of a journal's bank account must be the
      company (YourCompany).
      
      Explanation:
      The error is not clear enough. Users may be confused because this
      validation error appears upon saving a "Bank Account Journal"
      (`account.journal`) but is talking about "Partner Bank Account"
      (`res.partner.bank`) which is a field of the "Bank Account Journal".
      
      opw:2448183
      
      closes odoo/odoo#65281
      
      Signed-off-by: default avatarbackspac <backspac@users.noreply.github.com>
      b76e9ef6
  2. Jan 31, 2021
  3. Jan 29, 2021
  4. Dec 09, 2020
  5. Nov 17, 2020
  6. Jan 28, 2021
  7. Jan 19, 2021
  8. Jan 22, 2021
    • Priyanka kakadiya's avatar
      [FIX] project: propagate internal subtypes to tasks · 9c5a79ff
      Priyanka kakadiya authored
      
      Manual backport of commit done in 13.0 odoo/odoo@227c8fb53265de03b202133c4e8012b8bcce01b4
      
      before this commit:
      
      while changing subtypes of the project it was only
      propagating those subtypes to the task, whose parent_id is set.
      internal subtypes are not propagating in the task of a project.
      
      So, filter internal subtypes and concat them with the subtypes which
      have parent_id.
      
      after this commit:
      internal subtypes will also propagate to their tasks
      
      LINKS
      
      Task ID-2205643
      Task ID-2241688
      COM PR #56775
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      9c5a79ff
    • sahista pathan's avatar
      [FIX] mail: correctly update new and removed subtypes when updating subscription · edd40c3d
      sahista pathan authored
      
      Currently, the subtype checked selection is not saved when the user adds and
      removes subtypes. Indeed either an addition is performed, either a removal
      but having both is not correctly taken into account when updating an existing
      subscription.
      
      How to reproduce
        * click on the pencil icon to edit the subscription of the follower;
        * as an example default "Discussions" will be the only one selected;
        * check "Notes" and save;
        * -> this works;
        * click again on the pencil icon and uncheck "Notes" and check "Activities"
          then save;
        * -> this does not work as only removal is performed (Activities is not
          checked);
      
      The problem only occurs when you unchecked subtypes and checked other ones.
      
      This commit fixes that behavior by taking into consideration both new
      subtypes and subtypes to remove.
      
      LINKS
      
      Task ID-2205643
      Task ID-2241688
      COM PR #56775
      
      Co-Authored-By: default avatarThibault Delavallee <tde@odoo.com>
      Co-Authored-By: default avatarShahista Pathan <sat@odoo.com>
      edd40c3d
    • Thibault Delavallée's avatar
      [FIX] mail: fix auto subscribe subtypes computation · 97eb1c64
      Thibault Delavallée authored
      
      Manual backport of commit done in 13.0 odoo/odoo@9e7092a03f6c44287c661e2b39a943d240aa2bde
      
      This commit contains a followup / rewrite / backport of #34150 :
      
        * odoo/odoo@16dd3da
        * odoo/odoo@0b11ed8
      
      Fix: propagate generic internal subtypes from parent to childs with auto
      subscribe.
      
        With this commit, when the user subscribes to internal subtypes like
        activities on a parent record (e.g. a project) then the user follows them
        by default on every sub record creation (e.g. all new tasks of this project).
      
      Fix: do not reset existing subtypes when changing parent of a record using
      auto subscribe mechanism.
      
        With this commit, when changing subtype subscription from a parent record
        (e.g. project) avoid resetting all subtypes subscription on existing sub
        records (e.g. all new tasks of this project). Only new records will use the
        parent chosen subtypes. This is done through propagation of followers
        existing policy (see Follower._insert_followers() for more details);
      
      Note that fix done here is slightly different from the one done in odoo/odoo@16dd3da
      as there was some mismatch with internal model-related subtypes. Thix fix
      will be forward ported and improve the previous one.
      
      Task ID-2205643
      Task ID-2241688
      COM PR #56775
      
      Co-Authored-By: default avatarThibault Delavallee <tde@odoo.com>
      Co-Authored-By: default avatarAlexandre Khun <aku@odoo.com>
      Co-Authored-By: default avatarPriyanka kakadiya <pka@odoo.com>
      97eb1c64
    • Thibault Delavallée's avatar
      [IMP] test_mail: add test for auto subscribe · b1f8ec77
      Thibault Delavallée authored
      
      Manual backport of commit done in 13.0 odoo/odoo@ad210729da4bf72dad77acc4030a38478340f4c6
      
      We recently found a bug about generic internal subtypes not being correctly
      propagated when doing auto subscribe.
      
      For example: subscribe to a project, check an internal subtype like activities.
      Auto subscribe done on project tasks should include actitivities subtype but
      is currently not the case.
      
      This test highlights the issue and a fix will be provided soon. In this test
      we check both
      
        * generic subtype propagation (comment- or activities- like subtypes);
        * model-specific subtype propagation through parent relationship (like
          following New Task on project to follow New on task);
        * internal subtypes not being propagated to portal users;
        * auto subscribe at create with both create and parent follower reasons;
      
      LINKS
      
      Task ID-2205643
      Task ID-2241688
      COM PR #56775
      
      Co-Authored-By: default avatarThibault Delavallee <tde@odoo.com>
      Co-Authored-By: default avatarPriyanka kakadiya <pka@odoo.com>
      b1f8ec77
  9. Jan 26, 2021
  10. Jan 20, 2021
  11. Jan 22, 2021
  12. Jan 24, 2021
  13. Jan 21, 2021
  14. Jan 20, 2021
    • Nicolas Lempereur's avatar
      [FIX] website_event_questions: don't duplicate answers · 5e25f60d
      Nicolas Lempereur authored
      
      The answers are currently added to question from the event_type_id on
      create. This caused that if you duplicated an event, the answers would
      be duplicated since we go through create a second time.
      
      opw-2425120
      closes #64795
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      5e25f60d
    • Daniel Reis's avatar
      [FIX] sale_timesheet: Timesheet based invoicing does not work for subtasks · aa7749b6
      Daniel Reis authored
      
      Steps to reproduce:
      
      1. Enable Project Subtasks
      2. On the "Office Design" Project, select a Task and create a subtask for it
      3. Go to the Project Overview and Create Sales Order
      4. Enter timesheets: 11 hours for the parent task, and 10 hours for the subtask
      5.  On the created Sales Order check the invoiced time
      
      Current behavior:
      The 11 hours form the parent task are shown as delivered in the Sales Order, but the 10 hours from the subtask are not.
      
      Expected behavior:
      Both the parent ans subtask time should be shown as delivered, so that it can be invoices.
      
      Closes #63930
      
      opw:2426098
      
      closes odoo/odoo#64791
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      aa7749b6
  15. Jan 18, 2021
  16. Jan 17, 2021
  17. Jan 13, 2021
  18. Jan 15, 2021
  19. Jan 14, 2021
    • Romain Derie's avatar
      [FIX] website_sale: correctly use fiscal position to compute price · 761319a3
      Romain Derie authored
      
      Before this commit, if the user had a fiscal position for his current country,
      it wouldn't be used to compute the price of the products on the eshop.
      Note that:
        - the price would be correct on the cart, as those prices are coming from a
          sale order which correctly retrieves the fiscal position.
        - if the fiscal position is directly set on the partner, prices are correct
          on the eshop
      
      Step to reproduce:
        - Set Belgium as country on Portal user's partner
        - Create a 0% tax and a 15% tax
        - Create a fiscal position mapping 15% tax to 0% tax for Belgium country
          automatically detected
        - Create a product with 1000$ price and 15% tax set on it
        - Enable pricelist and select tax included in settings
        - Create a pricelist for Belgium and add a rule for the product you created
          to set a fixed price of 500$
        - Now visit eshop with Portal user
      
      The test product show 575$ instead of 500$ in eshop, while it will correctly
      show 500$ in cart.
      
      opw-2423215
      
      closes odoo/odoo#64477
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      761319a3
  20. Jan 13, 2021
    • Jairo Llopis's avatar
      [FIX] mail: Do not consider reply if no "To:" is found · 8f094d3c
      Jairo Llopis authored
      
      If an email was sent with empty "To:" and a proper alias in "CC:" (or any of the similar valid headers that conform the `rpc_tos_localparts` array), before 40ae36b7 the email wouldn't get rejected. After that commit it would get bounced.
      
      This comes from the not-so-obvious new python idiom used, `all()`. Check this out:
      
      ```python
      >>> all([False])
      False
      >>> all([])
      True
      ```
      
      So, apart from the fix introduced in that commit, which seems valid, we have to make sure `email_to_localparts` actually has contents. Otherwise we are producing false bounces here.
      
      @Tecnativa TT23437
      
      closes odoo/odoo#49656
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      8f094d3c
  21. Nov 18, 2020
    • Benjamin Vray's avatar
      [FIX] web_editor: fix drop zones when dragging a snippet · e49480fe
      Benjamin Vray authored
      
      Before this commit:
      
      -when moving a snippet using the drag and drop button, two drop zones
      instead of one was added at the initial location of the dragged
      snippet.
      
      -when moving a snippet using the drag and drop button, no drop zone
      was added at the initial location of the dragged snippet if the snippet
      was alone in its parent. For example, the left jumbotron in the banner
      snippet.
      
      -the drop zones handled by the "children rules" were never vertical
      when it was necessary.
      
      This commit also refactors the code to avoid some duplicated lines.
      
      task-2312878
      
      closes odoo/odoo#61336
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      e49480fe
  22. Jan 05, 2021
  23. Jan 12, 2021
    • Ivan Yelizariev's avatar
      [FIX] base_automation: reset active_id(s) in onchange handler · 8fff0952
      Ivan Yelizariev authored
      
      If we change ``active_model`` in context, we have to reset active_id(s),
      otherwise we read a random records which may not exist.
      
      STEPS:
      1. Activate Developer mode
      2. Go to Settings > Technical > Automation > Automated Actions
      3. Define a new Automated Action with the following settings:
      - Model: Lead/Opportunity
      - Action To Do: Execute Python Code
      - Trigger: Based on Form Modification
      - Trigger Fields: Customer (crm.lead)
      - Python Code:
      ```
      raise Warning(records)
      ```
      4. Go to Contacts, create a new contact and save it.
      5. Click on the "Opportunities" Smart Button on the top left of the contact record.
      6. Click "Create".
      
      BEFORE: ``records`` in context read crm.lead, while id is for res.partner
      record
      
      AFTER: ``records`` is None
      
      ---
      
      opw-2424392
      
      closes odoo/odoo#64223
      
      Signed-off-by: default avatarIvan Yelizariev // IEL <yelizariev@users.noreply.github.com>
      8fff0952
  24. Jan 08, 2021
  25. Jan 11, 2021
    • Rémy Voet (ryv)'s avatar
      [FIX] stock: product search by location · 874d0a63
      Rémy Voet (ryv) authored
      
      Issues
      - In a database with a lot of locations (more than 10K)
      - Search by location in the product tree view with the complete name of
      the most "parent" location
      - We get a memorry error due to a giant SQL request:
      `psycopg2.ProgrammingError: memory exausted at near "(" ...`
      It is due to the `_get_domain_locations_new` which return a giant domain
      with a tons of `(location_id.parent_path', '=like', ...)` for location.
      Because the `_get_domain_locations` makes a ilike on the complete name,
      it will match parent but also all child of this parent (because of the
      complete works expected if there are loc of type 'view' between).
      If there are 10K child location of `WH/Stock`, it will
      match all child and the `_get_domain_locations_new` will return
      a extremely huge domain with a lot of useless condition.
      
      To Solve
      Minimize the domain created by the
      `_get_domain_locations_new`, avoid duplicate `parent_path` condition:
      e.g. `'|', ('location_id.parent_path', '=like', 'WH/Stock/%')
      ('location_id.parent_path', '=like', 'WH/Stock/Shell/%')`
      can be represented only by the first condition.
      We can also search all childs and add condition on ids before
      but it removes the optimization done in this method.
      
      opw-2379464
      
      closes odoo/odoo#64133
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      874d0a63
    • Rémy Voet (ryv)'s avatar
      [FIX] stock: add index on `lot_id` on `stock.quant` · ef629d67
      Rémy Voet (ryv) authored
      
      backport of 58456523
      
      closes odoo/odoo#64308
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      ef629d67
Loading