Skip to content
Snippets Groups Projects
  1. Jul 13, 2020
    • Harald Panten's avatar
      [IMP] l10n_es: tax template descriptions renamed · 77146d02
      Harald Panten authored
      
      description for tax templates in account_tax_data.xml is not showing a "friendly" customer description for several taxes.
      It's common to be requested for changes and being forced to help customers to replace the current tax label by understandable descriptions.
      This PR improves that description and makes it easier to understand.
      
      closes odoo/odoo#54402
      
      X-original-commit: f8d55c8e4559264c68155a4a8e3151f6aa045037
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      77146d02
  2. Jul 10, 2020
  3. Jul 02, 2020
    • Aaron Bohy's avatar
      [IMP] web: form: labels of several occurrences of a field · e17dc1a7
      Aaron Bohy authored
      Before this commit, when the same field occurred multiple times in
      a form view, all occurrences were associated with the same id, and
      all occurrences of the corresponding label (if any) had the same
      'for' attribute. As a consequence, besides the fact that there were
      warnings in the chrome console, clicking on any occurrence of the
      duplicated label focuses the first occurrence of the field.
      
      This commit generates a unique id for each pair label/field, when
      possible. However, there is a case that can't be handled
      automatically: when the label isn't automatically generated (field
      located outside a group, or with nolabel attribute set to "1").
      Typically, in this case, there is a <label> node with "for"
      attribute referencing the associated field. In this situation, the
      id must be defined in the arch, and used in the "for" attribute:
      
        <form>
          <label for="phone"/><field name="phone"/>
          <label for="phone_2"/><field name="phone" id="phone_2"/>
        </form>
      
      Task 2261697
      e17dc1a7
  4. Jul 01, 2020
  5. Jun 30, 2020
  6. Apr 17, 2020
    • Xavier Morel's avatar
      [FIX] doc: meta directive support · e1df56f2
      Xavier Morel authored
      
      The translator defined a `meta` attribute, however:
      
      * it was static so couldn't be expanded using the `meta` directive,
        move to instance attribute, and create an `add_meta` method which
        adds some indentation (for a cleaner HTML output)
      * the `meta` directive itself was not supported by the translator
      * turns out HTMLWriter just removes the first to entries of `meta` as
        "cleanup", which explains why we had to duplicate it in the template
        - therefore pad the `meta` list and remove entries from template
        - move front to linktags, that seems more relevant
      
      closes odoo/odoo#49699
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      e1df56f2
  7. Jun 22, 2020
  8. Jun 18, 2020
    • crece365's avatar
      [CLA] signature for crece365 · 9ae5b5a0
      crece365 authored
      
      Done at odoo/odoo#53103
      
      closes odoo/odoo#53274
      
      X-original-commit: b6bce16b
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      9ae5b5a0
    • Martin Trigaux's avatar
      [IMP] tools: add placeholder support to _ · 3c3b88f6
      Martin Trigaux authored
      Mimic the syntax of logging to use placeholders in translatable
      message.
      The main advantage is to be able to fallback on the source term if the
      translation can not be formatted properly.
      It is very common to have errors in translations with missing
      placeholders or badly translated (ie. the source
           "%(subject)s" -> "%(sujet)s").
      
      Instead of blocking the execution of the code, fallback on source
      string.
      
      Task-id: 1853119
      3c3b88f6
  9. Jun 12, 2020
    • Mathieu Duckerts-Antoine's avatar
      [IMP] *: limit in search panel · 3306a0f4
      Mathieu Duckerts-Antoine authored
      This commit introduces a new attribute 'limit' for search panel fields
      that allows to avoid performance issues. That integer attribute (with
      default 200) allows to fix a maximal number of values to display for the
      fields. When the number of field values to display reaches the limit,
      no values will be displayed. Instead, a warning message will be shown
      in the corresponding search panel section.
      Note it is possible to have no limit using limit="0" on a field.
      This commit reintroduces in a better way the principle brought by the
      fix 8d57153b.
      
      Task ID: 2154749
      3306a0f4
    • Mathieu Duckerts-Antoine's avatar
      [IMP] *: expand and hierarchize in search panel · e5585c07
      Mathieu Duckerts-Antoine authored
      
      The commit introduces two new attributes for search panel fields:
      
          - hierarchize: boolean attribute (default True) available for
            many2one fields with select="one". It allows to choose whether
            to hierarchize the field values using the _parent_name (if set)
            on the field comodel.
            Note that a sanitization of the parent hierarchy takes place.
            Basically, it ensures that parent chains are
            completely in the domain (on comodel) accessible by the user.
            See _search_panel_sanitized_parent_hierarchy documentation for
            more information.
      
          - expand: boolean attribute (default False) available for many2one
            and many2many fields. If set to true, all field values are fetched
            and displayed in the search panel. If set to false, only the
            values that have at least one corresponding value in the field
            model (and in some domain) are fetched.
            An exception in the case of an hierarchized field
            (hierarchize=True and _parent_name set): more/less values can be
            displayed in order to have a good representation of the parent
            hierarchy. That means we complete and sanitize the set of initial
            field image values.
      
      Note that the fix 8d57153b bringing the
      notion of limit in search panel has been reverted in the present commit.
      An upcomming commit will reintroduce the limit principle in a better way.
      
      Task ID: 2154749
      
      Co-authored-by: default avatarMathieu Duckerts-Antoine <dam@odoo.com>
      Co-authored-by: default avatarJulien Mougenot <jum@odoo.com>
      e5585c07
    • Julien Mougenot's avatar
      [IMP] *: enable_counters with false as default · f5f0ca84
      Julien Mougenot authored
      In the search panel, the attribute disable_counters with default False
      has been changed to enable_counters with default False.
      f5f0ca84
  10. Jun 09, 2020
    • Antony Lesuisse's avatar
      [ADD] odoo-bin cloc cli subcommand. · 1c522ee7
      Antony Lesuisse authored
      
      Odoo cloc is a tool to count the number of relevant lines written in Python,
      Javascript or XML. This can be used as rough metric for pricing maintenance of
      customizations.
      
      It has two modes of operation, either by providing a path:
      
          odoo-bin cloc -p module_path
      
      Or by providing the name of a database:
      
          odoo-bin cloc --addons-path=dirs -d database
      
      In the latter mode, only the custom code is accounted for.
      Both modes can be used simultaneously.
      
      Files that cannot be parsed are shown at the end of the report.
      Parsing can fail due to syntax errors or excessive file size.
      
      closes odoo/odoo#52635
      
      X-original-commit: ae858c3ac66267b4726db459032b91a6be1cc1d6
      Related: odoo/enterprise#11018
      Signed-off-by: default avatarOlivier Dony (odo) <odo@openerp.com>
      Co-authored-by: default avatarThibault Francois <tfr@odoo.com>
      Co-authored-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      1c522ee7
  11. Jun 04, 2020
    • Michael Mattiello (mcm)'s avatar
      [IMP] web: add nolabel to list view · b7840dde
      Michael Mattiello (mcm) authored
      
      This commit adds the support of nolabel attribute on fields
      in list view. This attribute can be used to empty the column header.
      
      Example of use:
      
      <record id="module_example_tree_view" model="ir.ui.view">
        <field name="name">module.example.tree.opportunity</field>
        <field name="model">module.example</field>
        <field name="arch" type="xml">
          <tree>
            <field name="name"/>
            <field name="tag_ids" widget="many2many_tags" nolabel="1"/>
          </tree>
        </field>
      </record>
      
      Result:
      
      This will create a tree view with 2 columns.
      The second column will have an empty header and won't be sortable.
      
      Name    |
      --------+--------------
      Record1 | [tag1]
      Record2 | [tag1][tag2]
      Record3 | [tag2]
      
      closes odoo/odoo#52302
      
      Task: 2269315
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      b7840dde
  12. May 20, 2020
  13. May 19, 2020
    • Julien Castiaux's avatar
      [REF] ir.autovacuum: declarative garbage collector registration · c5d3a109
      Julien Castiaux authored
      
      The ir.autovacuum model purpose is to run several garbage collecting
      operations like removing files from the filestore when no attachment
      references them anymore.
      
      The precedent strategy to register new garbage collection tasks was to
      override the `power_on` method and to imperatively execute a vacuum
      cleaning method on a given model. All calls were executed in a single
      SQL transaction without any error handling, meaning a single fail during
      any call resulted in a complete failure of the entire vacuum cleaning
      chain.
      
      We introduce a new `@autovacuum` api decorator, its purpose it to
      register garbage collecting methods that will be safely executed in
      their own transaction by the vacuum cleaner. In order to ensure this
      new strategy is used, we deprecate `power_on` extensions.
      
      By the way, garbage-collecting methods can be quite heavy and we don't
      want users to directly call them. We now ensure they are private.
      
      closes odoo/odoo#47842
      
      Task: 2154079
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      Co-authored-by: default avatarRaphael Collet <rco@odoo.com>
      Co-authored-by: default avatarOlivier Dony <odo@odoo.com>
      c5d3a109
    • Priyanka Kakadiya's avatar
      [IMP] web: graph: add bar/line chart sorting · fa00ff97
      Priyanka Kakadiya authored
      
      PURPOSE
      
      Currently, reporting views such as the bar and line charts have
      their x-axis sorted either alphabetically  or according to a
      sequence. When reporting, the user would be interested in sorting
      the x-axis values by their measure.
      
      SPECIFICATIONS
      
      Add 'ascending' and 'descending' options in graph view for bar and
      line charts
      
      Task 2070103
      
      closes odoo/odoo#49970
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      Co-authored-by: default avatarMohammed Shekha <msh@odoo.com>
      fa00ff97
  14. May 18, 2020
  15. May 13, 2020
  16. May 11, 2020
  17. May 08, 2020
    • Kristina Seregina's avatar
      [CLA] signature for kseregina · 9d3966b4
      Kristina Seregina authored
      
      closes odoo/odoo#50962
      
      X-original-commit: c280a248
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      9d3966b4
    • John Touba's avatar
      [CLA] signature for Jo541 · d5100fc0
      John Touba authored
      
      closes odoo/odoo#50961
      
      X-original-commit: cdf3b380
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      d5100fc0
    • Yannick Tivisse's avatar
      [IMP] rating: Add a retrocompatibily route · 8ca96078
      Yannick Tivisse authored
      
      Purpose
      =======
      
      Even if the routes are correctly updated and the existing data is
      correctly updated, the emails that were already sent to the customers
      will be problematic, as we will provide a value which is not handled
      anymore (10 for example).
      
      To provide a retrocompatibility, deprecated the old route and
      introduce a new one.
      
      closes odoo/odoo#46296
      
      Taskid: 2083096
      Related: odoo/upgrade#889
      Related: odoo/enterprise#10312
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      8ca96078
    • Benjamin Frantzen (bfr)'s avatar
      [IMP] customer ratings flow improvements · e4a4ffb9
      Benjamin Frantzen (bfr) authored
      - Rename the 'Use Rating on Project' feature into 'Customer Ratings'
      - Rename the 'Set Email Template to Stages' link to 'Set a Rating Email Template on Stages'
      - Add an optional list view for the Stages menu
      - display warning if the rating_template_id field is set and if one of the selected project_ids doesn't have the rating_status field set to true
      - Project form view revamp
      - rename the '% on tasks' stat button into 'Customer Satisfaction'
      - Remove the 'no option' for the rating frequency field because it is required
      - project form : Add a 'Go to Website' stat button
      - Project dashboard: remove the 'Customer Ratings' menu item in more
      - Ratings page: the 'Last 30 days' filter include ratings from today
      - remove the Appointment / Helpdesk Customer Satisfaction / Live Support menu items
      
      TASK ID : 1251
      e4a4ffb9
  18. May 07, 2020
  19. May 05, 2020
    • Mathieu Duckerts-Antoine's avatar
      [IMP] web: search panel counter changes · 2c102c29
      Mathieu Duckerts-Antoine authored
      
      This commit introduces several changes in the search panel with
      respect to record counts:
      
          - the record counts are now also available for
            the fields with select="one" attribute
            (if not disabled explicitely).
          - the record counts are better computed using the idea that
            selected values within a group should not impact the counts
            for the group values but only the counts for the other
            group values.
      
      On the way we have changed two keys in the values returned
      by the server:
          - 'count' becomes '__count'.
            It has been done to avoid a possible clash in case a model would
            have a field named 'count' and that the field values would be
            wanted for some reason.
          - 'name' (multi case) becomes 'display_name'.
            It has been done in order to make the select one and multi cases
            more similar and factorize some code.
      
      TASK-ID: 2166814
      
      Co-authored-by: default avatarRaphaël Collet <rco@openerp.com>
      Co-authored-by: default avatarMathieu Duckerts-Antoine <dam@odoo.com>
      Co-authored-by: default avatarAlexis Lacroix <laa@odoo.com>
      Co-authored-by: default avatarJulien Mougenot <jum@odoo.com>
      2c102c29
    • Osiris Roman's avatar
      [FIX] l10n_ec: correct currency · a3e61f54
      Osiris Roman authored
      
      The currency of Ecuador is USD, ECS is archived.
      Add states of Ecuador
      Signs CLA
      
      Modificando la moneda oficial de Ecuador de sucre a dolar.
      La moneda oficial del Ecuador cambió de sucre a dolar en el año 2000.
      
      introducing Ecuadorian states
      
      Correcting previous commit according to mart-e especifications
      State codes follow the ISO 3166-2. Each code is compound by two parts separated by a hyphen "-". First part is "EC" (The ISO ecuadorian code), and the second part is the ISO state code.
      
      Correcting res.country.state file according to mart-e especifications
      
      Adding the states directly in the l10n_ec file
      
      closes odoo/odoo#50653
      
      X-original-commit: 1a6b70c6
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      a3e61f54
    • Aaron Bohy's avatar
      [IMP] hr: add Many2OneAvatarEmployee field widget · 22a66ae6
      Aaron Bohy authored
      This widget is a variant of the Many2OneAvatarUser widget, designed
      for many2one fields pointing to 'hr.employee'.
      
      Part of task 2195254
      22a66ae6
    • Aaron Bohy's avatar
      [IMP] mail: add Many2OneAvatarUser field widget · 59641325
      Aaron Bohy authored
      This widget is an extension of Many2OneAvatar, designed for
      many2one fields pointing to the 'res.users' model, or a model having
      itself a many2one field pointing to 'res.partner'.
      
      With this widget, when the avatar is clicked, we open a DM chat
      window with the corresponding partner. If the user clicked on itself,
      we open a blank chat window for the sake of consistency.
      
      In kanban views, this widget only displays the avatar.
      
      Part of task 2195254
      59641325
    • Aaron Bohy's avatar
      [IMP] web: add Many2OneAvatar field widget · df4693e7
      Aaron Bohy authored
      In readonly, this widget displays the image of the related record
      next to its display_name. In edit, it behaves exactly like the
      regular many2one.
      
      Part of task 2195254
      df4693e7
    • Aaron Bohy's avatar
      [IMP] web: add RemainingDays field widget · 4f8860e5
      Aaron Bohy authored
      This widget can be used on date and datetime fields. In readonly,
      it displays the delta (in days) between the value of the field and
      today. In edit, it behaves like a regular date(time) widget.
      
      Part of task 2195254
      4f8860e5
    • Aaron Bohy's avatar
      [IMP] web: add BadgeField component · 1d6e4948
      Aaron Bohy authored
      This new field component displays the field's value inside a
      bootstrap pill badge. Supported field types are 'char', 'selection'
      and 'many2one'. The background color of the badge can be customized
      by using the decoration-xxx mechanism, e.g.
       <field name="state" decoration-danger="state == 'cancel'" widget="badge"/>
      
      Part of task 2195254
      1d6e4948
    • Aaron Bohy's avatar
      [IMP] web: list: allow to add decorations on field nodes · a1d3e224
      Aaron Bohy authored
      In list views, one can specify decoration-XXX attributes on the
      arch root node. Those decorations are evaluated for each record,
      and the corresponding style is applied on rows for which the
      condition is true.
      
      This commit allows to specify those decoration-XXX attributes on
      field nodes as well. In this case, when the condition is met by a
      record, only the field on which the attribute is set will be
      impacted.
      
      Part of task 2195254
      a1d3e224
  20. May 04, 2020
  21. Apr 29, 2020
    • Olivier Dony's avatar
      [FIX] doc/deploy: add recommendations for firewall rules · 4310ba32
      Olivier Dony authored
      
      In some situations it is important to protect the Odoo service from
      direct access from the internet, or to protect internal network
      resources from the Odoo server itself.
      
      This is heavily dependent on deployment requirements, and for standard
      installations on a public cloud system, this may not be necessary.
      Yet it seems useful to mention it in the deployment recommendations,
      as it may not be obvious to our users.
      
      Our thanks to Ameya Darshan for raising this concern!
      
      closes odoo/odoo#50422
      
      X-original-commit: da0d9ef4
      Signed-off-by: default avatarPaul Morelle <madprog@users.noreply.github.com>
      4310ba32
  22. Apr 30, 2020
Loading