Skip to content
Snippets Groups Projects
  1. Mar 16, 2022
  2. Mar 15, 2022
  3. Mar 14, 2022
    • Xavier Morel's avatar
      [FW][FIX] web/lib: backport jquery bugfixes · 41c9d8ae
      Xavier Morel authored
      opw-2793379
      
      closes odoo/odoo#86402
      
      X-original-commit: 0dd7c78b
      41c9d8ae
    • Antoine Guenet's avatar
      [FIX] web_editor: properly clean zero-width spaces inserted for formats · a033818f
      Antoine Guenet authored
      
      When inserting a format with a collapsed selection, we need to insert a
      zero-width space. It should not be saved so we need to isolate it and
      put the "oe-zws-empty-inline" attribute on its parent so it gets cleaned
      up by the sanitizer.
      
      closes odoo/odoo#85408
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      a033818f
    • Antoine Guenet's avatar
      [FIX] web_editor: unformat only if full selection is bold · bc723536
      Antoine Guenet authored
      Take `<p>a<b>bcde</b>f` and select the whole paragraph. If you click the
      "bold" button, you would expect the whole paragraph to become bold. Only
      if you only select "bcde" do you expect to unbold it. This is the
      behavior of other editors. Odoo-editor so far was unbolding as long as a
      part of the selection was bold.
      The same applies to other formats.
      
      Currently the format buttons are active when the closest start container
      is that format but it should be active when pressing it would undo the
      format, ie when the whole selection is that format. This harmonizes it
      with the browser defaults.
      
      task-2754127
      
      Part-of: odoo/odoo#85408
      bc723536
    • Antoine Guenet's avatar
      [FIX] web_editor: properly detect background color in toolbar · 2992fcda
      Antoine Guenet authored
      When a background color is applied on an ancestor, while it's visibly
      there, `getComputedStyle` doesn't know. Because it did depend on it,
      the toolbar showed the wrong color in these cases.
      Eg: `<span style="background-color: red;"><b>a[]bc</b></span>` was
      showing no background color.
      
      task-2778416
      
      Part-of: odoo/odoo#85408
      2992fcda
    • Antoine Guenet's avatar
      [FIX] web_editor: properly toggle active link button · d98f5846
      Antoine Guenet authored
      The link button was toggling its active state on every update of the
      toolbar because we weren't passing the toggle function a boolean. and
      if the element we were passing it was `undefined`, it triggered the
      default behavior which is to just toggle. Instead we want it to be false
      if the element is `undefined`.
      
      Part-of: odoo/odoo#85408
      d98f5846
    • Antoine Guenet's avatar
      [FIX] web_editor: properly apply/unapply underline and strikeThrough · 3a098666
      Antoine Guenet authored
      Underline and strikeThrough styles are special beasts in that they both
      are applied to the `text-decoration-line` property. Unlike `font-weight`
      or `color`, They behave like a border: setting
      `text-decoration-line: none` to an element won't undo the value of the
      parent and therefore the text will still show the decoration applied to
      its parent. Similarly, nested decorations will apply over each other:
      a text node whose parent has an underline decoration and whose
      grandparent has a line-through decoration will be both underlined _and_
      struck through.
      Consequently, we can't treat these styles the same way we treat bold,
      italic and colors:
      1. To undo the style, we have to split the text from its styled ancestor
      2. To apply eg underline to a struck through text, we have to insert a
         new span.
      
      task-2778416
      
      Part-of: odoo/odoo#85408
      3a098666
    • Antoine Guenet's avatar
      [FIX] web_editor: handle arrow keys next to zero-width spaces · e5ba90d2
      Antoine Guenet authored
      Consider the following situation: `<p>a[]b<span><zws></span>c</p>`,
      where `<zws>` is a zero-width space and `[]` is the collapsed selection.
      On pressing the `ArrowRight` key, we want to enter the `<span>` so we
      don't press once to be after the "b" then once again to be before the
      `<zws>`. The cases with a non-collapsed selection, and with the left
      arrow are analogous. This is what this commit allows us to handle.
      
      Part-of: odoo/odoo#85408
      e5ba90d2
    • Antoine Guenet's avatar
      [FIX] web_editor: apply format, font-size and color collapsed · b8b62389
      Antoine Guenet authored
      When the selection is collapsed it was impossible to set a format (bold,
      italic, underline, strikethrough), a font-size or a color. This makes it
      possible by inserting and selecting a zero-width space first, then
      placing the caret to its left when we're done.
      
      task-2778416
      
      Part-of: odoo/odoo#85408
      b8b62389
    • Antoine Guenet's avatar
      [FIX] web_editor: ensure all formats use spans · 79bce724
      Antoine Guenet authored
      The bold format is overridden to use inline style on a <span> rather
      than a <b>. The other formats (italic, underline, strikethrough)
      continued to use the default browser behavior. This harmonizes them.
      
      Part-of: odoo/odoo#85408
      79bce724
    • Antoine Guenet's avatar
      [FIX] web_editor: use styling commands on shortcut too · d6018f1a
      Antoine Guenet authored
      When pressing the italic or underline buttons, we pass through a command
      in the editor. Their corresponding keyboard shortcuts however were not
      intercepted by the editor and were therefore triggering the default
      browser behavior. As a result we had different behaviors when using the
      buttons and the shortcuts.
      
      Part-of: odoo/odoo#85408
      d6018f1a
    • roen-odoo's avatar
      [FIX] payment: exclude acquirers requiring tokenization when logged out · 2a084c48
      roen-odoo authored
      
      Current behavior:
      Public user have access to payment method that require tokenization wich leads to error when they use it.
      We should not show those payment methos to the public users (e.g We shouldn't show sepa direct debit because this method uses tokenization)
      
      Steps to reproduce:
      - Activate SEPA Direct Debit in the payment acquierers
      - Select Bank as payment journal
      - In the bank payment journal create an account number (e.g BE71096123456769), and select a Bank (e.g BNP)
      - Create a new customer (type : company, country : spain, and an email)
      - Create a quotation with this new customer
      - Click on the "action" icon and click on generate payment link
      - Open the link in an incognito window (to make sure you'r not connected in Odoo)
      - Try to use the sepa direct debit
      - An access error appears because public user do not have access to payment.token.
      
      opw-2754505
      
      closes odoo/odoo#85827
      
      Signed-off-by: default avatarGrazioso Andrea (agr) <agr@odoo.com>
      2a084c48
    • std-odoo's avatar
      [FIX] mail: remove reference to Jinja · ad366762
      std-odoo authored
      
      Purpose
      =======
      Since 68182baf , Jinja mail templates
      have been replaced by QWeb templates. But some reference to Jinja
      in the mail settings have been forgotten.
      
      Task-2701037
      
      closes odoo/odoo#86248
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      ad366762
    • Mitul Shah's avatar
      [IMP] mass_mailing_{sms}: group visibility for email marketing · 01305cd9
      Mitul Shah authored
      
      Before this Commit,
      While creating a new SMS mailing, There is an empty settings tab.
      
      After this Commit,
      - We have added a new 'Option' group and set the
      'Include opt-out link' field in this group.
      - We have moved the 'Responsible' from Email Content to Tracking group.
      - Responsible(user_id) will be always visible.
      - Email Content group will visible only while creating Email Marketing.
      
      Task-2710557
      
      closes odoo/odoo#83183
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      01305cd9
    • Artem's avatar
      [FIX] base: use current company when rendering report · 171e8fe1
      Artem authored
      
      Fixes odoo/odoo#86216
      When printing qweb report use the current company.
      For example, the company logo printed was always from user company
      default instead of the current company.
      
      closes odoo/odoo#86333
      
      X-original-commit: 3c626331
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      171e8fe1
    • Artem's avatar
      [CLA] signature for shurshilov · fef52eb8
      Artem authored
      X-original-commit: 572122b3
      Part-of: odoo/odoo#86333
      fef52eb8
    • Joonas Hartonen's avatar
      [FIX]mail_plugin: write method return added · 0a6bcb70
      Joonas Hartonen authored
      
      * res.partner write method was missing return. This caused errors with XML RPC writes.
      
      closes odoo/odoo#86318
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      0a6bcb70
    • Florian Damhaut's avatar
      [FIX] hr_holidays: multi-period accrual reset at year start · fc183551
      Florian Damhaut authored
      
      Step to reproduce:
      - Create an accrual plan with the option "at the end of the year,
       unused accruals will be lost" and that can be allocated every year
      (in this example, 3 days)
      - Create an allocation for Marc Demo based on that accrual plan
       and starting in 2020.
      - Run scheduled action
       "Accrual Time Off: updates the number of time off"
      - Connect as Marc Demo
      
      Current behaviour:
      - Marc Demo has receive a 6 day allocation
      - While loop over the elapsed period doesn't take lost time into account
      
      Behaviour after PR:
      - Marc Demo receive 3 day allocation
      
      opw-2769066
      
      closes odoo/odoo#85700
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      fc183551
    • William Braeckman's avatar
      [FIX] hr_holidays: fix multi company issue in days calculation · dbcb37ec
      William Braeckman authored
      
      Prior to this commit, the multi company rules were bypassed due implicit
      sudos (compute_sudo and self.env.user).
      The function computing the number of days will now make sure to include
      the right domain.
      
      TaskId-2791030
      
      closes odoo/odoo#86166
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      dbcb37ec
    • Florian Damhaut's avatar
      [FIX] base: negative duration correct html render · a45e2c03
      Florian Damhaut authored
      
      Step to reproduce:
      - Render negative duration with the duration widget
      
      Example V15:
      - Create timesheet entry with negative duration (e.g. -00:30)
      - Print the timesheet entry
      
      Current Behaviour:
      - Time is rendered as Time-1h (in e.g. -01:30)
      
      Behaviour after PR:
      - Time is correctly rendered (in e.g. -00:30)
      
      opw-2731186
      
      closes odoo/odoo#85896
      
      X-original-commit: 8828824f
      Signed-off-by: default avatarDamhaut Florian (flda) <flda@odoo.com>
      a45e2c03
    • Jinjiu Liu's avatar
      [FIX] hr_expense: changed taxes computation logic · 7cdaf331
      Jinjiu Liu authored
      
      Reproduction:
      1. Install Expense, Accounting, then create a new expense
      2. Choose category ”Food & beverages”, enter the amount paid
      3. Choose a tax in Taxes
      4. The amount paid is recomputed to 0
      
      Reason: the expense form view changed in V15 but still uses the same
      computation logic in V14. In V15, parameter product_has_cost=False is a
      new use case where we directly input the total amount, and taxes here
      are already included in the price.
      
      Fix: in _compute_amount function, we need to check if there is
      unit_amount. If yes, we follow the computation flow which is similar to
      V14. If not, we calculate the taxes and other variables using the
      total_amount. But the taxes here must be price_include=True. Otherwise,
      the calculation will be wrong. To remind the customer, a tooltip and
      default text are added to tax_ids field. The domain of tax_ids will only
      include taxes with price_include=True. The translation file and the test
      are updated accordingly
      
      opw-2747288
      
      closes odoo/odoo#85414
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      7cdaf331
    • Florian Damhaut's avatar
      [FIX] lunch: allow order from different location · f7075de6
      Florian Damhaut authored
      
      Step to reproduce:
      - Have the same menu items in the different locations
      - Order one item for Office 1 click " Order now"
      - Choose different office
      - Select the same item
      
      Current Behaviour:
      - There is no 'Order now' and you can see that both orders were made
      from Office 1.
      - If you select two different items, you can click 'Order now' twice,
      but there is no button if items are the same
      
      Behaviour:
      - If you change location before adding an item already present
       you create a new line link to the new location and the 'Order now'
       button is present
      
      opw-2769168
      
      closes odoo/odoo#85942
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      f7075de6
    • Kevin Baptiste's avatar
      [FIX] lunch: show correct order price · fd283087
      Kevin Baptiste authored
      
      THe price shown on the order line was not taking into account the
      quantities ordered.
      
      closes odoo/odoo#85852
      
      Taskid: 2678064
      X-original-commit: f9243560
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      fd283087
  4. Mar 13, 2022
  5. Mar 12, 2022
    • Josse Colpaert's avatar
      [FIX] account_edi: avoid savepoint error and inform the user correctly · a135ef6c
      Josse Colpaert authored
      
      Before, when sending an invoice for the first time, it would give
      a "cannot find savepoint" traceback upon wanting to release it.
      
      We avoid that error by putting less code in the with statement,
      so the savepoint gets released a lot earlier while the record
      remains locked for the rest of the transaction.
      
      We also put a nice error message if the user can not send at the
      moment because another process is already sending.  (might happen
      more often in v15)
      
      We also updated the translation .pot as we added a new message
      and some messages were missing anyways in the .pot, so we added
      those as well.
      
      closes odoo/odoo#85905
      
      X-original-commit: e493dcfb
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      a135ef6c
    • Brice bib Bartoletti's avatar
      [FIX] l10n_eu_oss:apply tag from localization · 7dcc2ae4
      Brice bib Bartoletti authored
      This commit aims to allow assigning tags to the taxes
      created by the OSS feature by providing the xml_id of their
      report.line in the eu_tag_map.py file.
      
      Before this commit:
      In l10n_be, the taxes created by OSS (l10n_eu_services) didn't set
      the tag +47 on invoice_repartition_lines nor +49 on
      refund_repartition_lines.
      This make the VAT report for Belgium wrong.
      
      After this commit:
      Taxes created by OSS for a company using the belgian CoA will get
      their tags set properly and thus will the taxes impact the
      belgian tax report correctly.
      
      task: 2770182
      ticket: 2768622
      
      Community-PR: https://github.com/odoo/odoo/pull/85607
      
      
      
      Design choices:
      This fix is currently solving the issue for l10n_be but we have
      no doubt that it will be raised for other EU countries too.
      
      In order to provide the tags, we decided to be consistent with
      what as been done regarding the tax mapping. Thus we decided to
      create and maintain a simple mapping file and to test it.
      
      several other methods were explored:
      - create a global variable and update it from all localization
      modules. This method would work but is ugly and error prone.
      
      - create a templating method and override it from localization
      modules.
      The problem is where to set the root of the template method?
      The naïve solution would be to create a bridge module between
      l10n_eu_services and l10n_be but that would lead to an explosion
      in the number of bridge modules which we don't want.
      
      In order to keep things simple and generic, we could put the
      template method directly into the account module. But it is kind
      of ugly because account shouldn't know anything about the oss
      feature and it would encourage such a leaky design to happen
      again in the future.
      
      closes odoo/odoo#86310
      
      X-original-commit: 88021358
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      7dcc2ae4
    • Brice bib Bartoletti's avatar
      [IMP] l10n_eu_oss: makes code more readable · aedd9bf6
      Brice bib Bartoletti authored
      Improves l10n_eu_oss code readability
      
      X-original-commit: 61249a43
      Part-of: odoo/odoo#86310
      aedd9bf6
  6. Mar 11, 2022
Loading