Skip to content
Snippets Groups Projects
  1. Nov 04, 2019
    • jvm-odoo's avatar
      [FIX] event: fix email sent on duplicates · 9d9508bb
      jvm-odoo authored
      
      - Create an event
      - Add a mail reminder for it
      - Run the mail scheduler manually
      - Duplicate the event
      
      The mail reminder is sent on the duplicate too.
      This commit remove the field `mail_sent` from duplicating.
      
      OPW-2117343
      
      closes odoo/odoo#39770
      
      X-original-commit: 7fede2c0
      Signed-off-by: default avatarJason Van Malder <jasonvanmalder@users.noreply.github.com>
      9d9508bb
    • Damien Bouvy's avatar
      [FIX] sale(_timesheet): faulty computation · cf54606e
      Damien Bouvy authored
      
      The 'delivered quantity' field sometime needs to trigger a search
      on related objects (e.g. analytic lines) to know how much has been
      delivered.
      
      For performance reasons, this search is done using a read_group where
      the results are grouped by SO line.
      
      Unfortunately, this computation is sometimes launched during
      recomputes/onchanges where the line in question has a NewId instead
      of a regular id.
      
      This means that the mapping will return something like
      {240: 50.0}
      indicating that (e.g.) there are 50 timesheet hours for the SO line
      with id 240; unfortunately by doing
      mapping.get(line.id, 0.0)
      the NewId (240) is used - therefore returning a delivered quantity
      of 0.0 for a line which has actual timesheets.
      
      This commit ensures that if the line has a NewId and an original
      underlying record, the id of the latter is used as the key to fetch
      the value from the dict that contains the read_group result.
      
      Note that the problem was quite tricky to reproduce as it depended
      on the order of operations launched by triggers - the order of
      operations was important since triggering the compute with the 'real'
      record put things in order before any other piece of code could have
      spotted the issue.
      
      closes odoo/odoo#39778
      
      Signed-off-by: default avatarDamien Bouvy (dbo) <dbo@odoo.com>
      cf54606e
    • Adrian Torres's avatar
      [FIX] stock: allow unlinking records in uninstall mode · cedafe00
      Adrian Torres authored
      
      Business cases should not prevent the unlink of module-related records
      during an uninstall.
      
      This commit allows the reinstallation of sale_stock with demo data and
      also allows the proper removal of tables and records if a db has any
      non-draft inventory adjustments.
      
      closes odoo/odoo#39764
      
      Signed-off-by: default avatarAdrian Torres (adt) <adt@odoo.com>
      cedafe00
    • qsm-odoo's avatar
      [FIX] web_editor: put the snippet editor UI at the correct DOM position · 86d12706
      qsm-odoo authored
      Commit https://github.com/odoo/odoo/commit/4f27e52cabb77b8b1a9637a11185ddf882adc9af
      
      
      had to instantiate the snippet editor UI differently but the hack broke
      the position of the oe_manipulator which is supposed to be at the top
      left of the editable zone.
      
      closes odoo/odoo#39751
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      86d12706
    • qsm-odoo's avatar
      [FIX] web_editor: do not reposition overlay over an hidden element · b8d7c69d
      qsm-odoo authored
      Could be the cause of flickering during multiple recomputation of the
      overlay position.
      b8d7c69d
    • Julien Castiaux's avatar
      [IMP] doc: clarify dep installation for linux · f7d0022f
      Julien Castiaux authored
      
      Someone new to Linux can run into problems when some system dependencies
      are missing. There is a single sentence warning talking about those hard
      dependencies and it does not explain how to install them.
      
      Added two § containing the missing `apt` commands required to install
      the dependencies on a fresh debian minimal install.
      
      closes odoo/odoo#38948
      
      Signed-off-by: default avatarJulien Castiaux <Julien00859@users.noreply.github.com>
      f7d0022f
    • Paul Morelle's avatar
      [FIX] link_tracker: support any url · 616e1456
      Paul Morelle authored
      
      URLs with parameters were not correctly supported by the regular
      expression.
      For example, URLs with parameters were truncated before the '?'.
      
      This patch adds support for a wider range of URLs, and checks in a test
      that the parameters are correctly handled.
      
      closes odoo/odoo#39716
      
      Signed-off-by: default avatarRémi Rahir (rar) <rar@odoo.com>
      616e1456
    • jvm-odoo's avatar
      [FIX] base: fix merge partner wizard · 014f3bbc
      jvm-odoo authored
      
      In the contacts app, you can select 2 partners and merge them.
      
      Before this commit:
      
          - If a partner was added by a SQL query and not directly on Odoo,
            the create_date will be empty. This causes a crash because the
            merge wizard try to sort the partners by date
      
      After this commit:
      
          - If a partner do not have a create_date, it will be considered
            as 01/01/1970. The merge wizard will sort the partners by IDs too.
      
      OPW-2091925
      
      closes odoo/odoo#39518
      
      X-original-commit: deeb769c
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      014f3bbc
    • Nicolas Lempereur's avatar
      [FIX] sale: have sender in SO confirmation email · 6aebb523
      Nicolas Lempereur authored
      
      Before 13.0 .sudo() before sending a mail would send it as superuser user
      (which was the intention in this case), but since 13.0 for the same
      intention we need .with_user(SUPERUSER_ID).
      
      Without this change, the confirmation email on a sale order would have
      no sender ending up in failure.
      
      opw-2118612
      closes #39737
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      6aebb523
    • Nicolas Lempereur's avatar
      [FIX] website_sale: send extra step as public user · 7b1654a1
      Nicolas Lempereur authored
      
      The extra informations not on the sale.order models were sent before
      13.0 with the superuser user. In 13.0 with the change of `sudo` and
      `with_user` behavior, we were now in superuser mode but not with the
      superuser so the mail would error (no from address) and the sale order
      would error.
      
      With this changeset, we get back to the pre-13 behavior.
      
      opw-2116346
      closes #39730
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      7b1654a1
    • Aaron Bohy's avatar
      [FIX] web,sale_product_matrix: allow to open matrix · 49626acb
      Aaron Bohy authored
      
      Before this rev, it crashed when opening the (sale or purchase)
      product matrix (e.g. on runbot, go to quotations, create, add a
      line, select 'My Company tshirt').
      
      This was due to a recent override of _applyChanges (see 4bf98b47),
      which didn't return the value returned by super.
      
      OPW 2116083
      
      closes odoo/odoo#39717
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      49626acb
    • Xavier Morel's avatar
      [FIX] core: SIGXCPU in worker processes · 659fcfec
      Xavier Morel authored
      
      odoo/odoo#30688 (6ce2d6ef) added an
      indirection in prefork workers: Python-level signal handlers are
      delayed until native calls have ended (e.g. accept() or
      execute()). Running the actual work in a sub-thread allowed the main
      thread to handle signals in all cases.
      
      However there is apparently an issue with SIGXCPU on linux (possibly
      other cases as well): SIGXCPU is delivered to the child thread (if
      possible?) and Thread.join apparently stops it from redelivered to
      the main thread (Thread.join is signal-interruptible since 3.2 but
      possibly not Python-interruptible).
      
      Blocking SIGXCPU on the child thread causes the OS to deliver on the
      main thread and fixes the issue.
      
      Also split set_limits so it sets the signal handler in the parent
      thread but properly updates the soft limit in the child after each
      request, as the goal is to put a hard limit on the CPU time per
      request, not on the worker. 6ce2d6ef would set the limit once then
      never update it, likely cycling workers more than desired.
      
      While at it:
      
      * block other signals with a handler set, they seem to work
        regardless on linux but other OS may have a different way of
        dispatching process-directed signals
      * unset signals which are set by the prefork server but whose
        set behavior makes no sense in workers:
      
        - TERM and CHLD were already unset
        - HUP is used to restart the server, workers can just be killed
        - TTIN and TTOU configure the number of workers
      
      closes odoo/odoo#39723
      
      X-original-commit: 549bd199
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      659fcfec
    • Joseph Caburnay's avatar
      [FIX] point_of_sale: uninvoiced orders' state not set to 'done' · bb490301
      Joseph Caburnay authored
      
      Prior to this commit: b234e97f,
      uninvoiced orders' state is set to 'done' when the session is validated.
      However, this was not taken into consideration in the said commit such
      that even if the session is already validated, the uninvoiced orders'
      state remains 'paid'.
      
      Setting the orders state to 'done' is the correct behavior and is
      implemented in this commit.
      
      closes odoo/odoo#39720
      
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      bb490301
    • Nikunj Ladava's avatar
      [FIX] payment_stipe: fix empty card error · 01b143b9
      Nikunj Ladava authored
      
      before this commit, when try to make payment with
      empty card details, it will raise error dialog.
      
      after this commit, error will be append to acquirer
      form
      
      task - 2089999
      
      closes odoo/odoo#39708
      
      Signed-off-by: default avatarDamien Bouvy (dbo) <dbo@odoo.com>
      01b143b9
    • Lucas Perais (lpe)'s avatar
      [FIX] account: exchange rate difference when payment in domestic · 72edcece
      Lucas Perais (lpe) authored
      
      Make an invoice in Foreign
      Make a refund in Foreign
      reconcile the two, partially
      
      Make a payment in domestic, partial also, but with writeoff
      
      Before this commit,
      
      The invoice was not fully reconciled and -0.02 was yet to pay on it
      Notice the negativity of that number, which actually means that it HAS been
      fully reconciled !!!! (there is too much payment compared to invoiced)
      
      This was because, the account.payment in domestic currency is doing:
      Invoice residual in foreign, converted to domestic
      
      Then that amount minus payment's amount gives write off amount in domestic
      
      Then, at reconciliation, the whole payment's amount, which is
      the payment + the writeoff contained the expected and mathematically
      correct conversion and currency rounding errors
      (which should make out the exchange difference)
      
      The exchange difference IS created, and rightfully too
      that is, it records the exchange difference as debit 0.01 in the receivable !
      
      What was tricky though, is that the partial line recorded the debit 0.01 receivable
      as its CREDIT move line !
      
      After this commit, the receivable line is recorded as the DEBIT move line of
      the partial between the payment and the invoice
      so the invoice, is fully paid.
      
      We keenly admit this is hackish, but justified:
      - business-wise: the rounding/exchange errors are appearing ex-post
      to the choice of the amount of the reconciliation between the payment
      and the invoice, because we are reconciling them on the domestic amount
      
      - technically: our hands are tied because some key information is not present
      every time, and weirdly, not symmetrically. That is, the computation of
      line.amount_residual[currency] may be different if your are on a line with a currency,
      or on a line that doesn't.
      We should really think of systematically putting the currency on the line
      whichever it is ! The same goes for partial reconciliation model !
      Touching the current behavior is out of the question.
      
      Moreover, we should take into account that comparing amounts at different
      points in time should be done by actualizing those amounts to a common date
      See #39117 for details
      
      OPW 2057845
      
      X-original-commit: 40db7a8c
      
      Note that the tests did not change in spirit, but the writing
      of the exchange difference may vary from happened in v11.0
      Indeed a quite big refactoring has been done in between
      The tests reflect this
      
      closes odoo/odoo#39685
      
      Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
      72edcece
    • Arnold Moyaux's avatar
      [FIX] stock: product quantity with force company and location · e77d9fc7
      Arnold Moyaux authored
      
      Usecase to reproduce:
      - Set warehouse as 3 steps delivery
      - On pack rule set the procure method as 'take from stock if enough or
      trigger another rule'
      - Do an inventory adjustement of a product and set 10 units in pack zone
      - Do a delivery order for this product with only 1 unit.
      
      It will create the delivery order from stock to pack even if the
      quantity in pack was sufficient.
      
      It's due to [1] that introduce a new function but if the force company
      and location (with an integer) are both set in the domain it will
      select the wrong ids. It will take all the location in the company + the
      location in the context. However if a location is explicitly given to
      the context, it should only consider the stock at this location.
      
      [1] commit 330b99f6
      
      opw-2090384
      
      closes odoo/odoo#39644
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      e77d9fc7
    • Victor Feyens's avatar
      [IMP] base, doc: orm page refactoring. · 7ce7c585
      Victor Feyens authored
      
      closes odoo/odoo#36130
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      7ce7c585
    • Goffin Simon's avatar
      [FIX] hr_holidays: Impossible to allocate future leaves · 6bc9e692
      Goffin Simon authored
      
      Steps to reproduce the bug:
      - Let's consider Today = 31/10/2019
      - Create a new hr.leave.type LT and set a validity from 01/01/2020 to 31/12/2020
      - Set mode = Free Allocation Request and Validation = No Validation
      - Try to create leave allocations for LT
      
      Bug:
      
      It was impossible to create a leave allocation for LT because Today < 01/01/2020
      So it was impossible to allocate future leave.
      We had to wait the 01/01/2020 to make the allocation of LT leaves
      
      So now, when no default_date_from is in the context, no domain is applied
      
      opw:2092830
      
      closes odoo/odoo#39645
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      6bc9e692
    • Goffin Simon's avatar
      [FIX] mrp: Updating cost from Bom Structure & Cost · e984d8f9
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider two storable products P1 and P2
      - Update the cost of P2 to 10€
      - Create a BOM for P1 with P2 as component
      - Click on Bom Structure & Cost
      - Click on P2
      - Try to update the cost
      
      Bug:
      
      A traceback was raised saying that "Record does not exist or has been deleted" or the cost of an other
      product was displayed because the active_id was still the id of the bom.
      
      opw:2093199
      
      closes odoo/odoo#39657
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      e984d8f9
    • fw-bot's avatar
      [FIX] core: is_false has lots of false negatives over RPC · a44f008b
      fw-bot authored
      
      `is_false` relies on no small part on equality tests between the input
      triplets and either `TRUE_LEAF` or `FALSE_LEAF`. While these are
      defined as tuples, RPC domains will always be lists (as neither
      XML-RPC nor JSON have tuples, and their arrays deserialize to Python
      lists).
      
      This is an issue, because tuple and list never compare equal. As a
      result, while the in / not in predicates can succeed, the TRUE_LEAF /
      FALSE_LEAF never will, and thus domains which contain either and might
      shortcut (avoid a query entirely) will always go through the entire
      process.
      
      Fix by having domain normalization also ensure all triplets are
      tuples: that's the first thing `is_false` does, it should never cause
      issues and could fix / improve / shortcut other routines.
      
      Note: Also implements TRUE_LEAF and FALSE_LEAF handling in the
            SSF's modifiers evaluator. And fixes the ValueError to work
            correctly if it breaks on a tuple / dict.
      
      closes odoo/odoo#39684
      
      X-original-commit: 225f14e2
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      a44f008b
  2. Nov 03, 2019
  3. Oct 31, 2019
    • Nans Lefebvre's avatar
      [FIX] website_form: multiple input files with same name · 12a2d11a
      Nans Lefebvre authored
      
      By default, the name of a file input field is 'Custom File Upload'.
      If there are two fields with the same name, then they both end up in
      self.form_fields with the name 'Custom File Upload[0]', and their values
      are concatenated, which are file objects. So the concatenation of two
      files is a String, ('[object File],[object File]'), because JavaScript.
      (And if you don't like it you don't like the web nor human progress.)
      
      The resulting bug is that instead of adding attachments to the created
      record, it adds the string message to the notes.
      
      Adding the outer loop index disambiguates the names, so that all
      attachments are created as intended.
      
      opw 2092653
      
      closes odoo/odoo#39669
      
      X-original-commit: 5df3f662
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      12a2d11a
    • Nans Lefebvre's avatar
      [FIX] models: manage environment when loading records · 1a315e87
      Nans Lefebvre authored
      
      When testing the import of records, a flush should be done to check
      all databases constraints and fields computations.
      Moreover, in case an exception is raised within a savepoint,
      the environment should be cleaned up, to avoid tricky bugs (see below).
      We replace the manual handling of savepoints with the savepoint
      context manager, which already handles all of this.
      This code predates the context manager, so in a way it was archaic.
      
      When testing the import of records, the following could happen:
      "An unknown issue occurred during import (possibly lost connection,
       data limit exceeded or memory limits exceeded)."
      This would happen on project tasks; the fields 'working_hours_open',
      'working_hours_close', 'working_days_open', 'working_days_close',
      all depend on the computation of _compute_elapsed.
      Because this is a test import, the records would raise a MissingError,
      and fields_to_compute would always contain 3 of the fields.
      The resulting is an infinite loop giving this error.
      
      opw 2092134
      
      closes odoo/odoo#39627
      
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      Co-authored-by: default avatarRaphael Collet <rco@odoo.com>
      1a315e87
    • fw-bot's avatar
      [FIX] hr_fleet: count distinct vehicle_id per driver · c98a5041
      fw-bot authored
      
      closes odoo/odoo#39249
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      Co-authored-by: default avatarLucas Lefèvre <lul@odoo.com>
      c98a5041
    • Swapnesh Shah's avatar
      [FIX] event_sale: flush out fields to recompute state correctly · 46b16813
      Swapnesh Shah authored
      
      Before this commit, the values of these 3 fields in database may be
      desynchronised with the one set in the cache by the ORM but not
      commited yet.
      
      Before this commit, when confirming an attendee, the count was not
      correctly recomputed. '_compute_seats' was triggerd when changing the
      state of the registration but the value of 'state' was still the one
      before the confirmation, making the sum outdated.
      
      Note that two constraints are raised when modifying the field state:
      - _check_seats_limit
      - _check_ticket_seats_limit
      
      If _check_seats_limit is executed first, the bug does not occures
      because it first triggers the '_compute_seats' method on event.event
      model, which has a correct flush method.
      
      If _check_ticket_seats_limit is executed first, the bug occures
      because the '_compute_seats' of event.registration is triggered first,
      which did not have the flush implemented.
      
      Fixes odoo/odoo#38340
      
      closes odoo/odoo#38907
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      46b16813
    • Goffin Simon's avatar
      [FIX] website_sale: Wrong price_unit in the cart · 5e562eae
      Goffin Simon authored
      
      Steps to reproduce the bug:
      - Let's consider two companies C1 and C2
      - Let's consider website W
      - Activate multi-company
      - Disable common contact book and common catalog
      - Switch the superuser in company C2
      - Activate pricelist
      - Create a public pricelist PL for C1 and available on W
      - Set up a pricelist with compute price = formula and  based on = cost
      - Go Sales > Configuration > tick Multiple Sales Prices per Product and tick Prices computed from formulas
      - Create a portal user PU and set PL on him
      - Create a product P with cost = 10$ and publish it on W
      - Set up the product valuation as: automated
      - Log as PU and go on the shop
      - Put P on your cart
      
      Bug:
      
      The price of P was 0$ instead of 10$
      
      opw:2092695
      
      closes odoo/odoo#39632
      
      X-original-commit: b49bf150
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      5e562eae
    • Goffin Simon's avatar
      [FIX] website_forum: Empty question error · 51f660c9
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Ask a question in the forum with a title but with no content
      
      Bug:
      
      A traceback was raised.
      
      opw:2093665
      
      closes odoo/odoo#39625
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      51f660c9
    • qsm-odoo's avatar
      [FIX] web_editor: prevent creating editors for the same element twice · 497bc892
      qsm-odoo authored
      It was technically possible that two editors for the same element are
      created in the same JS stack execution... and since 13.0 and the
      use of native promises, it happens everytime a block is dropped in the
      page.
      
      Note: this commit fixes the problem with minimal code but the logic
      should be improved in master.
      
      closes odoo/odoo#39641
      
      X-original-commit: https://github.com/odoo/odoo/commit/54d032bb66013b32fb4def2216f77f7890ce31df
      
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      497bc892
    • qsm-odoo's avatar
      [FIX] web_editor: onBlur was sometimes not called when it should have · 502db91c
      qsm-odoo authored
      
      There recently were some fixes to the system of onFocus/onBlur with the
      new left panel of the 13.0 editor and one still remained: the onBlur
      method was most of the time called only on the main snippet options and
      not the child ones. Now it works as it should, even if the system logic
      has to be improved to be more robust.
      
      One difference remains with 12.0 but this can be considered as a change
      for the 13.0 version: the parent options onFocus/onBlur are called
      before the child options while it was the opposite before.
      
      closes odoo/odoo#39648
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      502db91c
    • Jorge Pinna Puissant's avatar
      [FIX] payment_*: multiwebsite base_url · 52e9b0fc
      Jorge Pinna Puissant authored
      
      Fine-tunning of 937b5c07
      
      Have a multiwebsite setup
      have a payment installed for one of the two websites
      
      Make an order on that website and try to pay
      
      Before this commit, the transaction doesn't come back to odoo's
      payment success controller
      This was because the return url was set to the web base url ICP
      
      After this commit, the payment success page is opened as we took
      the request's url as the return url
      
      opw-2080352
      
      closes odoo/odoo#39639
      
      X-original-commit: a9fb15b3
      Signed-off-by: default avatarJorge Pinna Puissant (jpp) <jpp@odoo.com>
      52e9b0fc
  4. Oct 30, 2019
  5. Oct 31, 2019
    • jvm-odoo's avatar
      [FIX] account: fix paid invoice send by email · 18abdcf7
      jvm-odoo authored
      
      When you create an invoice, you can register a payment to mark it as
      "paid".
      
      Before this commit:
      
          - You can't send & print the invoice anymore.
      
      After this commit:
      
          - The button send & print is displayed
      
      The second "send & print" button's domain was incorrect.
      
      OPW-2115720
      
      closes odoo/odoo#39624
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      18abdcf7
    • Josse Colpaert's avatar
      [IMP] l10n_ch: add autres mouvements de fonds on vat report · 0f3c9aad
      Josse Colpaert authored
      
      Add Section III on the vat report.  We also created
      2 taxes at 0% which base amounts will be taken for the
      report.
      
      Task 2066705
      
      closes odoo/odoo#39049
      
      Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
      0f3c9aad
    • Josse Colpaert's avatar
      [IMP] l10n_ch: deconfuse BVR implementation · b4943737
      Josse Colpaert authored
      The BVR implementation was confusing as it
      seemed to only take into account the case where the postal
      account belonged to PostFinance itself and not to another
      bank, where the same number is shared among multiple accounts.
      Also, the purpose of the fields was confusing.
      
      Adaptations done:
      - When you add a bank account of type postal in the account number,
      there is an onchange that automatically puts it in the postal account
      field and makes itself unique by adding the name of the partner to
      the account number. The account will still be detected as "postal".
      - Improve help message of the postal account field on the bank account
      as it is used for two different purposes (Client Number for own accounts
      and postal number for "postal" vendor accounts)
      - Only show the subscription fields when you have to do with a bank
      account related to your own accounts / Switzerland
      - Add fields in the Add Bank Account wizard if it is for Switzerland
      (subscription number and the postal field we label "Client Number")
      - Also label Client Number on the journal form for postal field
      - Don't remove zeros in front of the client number on the BVR
      - Don't put extra - in the subscription number on the BVR if it has
      some - already
      - Use number without spaces for payment reference
      - For the CAMT import, it is also possible that we need to split
      the account number, because of their non-uniqueness.
      
      Task 2082050
      b4943737
    • Lucas Perais (lpe)'s avatar
      [FIX] web: dropdowns can't be in a relative-positioned element · 7f72b837
      Lucas Perais (lpe) authored
      Before this commit, when a dropdown overflew its container
      i.e. in the case of a long filter menu in modal
      The scrolling of that dropdown to get to Add custom Filter
      was impossible
      
      This was because dropdowns react pretty bad when contained in a
      relative positioned container
      
      https://github.com/twbs/bootstrap/issues/26512
      https://github.com/twbs/bootstrap/issues/28513 !!
      
      After this commit, the btn-group that adds the relative positioning
      is forced into the default value
      
      This commit corrects what was initially
      corrected at https://github.com/odoo/odoo/pull/37594
      
      
      in v12.0.
      The incriminating commit that retriggers the issue
      is irrelevant because it is the refactoring of action manager
      but here it is: 40dd1219
      
      closes odoo/odoo#39541
      
      closes odoo/odoo#39620
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
      7f72b837
    • Lucas Perais (lpe)'s avatar
      [FIX] web: dropdown in modal in RTL mode · 105b4aff
      Lucas Perais (lpe) authored
      Be in Right to left
      
      Open a m2o search more, to get onto the list modal
      toggle the filters menu
      
      Before this commit, the filters dropdown was almost invisble
      and too much on the right anyway
      
      This was because the RTL was not taken into account
      
      After this commit, we anchor the dropdown on the right
      (both as in good and as in side) side of its trigger button
      
      Also, when modifying the dropdown, by developping the Custom Filter
      we force the repositioning of the dropdown, to take those new elements
      into account
      
      It is expected though that after this commit, in RTL, the
      dropdown in a modal that has a scrollbar (which is on the left)
      will be slightly pushed to the right. It is usable and visible though
      Some kind of plumbing using $el.data('offset', fn) from popper.js
      is possible, but has been deemed not robust enough
      
      Docs
      https://getbootstrap.com/docs/4.0/components/dropdowns/#methods
      
      OPW 2088934
      105b4aff
  6. Oct 30, 2019
  7. Oct 31, 2019
    • jvm-odoo's avatar
      [FIX] web: fix form view dropdown's buttons shifted on Edge · a7d9f2a5
      jvm-odoo authored
      
      In form views, there are stat buttons.
      
      When the window size is too small, some buttons are packed into
      a "More" dropdown.
      
      Before this commit:
      
          - The form view dropdown's buttons are shifted on Microsoft Edge
            and IE 11.
      
      After this commit:
      
          - The form view dropdown's buttons are not shifted anymore on
            Microsoft Edge and IE 11.
      
      There was a fixed line-height on the button's icon. On Edge and IE 11,
      it makes the icon moving down and this causes the offsetting.
      
      The purpose of the line-height was to fix the button height to 44 pixels
      
      So, I set up the button's height and centered the content.
      
      Also, I removed a useless border-left because there was already one
      border on the dropdown container.
      
      OPW-2079694
      
      closes odoo/odoo#39380
      
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      a7d9f2a5
  8. Oct 25, 2019
    • fw-bot's avatar
      [FIX] web: fix form view "More" button · 2bda8230
      fw-bot authored
      In form views, when the window size is too small, a "More" button
      appears and it should contain the overflow buttons.
      
      On all browsers, the "More" dropdown doesn't contain the expected
      amount of buttons, so it is shifted on the second line.
      
      Before this commit:
      
          - The "More" dropdown doesn't contain the expected amount of
            buttons, so it is shifted on the second line.
      
      After this commit:
      
          - The "More" dropdown contains the expected amount of buttons
            and it is not shifted on the second line anymore.
      
      OPW-2079694
      
      X-original-commit: f04f67e686348fa8e7b951d773b199d76ac32015
      2bda8230
  9. Oct 31, 2019
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] http: disable cache-control header (debug) for wkhtmltopdf · 8cac60be
      Andrea Grazioso (agr-odoo) authored
      Activate developer mode, generate a report (print an invoice)
      
      The report will have missing pieces, like the footer or some part of the
      header. This is probably caused by wkhtmltopdf not loading properly some
      resources
      
      Wkhtmtopdf generate the same warning message for every problematic resource:
      "Warning: Received createRequest signal on a disposed ResourceObject's
      NetworkAccessManager. This might be an indication of an iframe taking
      too long to load."
      
      Related issue on wkhtmltopdf project page:
      wkhtmltopdf/wkhtmltopdf#1865
      wkhtmltopdf/wkhtmltopdf#3933
      wkhtmltopdf/wkhtmltopdf#2565
      
      The problem is located in the response that wkhtmltopdf receive:
      in debug mode the header of the response contains
      'Cache-Control: no-cache' which probably create a race condition during
      the rendering while a second request is attempted to verify the
      resources.
      
      Adding a raw user agent check to not include this header directive
      fix the problem
      
      Notes from odony:
      
      We've considered some alternative solutions to preserve the purpose of the
      DisableCacheMiddleware without having to explicitly test for wkhtmltopdf.
      
      * 'Cache-Control: no-cache' (current behavior) breaks wkhtmltopdf rendering
      * 'Cache-Control: no-store' breaks wkhtmltopdf rendering too
      * 'Cache-Control: max-age=0' breaks wkhtmltopdf rendering too. It works
      when increasing the delay to a few seconds, but no magic value will work
      for very long documents, or it will stop serving its purpose, so it's not a
      viable option.
      * 'Cache-Control: must-revalidate' does not break wkhtmltopdf rendering (no
      duplicate requests at all), but it is not clear from the RFC
      (https://tools.ietf.org/html/rfc7234#section-5.2.2.1
      
      ) that it
      will have the intended effect for our middlewar
      
      opw-2086708
      
      Closes #38394
      
      closes odoo/odoo#39236
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      8cac60be
Loading