Skip to content
Snippets Groups Projects
  1. Nov 25, 2019
  2. Nov 22, 2019
    • Nicolas Lempereur's avatar
      [FIX] point_of_sale: pos order -> count of order · 7dcab8a0
      Nicolas Lempereur authored
      
      In the pivot view of report.pos.order that is a view mainly over
      pos.order, the "Count" measure is a little rubish giving more or less
      the number of different products in the grouped order lines.
      
      With this changeset, we have the field "Order" as measure that allow us
      to know the number of orders a grouping is corresponding to.
      
      opw-2127275
      closes #40723
      
      closes odoo/odoo#40804
      
      X-original-commit: 431114d4
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      7dcab8a0
  3. Nov 20, 2019
  4. Nov 25, 2019
    • Mahendra Barad's avatar
      [FIX] hr_holidays: consecutive leave date on out of office message · 802817c9
      Mahendra Barad authored
      
      Before this commit, when a user was on leave, the out of office
      message displayed the current leave-in-progress date-to.
      This information was misleading when the user on leave used different
      types of leaves, because other users would expect their colleague to
      come back from vacation sooner.
      
      For instance, suppose that user is on vacation on October from 18-22
      (included), and from 25-28 (incl.), with a week-end from 23-24:
      
          +--------------------------------------+
          |          OCTOBER calendar            |
          +--------------------------------------+
          |   Mo.  Tu.  We.  Th.  Fr.  Sa.  Su.  |
          |                                      |
          |                                      |
          |          on-leave          week-end  |
          |   <-------------------->   <------>  |
          |   18   19   20   21   22   23   24   |
          |                                      |
          |        on-leave                      |
          |   <--------------->                  |
          |   25   26   27   28   29   30   31   |
          +--------------------------------------+
      
      On November 20, other users would see "On leave until _November
      22_ included", instead of _November 28_.
      
      This commit fixes the issue by taking into account consecutive
      holidays to compute the actual end date of vacation.
      
      Task-2002525
      
      closes odoo/odoo#38388
      
      Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
      802817c9
    • Haresh Shyara's avatar
      [ADD] l10n_id: introducing Indonesian localization · fec56ce8
      Haresh Shyara authored
      
      Added Chart of Accounts, taxes and other related data
      
      closes odoo/odoo#40806
      
      Task: 42243
      Courtesy: www.vitraining.com
      X-original-commit: 046f7039
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      fec56ce8
    • Xavier Morel's avatar
      [FIX] base: test_console_log_object broken if log level > info · 2ba8e1d3
      Xavier Morel authored
      
      If odoo is started with a log-level of "warn" of higher, the logging
      record is not emitted at all and thus the handler added by assertLogs
      has nothing to process at all. As a result the test will fail.
      
      closes odoo/odoo#40802
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      2ba8e1d3
    • Victor Feyens's avatar
      [IMP] mail: better prevent activity type removal and add a fallback mechanism · 0eadc0aa
      Victor Feyens authored
      
      Current activity types master data cannot be unlinked through a quite harsh
      override of unlink using xml id existence, introduced at 2602642a.
      Some of them are real master data, other could be unlinked if users want it.
      Finally custom activity types may cause errors when removed if used in some
      side models like server actions or automated actions.
      
      To allow more flexibility we remove the removal constraint and implement
      a fallback mechanism. It is implemented in mail.activity.mixin when calling
      activity_schedule(xmlid, ...). If the given xmlid is not found
      _default_activity_type() specifies the default activity to use. It can
      be overridden in modules if some specific behavior is wanted.
      
      e.g.
      
      def _default_activity_type(self):
          """Define a default fallback activity type when xml id not found
          only used in in activity_schedule() for now.
          """
          try:
              return self.env.ref('mail.mail_activity_data_todo')
          except Exception:
              return False
      
      In this commit we also
      
        * restrict deletion of activity type (hr.plan and ir.actions.server);
        * fallback on default activity type if xmlid ref not found in
          activity_schedule;
        * correct calls to activity_schedule and replace some manual creation calls
          by activity_schedule;
      
      Task ID 1961156
      PR #39013
      
      Related: odoo/enterprise#6238
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      Co-authored-by: default avatarVictor Feyens <vfe@odoo.com>
      Co-authored-by: default avatarMichaël Mattiello <mcm@odoo.com>
      0eadc0aa
    • Mohammed Shekha's avatar
      [IMP] web: do not pass default_name in calendar create if false · b7983df8
      Mohammed Shekha authored
      
      `name` field can be required and falsy `data.name` should not be
      added as default in context or it warns for missing required field.
      
      Task-2052536
      
      closes odoo/odoo#35880
      
      Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
      b7983df8
    • Hardik Prajapati's avatar
      [IMP] mrp: disable quick create in calendar view for mrp.production · c349e306
      Hardik Prajapati authored
      This commit disables quick create in calendar view for
      `mrp.production`, because it uses name field for storing
      `ir.sequence` and calendar quick create also uses `name` field to
      create quick create record.
      
      So in this case, even if user enters summary field, it will be replaced by
      `ir.sequence`, thus quick create doesn't make sense here.
      
      Task-2052536
      c349e306
  5. Nov 22, 2019
  6. Nov 25, 2019
    • Aurélien Pillevesse's avatar
      [IMP] account: unify the terms · 161ceea3
      Aurélien Pillevesse authored
      
      Use the same "Refunds" term as in the other menus
      
      closes odoo/odoo#40704
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      161ceea3
    • Aurélien Pillevesse's avatar
      faee632f
    • Hardik Prajapati's avatar
      [IMP] l10n_fr: Add account tags in CoA for Cash Flow · 7d397044
      Hardik Prajapati authored
      
      ==================
      Before this commit
      ==================
      
      No tags in account templates in CoA for Cash Flow Statement
      
      =================
      After this commit
      =================
      
      Tags Operating Activities, Financing Activities, Investing &
      Extraordinary Activities Link to respected accounts
      
      Related to task: #1973937
      
      Closes #33256
      
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      7d397044
    • Swapnesh Shah's avatar
      [IMP] product_margin: remove create and edit from views · df175f77
      Swapnesh Shah authored
      
      Create and Edit Buttons are not needed on views being opened from
      the Product Margin report
      
      Fixes odoo/odoo#39069
      
      closes odoo/odoo#39072
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      df175f77
    • Raphael Collet's avatar
      [FIX] fields: do not prefetch fields translated with a callable · d49e6b91
      Raphael Collet authored
      This is a performance fix.  It avoids the cost of XML/HTML translations
      for fields that may not be necessary when prefetching fields on records.
      This patch marks such fields as non-prefetchable by default.
      
      The code that changes the attribute `translate` on HTML fields (from
      `translate=True` to `translate=html_translate`) has been adapted to
      allow the setup of textual fields to mark the field as non-prefetchable.
      
      Jairo Llopis made a comparative benchmark: evaluating `name_get` on
      `event.event` records.  The method needs the field `name` and without
      the patch, the prefetching mechanism reads the translated HTML field
      `description` as well.  This patch speeds up the benchmark from 5800ms
      to 800ms (see https://github.com/odoo/odoo/pull/37967#issuecomment-538364011
      
      ).
      
      closes odoo/odoo#40771
      
      X-original-commit: e5ee5e5b
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      Co-authored-by: default avatarPedro Baeza <pedro.baeza@tecnativa.com>
      Co-authored-by: default avatarJairo Llopis <jairo.llopis@tecnativa.com>
      d49e6b91
    • Odoo's Mergebot's avatar
      [MERGE] survey: reorganize module to prepare future improvements · 305c0647
      Odoo's Mergebot authored
      
      PURPOSE
      
      Purpose is to perform some cleaning in survey models: naming, ordering,
      dead code [0]. As new features are about to land in survey, notably live
      interactions [1] and new survey building [2] performing a pre cleaning
      is necessary [3].
      
      SPECIFICATIONS
      
      This merge contains three commits doing
      
        * code move;
        * dead code removal;
        * templates split to ease understanding and reading;
      
      See sub commits for more details.
      
      LINKS
      
      [0] Related to Task ID 2144393 (surveys split / cleaning)
      [1] Task ID 1972640 (live interactions)
      [2] Task ID 2119587 (new frontend for building surveys)
      [3] Task ID 2061901 (survey models cleaning and preparation)
      
      PR #40623
      
      Related: odoo/enterprise#6853
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      Unverified
      305c0647
    • fw-bot's avatar
      [FIX] sale: do not validate quotes on tx amount mismatch · d79457a9
      fw-bot authored
      
      The title says it all -_-
      
      closes odoo/odoo#40257
      
      Signed-off-by: default avatarDamien Bouvy (dbo) <dbo@odoo.com>
      d79457a9
    • Nikunj Ladava's avatar
      [IMP] l10n_no: change report format to rf-0002 · ff9efe70
      Nikunj Ladava authored
      
      Integration with new financial reports rf-002 in Norwegian localization
      
      task- 1969011
      
      closes odoo/odoo#37357
      
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      ff9efe70
    • Robin Heinz's avatar
      [IMP] point_of_sale: cash closing difference visible · daf6db97
      Robin Heinz authored
      
      When a pos session is closed, the difference and transactions of cash
      control are not good anymore, because it is based on the statement
      linked to the cash payment method, and it is modified during the
      validation of the session to create a balanced account move.
      
      So we are now storing the values in fields, to keep history of the
      closing control
      
      closes odoo/odoo#35286
      
      Task-id: 2032173
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      daf6db97
    • Thibault Delavallée's avatar
      [REF] survey: split templates into main files and rename templates · ca1c975d
      Thibault Delavallée authored
      PURPOSE
      
      Purpose is to perform some cleaning in survey models: naming, ordering,
      dead code [0]. As new features are about to land in survey, notably live
      interactions [1] and new survey building [2] performing a pre cleaning
      is necessary [3].
      
      SPECIFICATIONS
      
      Remove dead code :
      
        * split templates into 3 main files
      
         * survey_templates: holding main templates when taking a survey;
         * survey_templates_statistics: graph and statistics (results) of a survey;
         * survey_templates_management: templates linked to corner cases and
           error management (403, closed survey, ...) as well as tools and utility
           templates;
      
        * rename template ids to ease code understanding;
      
      No functional changes should occur with this commit. It contains only
      code move, not any change at all.
      
      LINKS
      
      [0] Related to Task ID 2144393 (surveys split / cleaning)
      [1] Task ID 1972640 (live interactions)
      [2] Task ID 2119587 (new frontend for building surveys)
      [3] Task ID 2061901 (survey models cleaning and preparation)
      
      PR #40623
      ca1c975d
    • Thibault Delavallée's avatar
      [REF] survey: remove dead or duplicated code · b6bbe517
      Thibault Delavallée authored
      PURPOSE
      
      Purpose is to perform some cleaning in survey models: naming, ordering,
      dead code [0]. As new features are about to land in survey, notably live
      interactions [1] and new survey building [2] performing a pre cleaning
      is necessary [3].
      
      SPECIFICATIONS
      
      Remove dead code :
      
        * old code bits not used anymore since several code cleanings have
          already been performed;
        * use tools when possible instead of manually checking stuff like
          email validation;
        * clean unused imports;
      
      No functional changes should occur with this commit. It contains only
      code move, not any change at all.
      
      LINKS
      
      [0] Related to Task ID 2144393 (surveys split / cleaning)
      [1] Task ID 1972640 (live interactions)
      [2] Task ID 2119587 (new frontend for building surveys)
      [3] Task ID 2061901 (survey models cleaning and preparation)
      
      PR #40623
      b6bbe517
    • Thibault Delavallée's avatar
      [MOV] survey: reorganize a bit code and files · 1a8c1fd8
      Thibault Delavallée authored
      PURPOSE
      
      Purpose is to perform some cleaning in survey models: naming, ordering,
      dead code [0]. As new features are about to land in survey, notably live
      interactions [1] and new survey building [2] performing a pre cleaning
      is necessary [3].
      
      SPECIFICATIONS
      
      Code move main points
      
        * move fields to have them grouped by main use;
        * move methods to have them grouped by main purpose;
        * reorganize some line breaks to ease reading files;
      
      Globally this code move is done according to our famous guidelines.
      
      No functional changes should occur with this commit. It contains only
      code move, not any change at all.
      
      LINKS
      
      [0] Related to Task ID 2144393 (surveys split / cleaning)
      [1] Task ID 1972640 (live interactions)
      [2] Task ID 2119587 (new frontend for building surveys)
      [3] Task ID 2061901 (survey models cleaning and preparation)
      
      PR #40623
      1a8c1fd8
    • Holger Brunn's avatar
      [FIX] auth_ldap: encode python ldap's output as utf8 · 67848457
      Holger Brunn authored
      
      Non-ascii characters in LDAP don't cause a python unicode string in
      returned ldap entries, this commit fixes this.
      
      Before this commit, further string operations on ldap values with
      non-ascii characters fail.
      
      closes odoo/odoo#40761
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      67848457
    • Romain Estievenart's avatar
      [IMP] web: add column creation support for kanban view on mobile · 715c136c
      Romain Estievenart authored
      
      On mobile, there was no way to create a new column in the kanban view. This
      was specifically annoying in the Project app (the user was able to
      create the project but couldn't set its stages).
      
      This commit enables this feature by adding a `+` icon at the end of the
      tabs. This button opens a quick-create column widget.
      
      If there is no existing column (for example in a newly created project),
      this quick-create column widget is opened by default.
      
      Finally, this commit improves the processing needed for the swipe
      animation between the columns.
      
      Task ID: 1893137
      
      closes odoo/odoo#40722
      
      Signed-off-by: default avatarPierre Paridans <pparidans@users.noreply.github.com>
      Co-authored-by: default avatarAnkit Sathvara <asa@odoo.com>
      Co-authored-by: default avatarMohammed Shekha <msh@openerp.com>
      Co-authored-by: default avatarRomain Estievenart <res@odoo.com>
      715c136c
    • fw-bot's avatar
      [FIX] project: invalid date format in kanban view · 40e8834b
      fw-bot authored
      
      Reproduce the issue
      
          - Install Projects
          - Create a project
          - Create a task with a deadline
      
          The deadline format is correct in the form view but not in the
          kanban view.
      
      Cause
      
          In the kanban view, there is some code applied on the `date_deadline`
          field to add a class when the deadline is near.
      
          As it uses a `span` with a `t-esc`, the only way to get the date
          is to do `record.date_deadline.raw_value` which return the raw
          value of the datetime object (a big string with all the infos).
      
      This commit creates a char field for the formatted date and uses it
      only for the display.
      
      OPW-2122928
      
      closes odoo/odoo#40707
      
      Related: odoo/enterprise#6832
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      40e8834b
  7. Nov 20, 2019
  8. Nov 13, 2019
  9. Nov 25, 2019
    • Odoo's Mergebot's avatar
      [IMP] hr_holidays: Add specific approval for allocations · 16891269
      Odoo's Mergebot authored
      
      Purpose
      =======
      
      We want to allow different approvals for allocations and leaves of a same type.
      
      e.g. In case of compensation days, a manager would approve the
      allocation request, but would later not approve leave requests.
      
      Specification
      =============
      
      Allocation modes
      ----------------
      No change here except renames.
      1. No limit (employee doesn't need an allocation to request a leave)
      2. Allow employee requests
      3. Fixed by Time Off Officer
      
      Allocation approval
      -------------------
      A radio field to choose the approval mechanism
      appears if the employee is allowed to request an allocation.
      The following approval modes are possible:
      1. Time Off Officer
      2. Employee's Time Off Manager (leave_responsible_id)
      3. Employee's Time Off Manager and Time Off Officer
      
      These options are the same as leave approval options
      (except the missing "No Validation").
      
      If option 1 or 2 is selected, a o2m field should
      allow to select which Time Off Officer is responsible
      for approving those allocations.
      
      Allocation approval policy is the same as the leave approval policy.
      
      Task id: 1936742
      
      --
      I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
      
      closes odoo/odoo#35446
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      Unverified
      16891269
  10. Nov 22, 2019
  11. Nov 23, 2019
  12. Nov 22, 2019
    • jbm-odoo's avatar
      [FIX] mail: Limit emojis quantity · 77e4c64f
      jbm-odoo authored
      
      If the user put more than 200 emojis, we didn't replace emoji with
      image. But due to a typo in the code, this mechanism broke the
      discuss application.
      
      closes odoo/odoo#40734
      
      X-original-commit: 0877cb6c
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      77e4c64f
    • Lucas Lefèvre's avatar
      [IMP] hr_holidays: Unifies leave and allocation name · c2eef0ca
      Lucas Lefèvre authored
      Some changes were made at leave names in eb02e9b3.
      This commit applies the same behavior for allocations.
      c2eef0ca
    • Lucas Lefèvre's avatar
      [IMP] hr_holidays: Find leave responsible · a9eed139
      Lucas Lefèvre authored
      For each leave, a responsible is found to assign him activities.
      For 'employee' leaves, a complex (and always changing) policy is
      implemented.
      This policy should not be applied for other types of leaves.
      e.g. department, company, category.
      
      For those type of leave, the current user should be responsible
      for the approval.
      
      Also, why was the default responsible the super user?
      It was creating activities for an inactive user, hence no one
      was notified to approve the leave.
      Better to fallback on the current user.
      a9eed139
    • Lucas Lefèvre's avatar
      [IMP] hr_holidays: Add specific approval for allocations · 8f3a5068
      Lucas Lefèvre authored
      Purpose
      =======
      
      We want to allow different approvals for allocations and leaves of a same type.
      
      e.g. In case of compensation days, a manager would approve the
      allocation request, but would later not approve leave requests.
      
      Specification
      =============
      
      Allocation modes
      ----------------
      No change here except renames.
      1. No limit (employee doesn't need an allocation to request a leave)
      2. Allow employee requests
      3. Fixed by Time Off Officer
      
      Allocation approval
      -------------------
      A radio field to choose the approval mechanism
      appears if the employee is allowed to request an allocation.
      The following approval modes are possible:
      1. Time Off Officer
      2. Employee's Time Off Manager (leave_responsible_id)
      3. Employee's Time Off Manager and Time Off Officer
      
      These options are the same as leave approval options
      (except the missing "No Validation").
      
      If option 1 or 2 is selected, a o2m field should
      allow to select which Time Off Officer is responsible
      for approving those allocations.
      
      Allocation approval policy is the same as the leave approval policy.
      
      Task id: 1936742
      
      Access rights based on task 1950998
      8f3a5068
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] mail: make attachment filtering selective on uid · 5e9a4c39
      Andrea Grazioso (agr-odoo) authored
      
      Install Accounting, go to Configuration > Follow-up Levels. Create a new
      Follow-Up Action with low due days just to make testing easier and "Join
      open invoices" enabled. Go to Customers>"Follow-up Reports", select a
      follow up report with action "test", click on "Send Email"
      
      The email will be sent, without attachments. There should be a number of
      attachments equal to the number of due invoices, but for security reason
      the attachments are filtered in the message post processing phase.
      
      Changing security check to avoid filtering legitimate material.
      
      opw-2116803
      
      closes odoo/odoo#40726
      
      X-original-commit: 6258c7eb
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      5e9a4c39
    • fw-bot's avatar
      [FIX] l10n_it_edi: remove 'Send' button from Customer Invoices · ba8ea74a
      fw-bot authored
      
      'Send' button meant to send Italian e-invoices are shown
      for invoices belonging to non-Italian companies as well.
      
      Since the invoices' are being sent on validating the
      invoice itself, Send button means less business here.
      
      Hence removed it.
      
      opw-1945836
      closes #31470
      
      closes odoo/odoo#40736
      
      X-original-commit: 633b931d
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      ba8ea74a
    • Nicolas Martinelli's avatar
      [FIX] l10n_be_edi: error at PDF generation · c52f91a5
      Nicolas Martinelli authored
      
      An UBL invoice can contain several `AdditionalDocumentReference`, some
      of them without `Attachment`. For example:
      
      ```
        <cac:AdditionalDocumentReference>
          <cbc:ID>UBL.BE</cbc:ID>
          <cbc:DocumentDescription>BOB50  6.07.0</cbc:DocumentDescription>
        </cac:AdditionalDocumentReference>
        <cac:AdditionalDocumentReference>
          <cbc:ID>Facture N°19090118 - 30-09-2019.pdf</cbc:ID>
          <cbc:DocumentDescription>CommercialInvoice</cbc:DocumentDescription>
          <cac:Attachment>
            <cbc:EmbeddedDocumentBinaryObject filename="Facture.pdf" mimeCode="application/pdf">JVBERi0xLjMK...
      ...
      ```
      
      In this case, a crash occurs since:
      
      ```
      element.xpath('cac:Attachment//cbc:EmbeddedDocumentBinaryObject', namespaces=namespaces)
      ```
      
      is an empty list.
      
      To avoid this, we loop on all elements and generate all PDFs.
      
      opw-2128083
      
      closes odoo/odoo#40721
      
      X-original-commit: 2174e406
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      c52f91a5
Loading