Skip to content
Snippets Groups Projects
  1. Feb 11, 2021
  2. Feb 13, 2021
  3. Feb 16, 2021
    • Nicolas Lempereur's avatar
      [FIX] base: mail signature CSS inlined for icons etc · a723bcbe
      Nicolas Lempereur authored
      
      The mail signature of an user did not inline the CSS like the body of a
      message, so for example icons seemed to work but would not be seen
      (unless the mail reader had the same font-awesome system).
      
      With this change we inline the signature too.
      
      On edition there was also an issue since the original icon was saved as
      data-class which was stripped: so eg. when editing a mail.message with
      working icon, the icons would disappear.
      
      opw-2453912
      
      closes odoo/odoo#66216
      
      X-original-commit: 29347ceefa1f83a350a544a02d040e69f2906aaf
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      a723bcbe
  4. Feb 15, 2021
  5. Jan 21, 2021
  6. Feb 15, 2021
  7. Feb 12, 2021
    • Laurent Smet's avatar
      [FIX] account: Set memo to ref if not payment_reference · 10274903
      Laurent Smet authored
      
      Issue
      
      	- Install "Accounting" module
      	- Create a new bill :
      	- Set vendor
      	- Set no payment reference
      	- Set a bill reference
      	- Add products to bill
      	- Confirm and click on Register Payment
      
      	Memo field has no value.
      
      Cause
      
      	The memo field is based on lines name.
      	Lines name is computed in `_onchange_payment_reference`
      	and depends only on payment_referecence.
      
      Solution
      
      	If no `payment_reference`, fallback on `ref` to set line name.
      
      opw-2440389
      
      closes odoo/odoo#66032
      
      Co-author: nboulif <bon@odoo.com>
      Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
      10274903
  8. Feb 15, 2021
  9. Feb 14, 2021
  10. Feb 12, 2021
    • Nicolas Lempereur's avatar
      [FIX] web: show more text of short calendar event · b856d312
      Nicolas Lempereur authored
      
      In a4d170ad there were some improvment to not show event totally empty
      on the day calendar view because of different style (font + padding).
      
      The lower part of the text was still a little cut, this commit try to
      improve this for week and day view mode by removing 5 additional pixels.
      
      opw-2422700
      
      closes odoo/odoo#66078
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      b856d312
    • Mohammed Shekha's avatar
      [IMP] web: fix UI glitch on image widget when too smal image · c1a45f58
      Mohammed Shekha authored
      
      with this commit, we fixes UI glitch on image widget when image is too small,
      when hovering over too small image Edit and Delete icon will ne displayed but
      it is displayed with glitch, so to avoid that glitch we added min-width to
      icons div.
      
      task-2376452
      
      closes odoo/odoo#66056
      
      X-original-commit: 7aaad848
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      c1a45f58
    • Nicolas Lempereur's avatar
      [FIX] rating: use website language if full frontend · ebee0a7a
      Nicolas Lempereur authored
      
      The route for customer rating force the customer language.
      
      If website is installed, this overrides the normal language so if
      current website language is spanish and customer is english, either:
      
      - we will have a page with two languages mixed with language selector
        set on spanish but showing mostly english
      
      - or if english is not installed, we get an error
      
      With this changeset, if website is intalled we just let it handle
      language (previous language used, or if not browser language, ...).
      
      Not necessary in 12.0 since we did not use frontend_layout (e9be0bb1).
      
      opw-2449678
      
      closes odoo/odoo#66055
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      ebee0a7a
    • Wolfgang Taferner's avatar
    • Mohammed Shekha's avatar
      [IMP] web: list multi-edit: discard, cancel then save · 18ed619b
      Mohammed Shekha authored
      
      In a list view that allows the multi edition, select several
      records, edit a field, and 'click' on Discard. In the confirm
      dialog, click on 'Cancel'. The row is still in edition and the
      changes are still there. However, before this commit, clicking
      on 'Save' did nothing.
      
      The reason is that the 'Save' button is fake. Typically, clicking
      on it triggers a 'field_changed' event, thus saving the selected
      records. In this above scenario, the changes have already been
      notified, so nothing happens when the user clicks on 'Save'.
      
      This commit fixes the issue by storing the last 'field_changed'
      event, and re-triggering it when necessary. This isn't the cleaner
      way to handle that scenario, but it is the simpler, so we go for
      it in stable. In master, it would be nice to rework the multi
      edition feature with this scenario in mind.
      
      task-2376233
      
      closes odoo/odoo#62652
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      18ed619b
  11. Feb 11, 2021
  12. Feb 10, 2021
    • Goffin Simon's avatar
      [FIX] mrp: Print BOM / BOM structure & cost · 994355da
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Install manufacturing app
      - Create a product A
      - Create a Bill of Materials for product A
      - Archive Product A (Only the final product not any of the components)
      - Print BOM or Print BOM Structure & Cost
      
      Bug:
      
      A traceback was raised
      
      opw:2447514
      
      closes odoo/odoo#65856
      
      X-original-commit: 80d4fb9f
      Related: odoo/enterprise#16258
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      994355da
  13. Feb 11, 2021
  14. Feb 10, 2021
    • Munaf Khan's avatar
      [FIX] crm: prevent crash due to invalid system parameter · ead10c7e
      Munaf Khan authored
      
      Right now, if someone changes the `crm.pls_start_date` system parameter
      to something that is not valid, opening a settings gives you traceback.
      
      This commit improves the behavior by making sure that the compute field on
      settings page `predictive_lead_scoring_start_date` always contains a valid
      date. For doing so, if the system parameter is not a valid date(or not set
      or deleted), we set the above field to the date 8 days prior to current
      date, and thus, when saving the settings, the system parameter is again
      set with a valid date.
      
      closes odoo/odoo#65111
      
      Taskid: 2448248
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      ead10c7e
  15. Feb 11, 2021
  16. Feb 10, 2021
    • nie's avatar
      [FIX] payment,sale: Use record website domain in links · 700dba53
      nie authored
      
      Steps:
      - Go to Settings > Users & Companies > Companies
      - Create a new company (1)
      - Install a payment acquirer and Website
      - Go to Website > Configuration > Settings:
      - Select "My Website 2"
      - Assign it to company (1)
      - Add a custom domain
      - Save
      - Switch to company (1)
      - Go to Invoicing
      - Create a new Invoice:
        - Add a product line
      - Post it
      - Click Action > Generate a Payment Link
      
      Bug:
      The base domain is used instead of the domain of the website linked to
      the invoicing company.
      
      Explanation:
      The app only uses the URL on which the user has logged in to generate a
      payment link. If the user has multiple companies, this can confuse
      customers if they land on another domain than the one they are used to.
      This commit makes the app use the domain of the website of the record
      linked to the payment if it has one.
      
      opw:2440251
      
      closes odoo/odoo#65589
      
      Signed-off-by: default avatarbackspac <backspac@users.noreply.github.com>
      700dba53
    • Adrien Widart's avatar
      [FIX] mrp_subcontracting_account: update inventory valuation · cfd68df9
      Adrien Widart authored
      When buying a subcontracted product, if the inventory valuation of the
      product category is automated, the product delivery does not create a
      new journal entry, i.e. the automated inventory valuation is not done.
      
      To reproduce the error:
      (Need account_accountant,purchase)
      1. In Settings, enable "Subcontracting"
      2. Create a product category PC
          - Parent: All
          - Inventory Valuation: Automated
      3. Create a product P
          - Must be storable
          - In category PC
          - Set a positive cost
      4. Add a BoM to P
          - Type: Subcontracting
      5. Create a RfQ
          - Vendor: BoM's subcontractor
          - Product: P
      6. Confirm & Receive Products
      7. Go to Accounting > Accounting > Miscellaneous > Journal Entries
      
      Error: There isn't any journal entry about the new product. This is an
      error because the inventory valuation for this product is automated, so
      there should be a line with the P-product and the cost set on step 3.
      
      When validating the delivery, the server checks the stock move lines
      considered as incoming:
      https://github.com/odoo/odoo/blob/5098cb25accce91347760cbd2f6427c07265fa00/addons/stock_account/models/stock_move.py#L61-L65
      
      
      Problem is that `_should_be_valued` for subcontractor's location returns
      `True`, therefore the stock move line will not be added.
      => The `mrp_subcontracting` module needs to add a condition:
      A location can be valued if it is not subcontractor's location.
      
      OPW-2446298
      
      closes odoo/odoo#65696
      
      Signed-off-by: default avatarAdrien Widart <adwid@users.noreply.github.com>
      cfd68df9
    • Adrien Widart's avatar
      [FIX] hr_contract: update date_end when closing contract · e36e1ff8
      Adrien Widart authored
      
      When changing a contract's state to "Expired", if the contract has an
      end date, the latter is not updated. As a result, contracts' reporting
      contains some error.
      
      To reproduce the error:
      1. Create an employee E
      2. Create a contract C
          - Employee: E
          - Start date: in the past
          - End Date: in the future (! at least after the current month)
      3. Set contract's state to "Expired"
      4. Go to Employee > Reporting > Contracts
      5. On pivot view, change the rows:
          - Total must be split into "Date > Month"
          - Current month must be split into "Employee"
      
      Error: on current month, "# Departure Employee" of E-employee is 0. It
      should be 1. This value's computation is based on `contract.date_end`,
      but when changing the state to "Expired", the variable will not be
      updated if it already has a value. So "# Departure Employee" will be
      equal to 1 for the month of end date defined on step 2, instead of
      current month.
      
      Note: The fix result can not be directly tested. The end date must be
      done for the departure to be effective (`contract.date_end` < 'today').
      Since this fix updates `contract.date_end` to 'today', "# Departure
      Employee" will not count this contract until the following day.
      
      OPW-2445504
      
      closes odoo/odoo#65863
      
      Signed-off-by: default avatarAdrien Widart <adwid@users.noreply.github.com>
      e36e1ff8
    • Aaron Bohy's avatar
      [FIX] web: call do_hide/do_show on a destroyed widget · 13944b6d
      Aaron Bohy authored
      
      Before this commit, calling do_hide/do_show/do_toggle on a
      widget that had been destroyed before being rendered crashed
      (because this.$el was undefined).
      
      Obviously, calling those methods in this situation is useless, but
      with asynchronous code, it might happen that you call them in an
      handler, and they have been destroyed meanwhile.
      
      This commit checks if this.$el is set before accessing it to avoid
      the crash.
      
      closes odoo/odoo#65885
      
      X-original-commit: 320c29f5
      Signed-off-by: default avatarGéry Debongnie (ged) <ged@openerp.com>
      13944b6d
    • Aaron Bohy's avatar
      [FIX] web: keep null/false/true strings in domains · 74311c75
      Aaron Bohy authored
      
      Before this commit, occurences of 'null', 'true' and 'false'
      strings as autocomplete values in the search view were replaced
      respectively by None, True and False.
      
      Fixes #65743
      
      closes odoo/odoo#65779
      
      Signed-off-by: default avatarGéry Debongnie (ged) <ged@openerp.com>
      74311c75
  17. Feb 08, 2021
  18. Feb 10, 2021
  19. Feb 09, 2021
  20. Feb 08, 2021
    • Adrien Horgnies's avatar
      [FIX] product: generate variant combinations faster · 98616c46
      Adrien Horgnies authored
      
      The function `_get_possible_combinations` generates possibles combinations
       for the product template attribute values (ptav) of each product template
       attribute line (ptal) of a given product template. It used to iterate over
       them using a cartesian product. A combination can be invalid if it
       contains two incompatibles ptav. The problem is that it used to filter out
       invalid combinations after generating them. It's a problem because there
       can be a lot of invalid combinations to filter out before finding a valid
       combination. Even before the first valid combination if the first ptav of
       the two first ptal are incompatible.
      
      The solution brought by this commit is to reject the invalid combinations
       while building them rather than after. It does so by using a cartesian
       product implementation with early rejection. The algorithm tests each
       ptav when incorporating it in a partial combination and if it's
       incompatible, it goes to the next partial combination and thus skips all
       combinations starting with the invalid partial combination.
      
      The client that reported the issue has a product template with about 25
       ptal with an average of 9 ptav. The ptav of the first ptal was
       incompatible with the first ptav of second ptal. It had to build and
       filter out 5.76*10^15 ptav before finding the first valid ptav. If we
       generate 10^6 ptav by second (it's much less) user would get first ptav
       after 182 years. Now it's instantaneous.
      
      opw-2335936
      
      closes odoo/odoo#65723
      
      X-original-commit: 2e5634fa
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      98616c46
    • Christophe Monniez's avatar
      [FIX] tools: prevent call to pillow exif_transpose image method · 38f696df
      Christophe Monniez authored
      
      In a previous fix [0], the call to exif_transpose was kept to allow
      rotation of images format different than `JPEG`.
      
      After a small test, it appeared that the call would crash if the image
      in another format had the same `LensInfo` tag.
      So it's safer to not call this method at all.
      
      With this commit, the rotation tag is retrieved disregarding the file
      format by using the `getexif` method if available, falling back to the
      private method for Pillow < 6 support.
      
      As a bonus, a test is also added with a small embedded `JPEG` image,
      crafted with an `Orientation` exif tag and, for reference,  the
      `LensInfo`tag that caused so much trouble.
      
      [0] b83c48d5
      
      closes odoo/odoo#65653
      
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      38f696df
    • yhu-odoo's avatar
      [FIX]stock_account: don't show consumable in valuation report · 57695f82
      yhu-odoo authored
      
      In "Inventory Valuation", when click "Inventory at Date" then "confirm".
      Record for consumable products will be shown in the report.
      
      Previously fix in #62622 which disabled svl for consumable products,
      then rolled back in #63386 due to mrp need to create svl for consumables
      to analyse cost.
      
      In this commit, we add a domian filter to not show consumables in
      "Inventory Valuation"
      
      Task 2449211
      PR #65726
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      57695f82
    • Nicolas Lempereur's avatar
      [FIX] account: can refresh tax audit action · e7030bd9
      Nicolas Lempereur authored
      
      Because of context:
      
      {'search_default_account_id': [active_id]}
      
      refreshing on the tax audit action could cause an error because in normal
      use case we have active_id that is never an account.account id (but for
      example an account.tax.report.line).
      
      There doesn't seem to be any use case where that context is useful since
      it was introduced in 2017 (81089042), this action is always used with an
      overriden context. So this commit is removing it.
      
      opw-2388448
      
      closes odoo/odoo#65754
      
      X-original-commit: f7998c04813c65ba0b8ba046c052332ede2ba1cb
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      e7030bd9
  21. Feb 05, 2021
    • Samuel Degueldre's avatar
      [FIX] web_editor: insert record name as text · fde240eb
      Samuel Degueldre authored
      
      Previously, the many2one widget from the web_editor used jQuery's
      '.html()' method when inserting a record name into the page. The record
      name was not HTML-escaped before this, which may have unexpect result
      and break the layout.
      
      This commit fixes that by using the '.text()' method instead.
      
      This bug only affects pages containing a many2one (contact excluded)
      at the time of selection and not after the selection.
      e.g. on the /event page, changing the category of an existing event
      via the website editor
      
      closes odoo/odoo#65639
      
      X-original-commit: 53aff7f0
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      fde240eb
Loading