Commit Graph
2951 Commits
Author SHA1 Message Date
Mihai Fekete 4145f4baca [IMP] l10n_ro: improved Romanian localization
this includes improvements in accounts, taxes,
fiscal positions, tax report, account groups etc

closes odoo/odoo#43095

Task: 48668
Closes: 43095
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-13 18:42:42 +00:00
Mathieu Duckerts-Antoine e3a2bb6e09 [IMP] doc: update doc on view attribute 'sample'
The attribute 'sample' is now also available for the reporting views
(the cohort, dashboard, graph, and pivot views). Here, we simply extend
the existing doc on the attribute.

Task ID: 2282196
2020-08-12 09:55:38 +00:00
Julien Mougenot c00e76b67c [FIX] web: Filter with domain disables category counters
Before this commit, the search panel was subject to some inconsistencies
when dealing with a category having enabled counters and with a filter
defining a "domain" attribute. Indeed, the counters could be in an
incorrect state if the right filters/categories were not loaded first,
with no simple way in doing so.

The search panel being complex enough as it is, we decided to disable
all categories' counters in the presence of a filter having a "domain"
attribute regardless of said domain.

closes odoo/odoo#55734

X-original-commit: e78f777bd8ccb314b85451cbc8d1dd9109997d7a
Related: odoo/enterprise#12341
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-08-11 10:12:15 +00:00
qsm-odoo 42e1d4ca60 [IMP] website, *: enable the parallax option for all snippets
*: web_editor, website_blog

Unfortunately, this feature revealed a new batch of flaws in the
editor widgets system so some hacks were made to make it work. We will
always have the time to improve the pure technical side later.

This commit also separates the notion of color filter from the notion
of parallax. A color filter can now be applied independantly, when
there is either a background image or a background video. Applying a
color filter on top of a background video is actually a new feature.
Applying a color filter on top of a background image is actually now
achievable by two different ways: this new color filter layer or by
applying the color transformation on the image itself via the related
option. Depending on the user case, both could make sense at the same
time, but more importantly: having a CSS color filter is useful for
using those for default Odoo content (e.g. like the current contact us
page where we use a cover banner with an image with a black filter on
top of it: doing that without CSS color filter would mean to alter the
image directly which would not be ok when the user changes the image).
Also, sometimes you want the unfiltered image on a page and the exact
same one but filtered on another (for example: forum images).

Note: this commit also "fixes" an issue: the optimization feature for
images when parallax was enabled was not available before.

Part of https://github.com/odoo/odoo/pull/47313
task-46147
2020-08-10 14:27:00 +00:00
Michael Mattiello (mcm) 1e11249c93 [IMP] base,web: add scales param to calendar
This commit adds the parameter `scales` in the calendar view's template.
This parameter can be used to choose which mode(s) is/are allowed.

This commit also refactors the way we manage calendar scales.
Before scales were defined in model and renderer, now it's defined
in the view and given to model, controller and renderer by params.

Task: 2193921
2020-08-11 12:32:54 +00:00
Michael Mattiello (mcm) 441d9f65b3 [IMP] base,web: add year scale to calendar
This commit adds a new year scale to the calendar view.
It comes with a new view in the calendar, this view displays a
4x3 grid which cells are month views.

Task: 2193921
2020-08-11 12:32:54 +00:00
hoangtrann 56523599e5 [CLA] signature for Hoang Tran
closes odoo/odoo#55738

X-original-commit: d83607a716744eee279b04c1d6771c8aed308e67
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-11 10:31:12 +00:00
Jorge Luis Juarez 9637de2f9e [CLA] signature for JorgeJuarezM
closes odoo/odoo#55505

X-original-commit: 3183a68002ce490eb2c821e8c7e0923b64cd2a18
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-06 07:18:23 +00:00
Mark Robinson 1f87150da2 [CLA] signature for Mark Robinson
closes odoo/odoo#55540

