Skip to content
Snippets Groups Projects
  1. Oct 26, 2020
  2. Oct 23, 2020
  3. Oct 26, 2020
  4. Oct 23, 2020
    • Swapnesh Shah's avatar
      [FIX] purchase: confirm receipt date if needed · 6f37f489
      Swapnesh Shah authored
      
      Before this commit, There would be Traceback (AttributeError: 'bool' object has no attribute 'date')
      on `Confirm Receipt Date` If order has no `Receipt Date`.
      
      Now, Button `Confirm Receipt Date` will be hidden if there is not `Receipt Date` to confirm.
      
      Closed #60222
      
      closes odoo/odoo#60659
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      6f37f489
    • qsm-odoo's avatar
      [FIX] web: preload font awesome font for frontend layouts · 60c78767
      qsm-odoo authored
      
      This commit adds an easy improvement fixing a page speed warning: the
      font awesome font (declared in a font-face in assets_common) can be
      preloaded.
      
      The only problematic point was that font-awesome defines the font by
      a series of URL using different font formats. Only one can be
      preloaded (otherwise you would load files for no reason). As all Odoo
      supported browsers use the woff2 format, we only preload that one. At
      the cost of a warning for other browsers which use a different format.
      
      task-2350647
      
      closes odoo/odoo#60588
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      60c78767
    • Jeremy Kersten's avatar
      [FIX] base, website_sale: vietnam zip not required · 2d318920
      Jeremy Kersten authored
      
      Zip cannot be required if not in format address.
      It will break ecommerce, because the customer cannot
      validate the adress because zip code is not displayed but required.
      
      Fix case in JS where field is not display to avoid traceback.
      
      This commit closes #58950
      
      closes odoo/odoo#60694
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      2d318920
  5. Oct 22, 2020
  6. Oct 23, 2020
  7. Oct 16, 2020
  8. Oct 23, 2020
    • Jérémy Hennecart's avatar
      [FIX] base,calendar: fix calendar reminder · 232a3c4c
      Jérémy Hennecart authored
      
      The purpose of this commit is to have reliable calendar event reminder.
      
      Before, the reminders was not send directly and was instead put in mailing
      queue, which was leading to some delay. This is due do mail_notify_force_send
      context key being force to False when being in cron mode. However here we
      do not want to have calendar cron scheduling emails, then mailing cron
      sending them as it implies two delays.
      
      In order to try to send reminder mails as soon as possible compared to their
      schedule let us send mails directly during the calendar cron.
      
      Task ID-2331999
      
      closes odoo/odoo#57994
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      232a3c4c
    • Thibault Delavallée's avatar
      [FIX] base: remove duplicate call to cron.run · 2656b855
      Thibault Delavallée authored
      Oversight of conflict solving in forward port 9d1909f2
      2656b855
  9. Oct 21, 2020
  10. Oct 22, 2020
    • Denis Ledoux's avatar
      [FIX] l10n_latam_invoice_document: skip `document_type` computation on install · 16b2cf8b
      Denis Ledoux authored
      
      Skip the computation of the field `l10n_latam_document_type_id` at the module installation.
      
      The case has been detected during an upgrade from Odoo 12.0 to Odoo 13.0,
      but the case could really well happen outside the context of an upgrade,
      for instance when you create a new subsidiary in Chile or Argentina
      while you already have a lot of accounting entries in your other subsidiaries
      (e.g. Odoo S.A. opens a new office in Chile and has to install `l10n_cl`)
      
      Without this, at the module installation,
      it would call `_compute_l10n_latam_document_type` on all existing records
      which can take quite a while if you already have a lot of moves. It can even fail with a MemoryError.
      
      In addition, it sets `_compute_l10n_latam_document_type = False` on all records
      because this field depends on the many2many `l10n_latam_available_document_type_ids`,
      which relies on having records for the model `l10n_latam.document.type`
      which only happens once the according localization module is loaded.
      (e.g. `l10n_cl/data/l10n_latam.document.type.csv`)
      
      The localization module is loaded afterwards, because the localization module depends on this module,
      (e.g. `l10n_cl` depends on `l10n_latam_invoice_document`, and therefore `l10n_cl` is loaded after)
      and therefore there are no records for the model `l10n_latam.document.type` at the time this fields
      gets computed on installation. Hence, all records' `_compute_l10n_latam_document_type` are set to `False`.
      
      In addition, multiple localization module depends on this module (e.g. `l10n_cl`, `l10n_ar`)
      So, imagine `l10n_cl` gets installed first, and then `l10n_ar` is installed next,
      if `l10n_latam_document_type_id` needed to be computed on install,
      the install of `l10n_cl` would call the compute method,
      because `l10n_latam_invoice_document` would be installed at the same time,
      but then `l10n_ar` would miss it, because `l10n_latam_invoice_document` would already be installed.
      
      Besides, this field is computed only for drafts invoices, as stated in the compute method:
      `for rec in self.filtered(lambda x: x.state == 'draft'):`
      So, if we want this field to be computed on install, it must be done only on draft invoices, and only once
      the localization modules are loaded.
      
      It should be done in a dedicated post init hook,
      filtering correctly the invoices for which it must be computed.
      
      Though I don't think this is needed.
      In practical, it's very rare to already have invoices (draft, in addition)
      for a Chilian or Argentian company (`res.company`) before installing `l10n_cl` or `l10n_ar`.
      
      ```
      Traceback (most recent call last):
        File "/src/odoo/13.0/odoo/service/server.py", line 1190, in preload_registries
          registry = Registry.new(dbname, update_module=update_module)
        File "/src/odoo/13.0/odoo/modules/registry.py", line 86, in new
          odoo.modules.load_modules(registry._db, force_demo, status, update_module)
        File "/src/odoo/13.0/odoo/modules/loading.py", line 423, in load_modules
          loaded_modules, update_module, models_to_check)
        File "/src/odoo/13.0/odoo/modules/loading.py", line 315, in load_marked_modules
          perform_checks=perform_checks, models_to_check=models_to_check
        File "/src/odoo/13.0/odoo/modules/loading.py", line 202, in load_module_graph
          registry.init_models(cr, model_names, {'module': package.name}, new_install)
        File "/src/odoo/13.0/odoo/modules/registry.py", line 364, in init_models
          env['base'].flush()
        File "/src/odoo/13.0/odoo/models.py", line 5458, in flush
          self.recompute()
        File "/src/odoo/13.0/odoo/models.py", line 5875, in recompute
          process(field)
        File "/src/odoo/13.0/odoo/models.py", line 5859, in process
          recs.mapped(field.name)
        File "/src/odoo/13.0/odoo/models.py", line 5266, in mapped
          recs = recs._mapped_func(operator.itemgetter(name))
        File "/src/odoo/13.0/odoo/models.py", line 5225, in _mapped_func
          vals = [func(rec) for rec in self]
        File "/src/odoo/13.0/odoo/models.py", line 5225, in <listcomp>
          vals = [func(rec) for rec in self]
        File "/src/odoo/13.0/odoo/models.py", line 5690, in __getitem__
          return self._fields[key].__get__(self, type(self))
        File "/src/odoo/13.0/odoo/fields.py", line 2329, in __get__
          return super().__get__(records, owner)
        File "/src/odoo/13.0/odoo/fields.py", line 995, in __get__
          self.compute_value(recs)
        File "/src/odoo/13.0/odoo/fields.py", line 1109, in compute_value
          records._compute_field_value(self)
        File "/src/odoo/13.0/odoo/models.py", line 3968, in _compute_field_value
          field.compute(self)
        File "/src/odoo/13.0/odoo/fields.py", line 579, in _compute_related
          record[self.name] = self._process_related(value[self.related_field.name])
        File "/src/odoo/13.0/odoo/models.py", line 5699, in __setitem__
          return self._fields[key].__set__(self, value)
        File "/src/odoo/13.0/odoo/fields.py", line 1070, in __set__
          self.write(protected_records, value)
        File "/src/odoo/13.0/odoo/fields.py", line 2564, in write
          cache.update(records, self, [cache_value] * len(records))
        File "/src/odoo/13.0/odoo/api.py", line 768, in update
          field_cache.setdefault(record_id, {})[key] = value
      MemoryError
      ```
      
      Upgrade request 49495
      
      closes odoo/odoo#60572
      
      X-original-commit: f2a08faa1e65cb381315cbd5d1a359901e8b7deb
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      16b2cf8b
    • Thanh Dodeur's avatar
      [FIX] bus, mail: fix im_status for archived partners · 63b081c4
      Thanh Dodeur authored
      
      Before this commit, archived and deleted partners had not their
      im_status being updated automatically. There were some issues
      with this, notably:
      
      - odoobot 'bot' status was not displayed in chatter
      - im_status of partners becoming archived were not updated.
      
      This commit fixes both issues.
      
      task-2329591
      
      closes odoo/odoo#60398
      
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      63b081c4
  11. Oct 21, 2020
Loading