Skip to content
Snippets Groups Projects
  1. Apr 30, 2020
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] sale_timesheet: fix user permission to set sale order · 8c7d0266
      Andrea Grazioso (agr-odoo) authored
      
      Create a service product [DEMO] with service tracking
      'Create a task in a new project'
      Create a sale order SO1 with User 1 with [DEMO] product
      Create a sale order SO2 with User 2 with [DEMO] product
      SO1 will create a task in a project, edit this task and
      assign as parent task the one created by SO2
      
      The action will be blocked by security rules, because user 1 cannnot
      see the sale order data of user 2 but the action should be
      allowed.
      
      Fixing the error with a sudo call
      
      opw-2243370
      
      closes odoo/odoo#50487
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      8c7d0266
  2. May 04, 2020
    • Nasreddin (bon)'s avatar
      [FIX] crm: Fix compute method on day open · 51590b02
      Nasreddin (bon) authored
      
      Step to reproduce : Import from Excel a list of Opportunities.
      
      The problem is that in _compute_day_open, the abs of the extraction
      date_open - create_date is set as the lead's day_open.
      As the date_open has no milliseconds, all those records which
      create date is the same second have a date_open that is before their create_date.
      
      Fixed it by comparing the date_create and date_open without microsecond.
      
      Task ID 2222251
      
      closes odoo/odoo#50431
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      51590b02
    • Nicolas Martinelli's avatar
      [FIX] mail: render False · 00f9bee5
      Nicolas Martinelli authored
      
      - Have a fresh V12 with sale_management
      - Be in debug mode
      - Go to sale
      - Open any order
      - Click "Send by email"
      - Click on the bug (upper left of the modal)
      - Edit view form
      - Add a context to the "send" button like this one:
        `context="{'custom_layout': 'mail.<incorrect_external_id>'}"`
      - Save and Reload the view
      - Click "Send by email"
      - Click "Send"
      
      A traceback is raised.
      
      This occurs because we call `render` on `False`.
      
      opw-2246758
      
      closes odoo/odoo#50559
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      00f9bee5
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] pos_discount: correctly get discount amount · f8046fb7
      Andrea Grazioso (agr-odoo) authored
      
      Activate a language which has comma as decimal separator
      Go into POS settings, activate 'Global Discount'.
      Open POS session, add some product and use global discount.
      Input some number with decimals and confirm.
      Discount will be not applied
      
      This occur because of javascript type coercion:
       Math.min(100, "11.0") -> 11
       Math.min(100, "11,0") -> NaN
      
      So in locales with thousands separator the statement would produce
      different results. Forcing float parsing fix the issue
      
      opw-2243482
      
      closes odoo/odoo#50558
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      f8046fb7
  3. May 03, 2020
  4. Apr 30, 2020
    • oco-odoo's avatar
      [FIX] l10n_ch: fix QR-bill pdf report so that it matches the spec · 719f087b
      oco-odoo authored
      
      Using it as a parf of the regular invoice pdf report was wrong, as this report is subject to the margins defined in its paper format; causing issues as for the rendering of the QR report, which must be displayed at a precise location (just like ISR). wkhtmltopdf doesn't allow having different margin values in the same file, so we did just as for ISR, and now generate QR-bill in a distinct pdf.
      
      [IMP] l10n_ch: add receipt part to QR-bill pdf report
      
      closes odoo/odoo#50338
      
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      719f087b
  5. Apr 22, 2020
  6. Apr 30, 2020
    • Goffin Simon's avatar
      [FIX] point_of_sale, product, sale: Manage pricelist items · 20be6f6d
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider that Sales and Point of sale modules are installed
      - Go to Sales > Settings and check "Multiple Sales Prices per Product"
      - Select "Prices computed from formulas (discounts, margins, roundings)"
      - Let the default setting for "Multiple Sales Prices per Product" in Point of sale settings
      - Go to Website > Settings and change the domain url of your website
      - Save
      
      Bug:
      
      The pricelist items didn't appear in the pricelist even if the option
      Select Prices computed from formulas (discounts, margins, roundings) was
      selected in Sales module.
      
      Explanations:
      
      Each time a save was made in the settings, the setting of "Multiple Sales Prices per Product"
      from Point of sales were applied after the settings of Sales. So there was an inconsistency.
      
      opw:2240068
      
      closes odoo/odoo#50435
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      20be6f6d
    • jvm-odoo's avatar
      [FIX] web: fix exporting a saved export · 2db6df27
      jvm-odoo authored
      
      Issue
      
      	- Install Sales
      	- Sales > Product
      	- Select a line > Export
      	- Choose import-export compatible
      	- Keep only ID & Name
      	- Select Product Category > Name
      	- Save the export
      	- Export
      
      	If you look at the file everything is ok,
      	categ_id = the name of the category
      
      	- Close the modal
      	- Reselect a line > Export
      	- Choose your saved export
      	- Export
      
      	Now the categ_id is not the name but the id
      
      Cause
      
      	In 12.0 before you unfold a many2one or many2many, you have for example
      	these menu and corresponding fields:
      
      	"Product Category": {id=> categ_id, value=> categ_id/id}
      
      	and once you unfold it:
      
      	"Product Category": {id=> categ_id, value=> categ_id}
      	"Product Category/External ID": {id=> categ_id/id, value=> categ_id/id}
      	"Product Category/Name": {id=> categ_id, value=> categ_id}
      
      	So if you select your saved list and the m2o is not unfolded, it will
      	take the id one, if it's unfolded, it will take the first categ_id
      
      Solution
      
      	Add /id for the m2o and m2m fields, to have
      	"Product Category": {id=> categ_id/id, value=> categ_id/id}
      
      	So as categ_id/id is not categ_id, it will looks for
      	the right field, the name.
      
      OPW-2243477
      
      closes odoo/odoo#50301
      
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      2db6df27
  7. Apr 29, 2020
    • Nicolas Lempereur's avatar
      [FIX] website: menu translation on website · 93377cc4
      Nicolas Lempereur authored
      
      Currently, the menu are only translated for installed language when we
      create a new website.
      
      When we create a new menu (eg. by installing a module) or install a new
      language we will only translate menu without website_id set, so the menu
      are not translated.
      
      With this changeset, we try to match translation of menu without
      website_id to menu with website_id when translations are updated:
      
      - when a language is installed/updated
      - when a module is installed/updated
      
      Without the changeset, the added test would fail with:
      
      - "Menu in english" != "Menu en français"
        Load translation add missing translation from template menu
      
      - "Menu in french" != "Menu en français"
        Load translation with overwriting update existing menu from template
      
      fixes #43365
      opw-2209864
      closes #48031
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      93377cc4
    • Nicolas Martinelli's avatar
      [FIX] website_sale_stock: prevent buying consumable · ec6f281f
      Nicolas Martinelli authored
      
      - In Website > Settings, set 'Show inventory on website and prevent
        sales if not enough stock'
      - Create a consumable product P, publish on the eCommerce
      - As user 1, buy 1 units of P => validate the SO => 1 unit is reserved
      - As user 2, add 1 unit of P to the cart. In the cart click on the `+`
        to add a unit
      
      The product is removed from the cart.
      
      This happens because `virtual_available` quantity is taken into account,
      while it shouldn't be since it is a consumable.
      
      opw-2245075
      
      closes odoo/odoo#50401
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      ec6f281f
    • Goffin Simon's avatar
      [FIX] sms: Send a sms with search filter · 0a8ce61f
      Goffin Simon authored
      
      When sending a sms from the contact list view, the sms is sent to all the records
      matching the domain even if some records are selected. This behavior has been decided
      to make the mass smsing easier.
      
      opw:2244718
      
      closes odoo/odoo#50383
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      0a8ce61f
  8. Apr 28, 2020
    • Ronald Portier's avatar
      [FIX] core: SSF should re-read from the record after saving · 45398c09
      Ronald Portier authored
      
      Before this change, the SSF would read from the record after
      creation but wouldn't do so after a write.
      
      This doesn't conform to the behaviour of the web client (which does a
      read() after saving a form), and means the effect of field
      inverses (when the dependencies of a writable field are also in the
      form) or overrides to write wouldn't be visible afterwards.
      
      It's always possible to just re-create the form from scratch, but the
      intention has always been that the form would work correctly after a
      save.
      
      closes odoo/odoo#50289
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      45398c09
    • Pedro M. Baeza's avatar
      [FIX] base: allow uninstall of modules to upgrade · f5449602
      Pedro M. Baeza authored
      
      Commit 8c1bb22e forgot to take into
      account migrations, during a migration it is possible that some modules
      need to be uninstalled because the target version may have removed /
      moved them and since during a migration all modules are set `to
      upgrade`, the previous condition made this impossible for migration
      scripts that use the ORM for module uninstalls (not Odoo's case, mind
      you)
      
      With this commit it is again possible to uninstall modules from a
      migration script during a migration.
      
      closes odoo/odoo#50302
      
      X-original-commit: a7c90a6d
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      Signed-off-by: default avatarAdrian Torres (adt) <adt@odoo.com>
      f5449602
  9. Apr 27, 2020
  10. Apr 28, 2020
  11. Apr 23, 2020
    • Yannick Vaucher's avatar
      [IMP] account: hooks to extend grouping rules on payments · 85540e6b
      Yannick Vaucher authored
      
      This will allow to define a specific grouping rule for ISR payments
      
      In case of Swiss ISR payments must not be grouped as we want to keep a single transaction
      per reference. The ISR payment reference doesn't imply additionnal fees from
      the bank.
      
      One transaction per ISR reference is needed in Swiss SEPA payments
      to ensure a end-to-end flow that will ease the reconciliation on
      the other end.
      
      When ISR reference is detected we also avoid to concatenate the references
      to not concatenate the same reference multiple times. In case the
      same reference is sent by the supplier on different dates.
      
      Without those hooks it will be very difficult to implement.
      
      Backport from PR 45744
      
      closes odoo/odoo#48441
      
      Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
      85540e6b
  12. Apr 02, 2020
  13. Apr 28, 2020
  14. Apr 27, 2020
  15. Apr 26, 2020
  16. Apr 24, 2020
    • Jorge Pinna Puissant's avatar
      [FIX] calendar: note on meeting planned activity lack new line · 0cf155a8
      Jorge Pinna Puissant authored
      
      - In a res.partner;
      - Schedule activity;
      - Choose 'meeting' as activity;
      - Set a summary : 'test summary';
      - Open Calendar;
      - Chose a date and an hour;
      - Edit the meeting;
      - Add a description with a line break;
      - Save the meeting;
      - open the res.partner view;
      
      Before this commit, the note on the planned activity lack the line
      break.
      
      Now, the note in the planned activity has the same output as the
      description of the calendar meeting.
      
      opw-2236838
      
      closes odoo/odoo#50143
      
      Signed-off-by: default avatarJorge Pinna Puissant (jpp) <jpp@odoo.com>
      0cf155a8
    • Nicolas Lempereur's avatar
      [FIX] mail.py: escape plaintext email · acee06aa
      Nicolas Lempereur authored
      
      A plaintext email is displayed in a `<pre/>` tag to conserve spacing.
      
      But since there is no escaping, if in this text there was XML tags or
      HTML entities, they would appear as HTML in browser which is not wanted.
      
      Do note that this was not a security issue since the content will still
      be subjected to the checks and foundling of HTML emails.
      
      Without the change, the added test would fail because character &,<,>
      were not escaped.
      
      opw-2242323
      closes #50003
      
      closes odoo/odoo#50101
      
      X-original-commit: 932532b5
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      acee06aa
  17. Apr 23, 2020
  18. Apr 22, 2020
    • Nicolas Martinelli's avatar
      [FIX] sale_stock: package with decimal values · 6796d4dc
      Nicolas Martinelli authored
      
      Follow-up of f1e79c74
      
      The issue still arises with:
      8 % 1.6 = 1.5999999999999996
      
      The modulo operator on float doesn't seem reliable for our use case,
      therefore we use a combination of `float_round` and `float_compare` to
      verify the quantity sold is a multiple of the quantity per package.
      
      The rounding threshold is 0.01, meaning that the warning might not be
      raised for some specific configurations. For example, 8.005 units with
      a package of 1.6 won't return a warning. Since this is a non-blocking
      warning, this should be enough for most cases.
      
      opw-2241985
      
      closes odoo/odoo#49962
      
      X-original-commit: 3d48e2b4
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      6796d4dc
    • Samuel Degueldre's avatar
      [FIX] web_editor: fix original not being properly set when cropping · be4844b5
      Samuel Degueldre authored
      
      Previously, if you opened the cropper on an already cropped image, it
      would load the crop data for that image. If you then changed the image
      and cropped that new image, it would keep most of the metadata of the
      previous image when saving, causing any subsequent crop to show the
      previous original image instead of the current one.
      
      This commit fixes that by removing all crop-related jQuery data from the
      image, so it's considered a fresh crop and a new attachment is created.
      
      closes odoo/odoo#49375
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      be4844b5
  19. Feb 25, 2020
    • Samuel Degueldre's avatar
      [FIX] web_unsplash: unsplash images added on website break on products · 196d6b16
      Samuel Degueldre authored
      
      Before this commit, selecting an unsplash image on website, then going
      on a product page and selecting that same image in the media-dialog
      would not work, and upon saving, the image would be the image
      placeholder.
      
      A previous fix in odoo/odoo#31328 added handling so that you could
      choose unsplash images for a product, but it failed to account for
      unsplash images that had already been added on a public view (for
      example on a website page), which the user can choose in the
      media-dialog.
      
      This was caused by the fix only searching for the unsplash attachment on
      the current model, and not among public attachments, resulting in an
      empty search result.
      
      This commit fixes that by adding that the attachment we are looking for
      should either be on the current model, or be a public attachment.
      
      closes odoo/odoo#46112
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      196d6b16
  20. Apr 21, 2020
  21. Apr 20, 2020
    • Nicolas Martinelli's avatar
      [FIX] stock: unreserve picking with latest scheduled date · 41c05cbf
      Nicolas Martinelli authored
      
      - Create a product P with 10 units on hand
      - Create a SO with 5 units, validate
      - Create another SO with 5 units, validate
      - Update the quantity on hand to 8
      
      The picking linked to the first SO as 2 units unreserved, while one
      would expect the unreservation on the second picking.
      
      When unreserving, sort the move lines according to the picking scheduled
      date. The latest schedule date comes first.
      
      opw-2233331
      
      closes odoo/odoo#49770
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      41c05cbf
  22. Apr 17, 2020
  23. Apr 19, 2020
  24. Apr 16, 2020
Loading