X-original-commit: cfde4bc8b7f0f7edcae6f33ed2ce6569fcc46ca0
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-06 10:45:44 +00:00
Bruno Zanotti (ADHOC) 44fb324f7a [CLA] add new member to Adhoc CLA
closes odoo/odoo#55527

X-original-commit: ac8d173064f033136f33272a8724e937e73b1b85
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-06 09:34:00 +00:00
Yousef Al-Hadhrami 00048bd24c [FIX] web: avoid double switching in RTL
The direction arrows in the datepicker were switched a first time in
fontawesome_overridden.scss

  .o_rtl
    ..fa-chevron-left,.fa-chevron-right
       transform: rotate(-180deg);

and a second time in datepicker.scss
  .o_rtl
     .bootstrap-datetimepicker-widget
        .prev,.next
	   transform: rotate(180deg);

The buttons were flipped twice

Signed the Odoo CLA

Fixes odoo/odoo#50090
Closes odoo/odoo#53369

closes odoo/odoo#54880

X-original-commit: 8629fa3fdfddbf24f48a58d5add0fcadca60fba4
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-04 10:53:15 +00:00
Julien Mougenot f21dc0c84b [DOC] doc: Document "today" and "now" in context
Documentation of the affected blocks have been updated to inform about
the contents of the "today" and "now" context values.

closes odoo/odoo#54438

Related: odoo/enterprise#11831
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-08-04 08:25:37 +00:00
Parveen c653afc81e [IMP] account: add return value
This allows the method to be called in RPC
The nil extension has not been enabled as explained at odoo/odoo#12289

closes odoo/odoo#55374

Cla: signature for parveenjangra290
X-original-commit: abac62f35c8cd293143e01c137c79519897eb21c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-04 08:20:15 +00:00
Xavier Morel 96a3265118 [FIX] doc: remove <act_window> and <report>
* remove <report> and <act_window> form the backend tutorial
* remove documentation for <report> in the report doc

Also various fixes and improvements:

* add ACL to the wizard in the tutorial, as transients now require ACLs
* fix indentation & spacing in rST
* reword a few bits
* improve styling of footnote references (and recompile stylesheet
  with recent lessc which apparently changes its output formatting
  quite a bit)
2020-07-28 13:03:13 +00:00
Xavier Morel 48335c04bf [IMP] core: orm doc
* fix link from backend tutorial to log_access section
* flesh out log access documentation
* add documentation for log_access itself & improve doc for a few
  other model-level attributes
2020-07-28 13:03:12 +00:00
Victor Feyens 8d96f92bb1 [FIX] doc/views: header should be outside of sheet tag.
Forward-Port-Of: #54984

Original commit: d5e807e47edc641c8d9d97fe59d8d9eba40bd5af

closes odoo/odoo#55015

X-original-commit: e2c358adc7de11de28f18dbe36963ba71f95dd19
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-27 17:22:14 +00:00
Victor Feyens 6c53332358 [FIX] doc/views: templates attribute isn't supported in calendar views.
Since
https://github.com/odoo/odoo/commit/369c20a99bd25172f72f4efde870172a4729aadc:
event cards cannot be customized anymore, only the popover is adapted
depending on <field> attributes inside the calendar tag.

Forward-Port-Of: #54984

original commit: 920599a46e1221c03a20e005a7ad5c61fa9107a0

X-original-commit: ef18d482a58bbff24ce1217619df603ec4670002
2020-07-27 17:22:13 +00:00
Julien Mougenot a7657fbf84 [IMP] web: Drop widget support in search view
Until now the "widget" attribute used in the search view was meant to
force the type of a field regardless of its definition. This system was
implemented quite a long time ago and is now useful in only one case:
searching for "reference" fields (we want them considered as char fields
else it is impossible to search on them).

This is why this commit completely removes the "widget" attribute
support in search views while consistently casting the "reference"
fields as "char" fields in the search bar.

Task 2061795
2020-07-27 08:03:18 +00:00
Victor Feyens c69a092b98 [IMP] doc: _inherits usage warnings
The delegation inheritance is very useful in some cases,
but its usage shouldn't be encouraged.

