Skip to content
Snippets Groups Projects
  1. Oct 14, 2019
    • Lucas Lefèvre's avatar
      [FIX] website: Display duplicate login error message · d133df58
      Lucas Lefèvre authored
      
      When you try to create two users with the same login, the shown error message is
      the Postgresql integrity error instead of a nice (translated) validation error.
      This happens since bf88f3e3 which changed the way error messages are translated.
      
      The reason is the manually created unique index `res_users_login_key_unique_website_index`.
      The error handling and translation mechanisms don't know it exists.
      The index was created for performance reasons in commit b5a12b4a where the
      original python constraint was replaced with this custom SQL index.
      
      In this commit, the python constraint is re-introduced to remove the index hack,
      but the implementation now uses a single SQL query, which should be quite fast.
      
      closes odoo/odoo#38737
      
      X-original-commit: 817a811e
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      d133df58
    • Lucas Lefèvre's avatar
      [FIX] web: Avoid blinking attachment box · 8c15358e
      Lucas Lefèvre authored
      
      Go to hr.applicant view form, Edit and change something.
      Each time you change a field, the Attachment box in the chatter is toggled
      (as if you were clicking on the small attachment button each time).
      This a wrong behavior of the `open_attachments` option of the `mail_thread`
      widget.
      Opening the attachment box should be done at the widget initialisation,
      not at every render.
      
      closes odoo/odoo#38720
      
      X-original-commit: 400a1f7b
      Signed-off-by: default avatarlul-odoo <LucasLefevre@users.noreply.github.com>
      8c15358e
    • Pierre Masereel's avatar
      [FIX] pos_restaurant: floor plans deletion · 52b3daf2
      Pierre Masereel authored
      When you try to delete a floor, an error is raised if a pos config has
      an opened session. Even if the floor is not used in the opened pos
      config.
      
      The real goal of this constraint is to avoid deleting a floor plan
      linked to a pos config having an opened session.
      
      Github issue: https://github.com/odoo/odoo/issues/38581
      
      
      
      closes odoo/odoo#38719
      
      X-original-commit: 9ec5a4c0
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      52b3daf2
    • Yenthe666's avatar
      [FIX] website_event_track: make location name required · 1112313d
      Yenthe666 authored
      
      Creating a location without name does not make sense, it is the only
      field of the model
      Fixes odoo/odoo#38571
      
      Adapt in master to make the field required at the model
      
      closes odoo/odoo#38718
      
      X-original-commit: 0823062e
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      1112313d
    • Sébastien Theys's avatar
      [FIX] tools, base: fix orientation of image with EXIF orientation tag · 3c3f0753
      Sébastien Theys authored
      
      Before this commit, some images would display incorrectly orientated.
      
      This typically happens for images taken from a non-standard orientation
      by some phones or other devices that are able to report orientation.
      
      The specified transposition is applied to the image before all other
      operations, because all of them expect the image to be in its final
      orientation, which is the case only when the first row of pixels is the top
      of the image and the first column of pixels is the left of the image.
      
      Moreover the EXIF tags will not be kept when the image is later saved, so
      the transposition has to be done to ensure the final image is correctly
      orientated.
      
      closes odoo/odoo#38717
      
      X-original-commit: 0f8e132e
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      3c3f0753
    • fw-bot's avatar
      [FIX] base: impossible to change contact name format · 728e2387
      fw-bot authored
      
      - Create a sales order for a company with a contact name.
      - Click the Preview button.
      - The company and contact names appear on the same line, only separated by a
      comma.
      
      Before this commit:
      
      it's not possible to easily override this behavior.
      
      After this commit:
      
      it's possible to override `Partner._get_contact_name` to change the format of
      contact name.
      
      Beware that this method is used in `_get_name` which is called from various
      places. A check on the context may be necessary.
      
      closes odoo/odoo#38712
      
      Opw: 2077294
      X-original-commit: 0b8f3f93a2cb05cc9c940964fe80acd23b86b8a0
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      728e2387
    • Romeo Fragomeli's avatar
      [FIX] base: a traceback appear when we test SMTP connection in technical settings · 1c1b440a
      Romeo Fragomeli authored
      
      Before this commit, in base we use bus to notify the user but bus module
      is not always installed and so we can't call it.
      
      After this commit, now we use a client action to notify the success test.
      
      Steps to reproduce:
      * install a Odoo with no apps
      * go in debug mode
      * go to "Outgoing Mail Servers" technical settings
      * create a valid SMTP record
      * click on "Test Connection" button (BUG)
      
      closes odoo/odoo#38709
      
      X-original-commit: ea411374
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      1c1b440a
    • Romeo Fragomeli's avatar
      [FIX] web: not possible to show a notification via client action · 547d2d87
      Romeo Fragomeli authored
      Before this commit, it was not possible to show a message using a client
      action. (e.g. show a success message only with core in Python)
      
      Now, it's possible using a client action. This client action call
      displayNotification and so we can use the same options also.
      
      A test is added to be sure that this action do not change the current action
      
      Note: in the future a custom registry may be created in a refactoring
      to specific function action registry.
      
      X-original-commit: 8775fd67
      547d2d87
    • Romeo Fragomeli's avatar
      [FIX] web: warn is show when a client action is a function · 3e5cc15d
      Romeo Fragomeli authored
      Before this commit, if we use some client action like: reload, logout, ...
      in the console a warning is show, because the action are function and not
      AbstractAction.
      
      After this commit, if the client action is not an function and not
      a AbstractAction the warning is show.
      
      X-original-commit: 122b7659
      3e5cc15d
    • Thibault Delavallée's avatar
      [IMP] mail: reorganize mail message code · c737dd50
      Thibault Delavallée authored
      
      Purpose of this commit is to reorganize mail.message file in order to
      better understand its content. It is done according to guidelines
      
        * computed fields;
        * CRUD and search / check access overrides;
        * actions (discuss, moderation, fetch / failure);
        * tools;
      
      Even if this commit generates a big diff, there only some main blocks code
      move. Nothing is changed and functionally as well as technically nothing
      changes.
      
      closes odoo/odoo#38695
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      c737dd50
    • fw-bot's avatar
      [FIX] purchase: vendor price not converted to default UoM · 2ce0dcb6
      fw-bot authored
      
      -Define "g" as the default UoM for a product.
      -Make a purchase order with that product.
      -Select the "kg" UoM in the order line and a price of 50.
      -Check the Purchase tab of the product.
      
      Before this commit:
      
      the UoM of the price created is the default UoM for the product, "g".
      This is because it's a related field.
      However, the price wasn't converted to the default UoM, it's still 50.
      
      After this commit:
      
      the price is converted to the default UoM, it's 0.05 per "g".
      
      closes odoo/odoo#38688
      
      Opw: 2076722
      X-original-commit: 341b5687
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      2ce0dcb6
    • Swapnesh Shah's avatar
      [IMP] account: Don't allow Invoice creation from Payment · 89d32931
      Swapnesh Shah authored
      Fixes https://github.com/odoo/odoo/issues/38233
      
      
      
      New Invoices shouldn't be created from Payment screen.
      
      closes odoo/odoo#38687
      
      X-original-commit: 44226ec4
      Signed-off-by: default avatarQuentin De Paoli (qdp) <qdp@openerp.com>
      89d32931
    • Swapnesh Shah's avatar
      [FIX] fleet: assign value for every record · 8f2716e1
      Swapnesh Shah authored
      
      Fixes #38574
      Assigning default value for non-stored compute fields is required in
      13.0
      
      closes odoo/odoo#38685
      
      X-original-commit: 7fa80370
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      8f2716e1
    • wan's avatar
      [FIX] account: add the payment reference on the payment · 3fe24ac5
      wan authored
      OPW 2082843
      The communication on the register payment took the vendor reference or
      the invoice name by default. Now, it first looks at the payment reference
      value.
      
      closes odoo/odoo#38683
      
      X-original-commit: 6e1a8218
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      3fe24ac5
  2. Oct 12, 2019
  3. Oct 11, 2019
    • Quentin De Paoli's avatar
      [FIX] account: type of entries created by reversals · 25dc2787
      Quentin De Paoli authored
      
      Only invoices/bills should create their equivalent credit notes when reversed (with tax tags coming from the related repartition lines), other kinds of journal entries should be reversed as misc entries, to negate them entirely in the accounting
      
      closes odoo/odoo#38547
      
      X-original-commit: cdb3ccf8
      Signed-off-by: default avatarQuentin De Paoli (qdp) <qdp@openerp.com>
      25dc2787
    • RomainLibert's avatar
      [FIX] sms: avoid cache miss in compute · dfd25263
      RomainLibert authored
      
      We should always ensure to assign something in a compute method
      
      Since sms_template_id is not required, we have to check that it is set
      before trying to render the template
      
      Also make sure to have a default value in case you don't have a res_id
      
      closes odoo/odoo#38546
      
      X-original-commit: b96bb2a0
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      dfd25263
    • RomainLibert's avatar
      [FIX] sms: avoid crashing when no res_model of res_ids · e5f41040
      RomainLibert authored
      
      sms_composer could crash in case you didn't pass it the active_id,
      active_ids context keys or don't call the default_get
      
      In that case it would try to access `self.env[False]` which would crash
      in the `_compute_recipients_count`
      
      We also have to ensure that we have a default value for `self.res_ids`
      because `literal_eval(False)` will crash
      
      closes odoo/odoo#38545
      
      X-original-commit: 7ed0bd25
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      e5f41040
    • Nans Lefebvre's avatar
      [FIX] sale: small cleanup of line computations · 25004a95
      Nans Lefebvre authored
      
      Initially a forward-port of 5aecd365, which needed f407e60a to work.
      
      The do_in_onchange was removed inbetween, but it is not needed anymore here.
      The issue was caused by the fact that the cache values given for each
      environment, whereas in the new ORM the values are now shared across all.
      
      The other potential issue caught by this test was that the company of the taxes
      could be incorrect. This is problematic for the end user, since relational that
      violates inter-company rules mean that they won't be able to read or write
      the records without sudo. However the model now has _check_company_auto,
      handled by the ORM, so the issue should not arise anymore.
      
      closes odoo/odoo#38543
      
      X-original-commit: 30cf4b37
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      25004a95
    • Nans Lefebvre's avatar
      [FIX] models, test_access_rights: restore normal ACL check · 60534c65
      Nans Lefebvre authored
      
      Because of 4b1cb41c, we might try to read
      the field 'active' on a record on which we can't read fields besides the name.
      This thus triggers an access error where there should not have been.
      
      In particular, this is the case for portal users: most often the records they
      can access point to records that they can't read
      (e.g. the partner of the internal user assigned to the ticket).
      As a result, clicking on any link creates an ACL, and thus redirects to the
      home page.
      
      It turns out that filtered_domain was primarily used on already loaded records,
      typically for the write, so it was assumed that the records could be read
      in the first place.
      However in the use-case of the portal, there is an explicit check on the read
      rights with the portal user, explaining the discrepancy.
      
      Since in the general case filtered_domain should be able to read all fields
      to evaluate the domain, we put it in sudo.
      
      fix co-authored with @rco
      
      closes odoo/odoo#38540
      
      X-original-commit: cff5cc8c
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      60534c65
    • Nans Lefebvre's avatar
      [FIX] ir_model: adapt _inherited_models computation · 212294fe
      Nans Lefebvre authored
      Computed fields need to always be assigned a value now.
      
      X-original-commit: a5fc616c
      212294fe
    • Josse Colpaert's avatar
      [FIX] l10n_co: change name of RUT document type to NIT · 973a5759
      Josse Colpaert authored
      
      The RUT is the Registro Único Tributario;
      the NIT is the Número de Identificación Tributaria.
      
      The number that is used is thus the NIT.
      
      opw 2082599
      
      closes odoo/odoo#38533
      
      X-original-commit: 1db209ac
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      973a5759
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] l10n_co: crash when adding contact · 8a098afa
      Andrea Grazioso (agr-odoo) authored
      
      Install l10n_co,contacts. Open contacts.
      
      Several crash messages will popup because the override in l10n_co of
      res_partner is not computing the 'l10n_co_verification_code' field for
      every record. Changing the implementation to be sure to store some value
      for every record fix the issue.
      
      opw-2082583
      
      closes odoo/odoo#38473
      
      X-original-commit: 2489c405
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      8a098afa
    • jbm-odoo's avatar
      [FIX] web: List editable top select last row · 3fa123d6
      jbm-odoo authored
      
      Before this commit, when we have a list (editable top) in a form
      with some mandatory fields and some existing rows. If we click on
      'add a line', a new empty line appear on the top, then we click on
      the last row, the empty row will disappear and we will have a
      traceback.
      
      After this commit, if we repeat this scenario, we click on the last
      row, we will be able to edit this last row.
      
      closes odoo/odoo#38471
      
      X-original-commit: 996f77b0
      Signed-off-by: default avatarjbm-odoo <jbm-odoo@users.noreply.github.com>
      3fa123d6
  4. Oct 10, 2019
  5. Oct 11, 2019
  6. Oct 12, 2019
  7. Oct 11, 2019
  8. Oct 12, 2019
  9. Oct 10, 2019
  10. Oct 12, 2019
  11. Oct 11, 2019
Loading