Furthermore, chained _inherits may result in unexpected
behavior/results,
and really shouldn't be used.

closes odoo/odoo#54864

X-original-commit: 4a06a4c79e962906832f98147fe87a2c19efaa75
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-23 16:18:11 +00:00
Ivan Yelizariev 6d96111196 [FIX] doc: fix typo in guidelines
You can see on example below the updated line that it's module_name and not model_name

<!-- security -->
<record id="module_name_group_user" model="res.groups">
    ...
</record>

closes odoo/odoo#54756

X-original-commit: 56de03befa16eeaaec211b5fc08116ce778b52b7
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-22 10:15:12 +00:00
Pafnow 216985a180 [FIX] doc: correct active explanations
The record is invisible when active=False, not the field
Correct rst arrow syntax

Sign CLA

closes odoo/odoo#54714

X-original-commit: 055cb50b4e12488266e9f9418788c4057257324f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-07-20 13:31:00 +00:00
Xavier Morel 8f09ef294a [FIX] doc: rST definition lists must be preceded by an empty line
Otherwise the reStructuredText parser thinks the first definition
title is part of the preceding paragraph, and the definition item is
interpreted as a quote due to the indentation.

closes odoo/odoo#54709

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-20 11:06:31 +00:00
Thibault Francois 02d613b565 [FIX] doc: update cloc documentation
After the commit 2a57a156c7b8e81c01afa095b3291361d208611f
Cloc excluded by default one more folder, it should appear
in the documentation of the tools

closes odoo/odoo#54609

X-original-commit: 93261c787d1152c94856ef31a1600a4cdab8b83b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-16 17:07:33 +00:00
qsm-odoo bb0cd4d5c8 [IMP] web_editor, *: review background color/image options UI
*: website, mass_mailing, website_blog, doc

Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:16 +00:00
Harald Panten 77146d0296 [IMP] l10n_es: tax template descriptions renamed
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: Josse Colpaert <jco@openerp.com>
2020-07-13 13:23:20 +00:00
Romain Tartière 7d1a097cf3 [CLA] Sign CLA for Vittoria Conseil
X-original-commit: 05d616d91fb3c5480ced5aecfd9941e3eaf304eb
2020-07-10 08:38:29 +00:00
Aaron Bohy e17dc1a793 [IMP] web: form: labels of several occurrences of a field
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
2020-07-02 13:57:37 +00:00
Julien Mougenot 9a1e1e6c3b [IMP] doc: added doc for static templates inheritance
closes odoo/odoo#53923

X-original-commit: b22e71097c0382f5153825792c5283380f22a821
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-07-01 15:39:26 +00:00
Mathieu Duckerts-Antoine 913b926b7b [REF] doc: remove link to js API
The page with the documentation on all js docstrings is regularly
broken. We remove here the link referencing it.

closes odoo/odoo#53911

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-01 14:43:30 +00:00
Leo Tran a80ace5654 [CLA] Viindoo signs Odoo's CCLA
Done at odoo/odoo#53561

closes odoo/odoo#53852

X-original-commit: e4bef56cbbda3eba3d6171132948b74e0dd3ae90
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-30 09:10:13 +00:00
Xavier Morel e1df56f25c [FIX] doc: meta directive support
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: Xavier Morel (xmo) <xmo@odoo.com>
2020-04-17 08:48:21 +00:00
c7964657ec [IMP] web: add support of "sample" attribute in views
With this commit, it is now possible to display sample (fake)
data in empty views, in the hope of easing user onboarding.
This can be enabled (in list and kanban views) with attribute
sample="1" on the arch root element. In this case, if there is
no data to display, sample data will be generated based on
heuristics (depending on field types and names). This can be
used in addition to the no content helper.

Task 2232801

X-original-commit: 7c8e627ff5029cb539d702705e5ce53d658c76ed
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Jérémy Hennecart <jeh@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-22 13:04:01 +00:00
crece365 9ae5b5a0ab [CLA] signature for crece365
Done at odoo/odoo#53103

closes odoo/odoo#53274

X-original-commit: b6bce16bf29228794fdd92d1f2cf9a14dc38fc1e
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-18 17:23:01 +00:00
Martin Trigaux 3c3b88f676 [IMP] tools: add placeholder support to _
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
2020-06-18 13:03:34 +02:00
Mathieu Duckerts-Antoine 3306a0f414 [IMP] *: limit in search panel
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 8d57153b34c04952a85f6642951cb2697016da84.

Task ID: 2154749
2020-06-12 13:34:04 +00:00
Mathieu Duckerts-AntoineandJulien Mougenot e5585c078e [IMP] *: expand and hierarchize in search panel
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 8d57153b34c04952a85f6642951cb2697016da84 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: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-12 13:34:04 +00:00
Julien Mougenot f5f0ca843d [IMP] *: enable_counters with false as default
In the search panel, the attribute disable_counters with default False
has been changed to enable_counters with default False.
2020-06-12 13:34:04 +00:00
1c522ee778 [ADD] odoo-bin cloc cli subcommand.
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: Olivier Dony (odo) <odo@openerp.com>
Co-authored-by: Thibault Francois <tfr@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2020-06-09 00:30:55 +00:00
Michael Mattiello (mcm) b7840dde39 [IMP] web: add nolabel to list view
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: Aaron Bohy (aab) <aab@odoo.com>
2020-06-04 06:02:32 +00:00
Ignacio Ibeas - Acysos S.L 1879e9b7a9 [ADD] l10n_es: products not subject to tax and Canary, Ceuta and Melilla Fiscal Position
closes odoo/odoo#51600

X-original-commit: 343d888c10af3d8d6a360d7857a6fb7903acbf24
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-05-20 10:00:30 +00:00
c5d3a109f5 [REF] ir.autovacuum: declarative garbage collector registration
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: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Olivier Dony <odo@odoo.com>
2020-05-19 13:38:19 +00:00
Priyanka KakadiyaandMohammed Shekha fa00ff97be [IMP] web: graph: add bar/line chart sorting
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: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-05-19 07:48:41 +00:00
David Alonso 4337981d12 [CLA] solvosci
X-original-commit: 8a598a607cdfd033b8709a819cf8cd5579f990d6
2020-05-18 11:41:07 +00:00
Antoine Prieels 5a8467b751 [IMP] doc: Reference for IoT Interfaces
Add documentation for development of new Interfaces for the IoT Box.

closes odoo/odoo#39759

Taskid: 2092878
Related: odoo/enterprise#6552
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-05-13 13:26:05 +00:00
Victor Feyens d2652e971a [IMP] doc: add information on the new populate feature.
* Cmdline interface: how to trigger database population
* Testing: how to implement database population on a given model.
  * autodocumentation of the population methods

+ improve population methods docstrings.

closes odoo/odoo#50596

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-05-13 15:47:04 +00:00
Victor Feyens 55e7b6bbcd [FIX] doc: fix some sphinx warnings
* crashing patch for howto "Build a module"
* javascript_reference: "Bullet list ends without a blank line; unexpected unindent."
2020-05-13 15:10:37 +00:00
Johan Tötterman 9c51b20cc0 [CLA] update SprintIT signature
Add Johan as a contributor for SprintIT

closes odoo/odoo#51063

X-original-commit: f96a17c6fdba4cc53d006db28117f46bbaf347ff
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-05-11 16:05:12 +00:00
Kristina Seregina 9d3966b434 [CLA] signature for kseregina
closes odoo/odoo#50962

X-original-commit: c280a248443b0c15c2d584bd297bd5950a64cef6
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-05-08 17:51:09 +00:00
John Touba d5100fc062 [CLA] signature for Jo541
closes odoo/odoo#50961

X-original-commit: cdf3b380b7090e1481acd96b80a20e851e88be81
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-05-08 17:48:44 +00:00
Yannick Tivisse 8ca96078db [IMP] rating: Add a retrocompatibily route
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: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-08 12:17:20 +00:00