As we were introducing changes in web_grid (enterprise) we realized that no documentation
on the grid view was yet available in the community documentation. This commit moves the
the existing documentation from enterprise to the community doc repository and adds the
new attributes introduced in the realte enterprise PR.
task-2271628
Closes#65081
Related: odoo/enterprise#12127
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The doc for client actions is currently too minimalistic to be of much
use. This commit adds a seealso linking to the related tutorial.
task-2423824
closesodoo/odoo#63830
X-original-commit: 386e57cf48298162cd4c3bedfa6eb83d6ba4f6bd
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
model_field: name of the FieldMany2One('ir.model') containing the model of the records that can be selected. If its value is different from False, the select will not be displayed.
The purpose of adding this option is to allow the creation of a reference field having its model defined in another field (Many2One).
Task-2195019
We provide a new helper class to help redact x2many commands for create
and write methods. To ensure best compatibility with the xmlrpc layer we
do not change the protocole, the commands are still 3-elements tuples
where the first element is still an integer in between 0 and 6. The
helper class provide the cannonical constants and static methods to ease
working with the commands. The new helper class is also available in QWeb.
Developers are encouraged to transition their code so it uses this new
helper class.
Task: 2366606
The "active" field is a non-working deprecated alias to "auto_install",
it does not work and was confusing users (see #59850). It has been
removed.
closesodoo/odoo#62086
Task: 2361729
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
The `remaining_days` widget is intended to be used for informative purpose,
hence it should not be editable.
opw-2362276
X-original-commit: 4c72b1536a19cd517046113a5ad93b5782774664
Before this commit, links to the documentation were referenced the
previous version, 13.0, instead of the current one, 14.0.
Eventhough there is a redirection done by NGINX of a "versionless" URL
to the latest one (e.g. /documentation/user/general/auth/google.html
-> /documentation/user/14.0/general/auth/google.html as of today), the
goal is to keep links owrking for users that will still be using the
14.0 in three years (and should not endup on the 17.0 doc).
closesodoo/odoo#60228
X-original-commit: 7ac08486d91d0ff0151abeeda057ffa6beda72e8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
FW-change: remove report section in data.rst since report xml tag usage
is now deprecated (#54564)
closesodoo/odoo#60142
X-original-commit: 052c524d7868ea683038d18a22022658abb0511c
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit updates the documentation surrounding compute and inverse
methods for fields, explicitly warning API consumers that grouping
multiple compute fields under a single inverse method is error-prone and
could not work at all (it can still work under specific conditions but
henceforth it shall be considered bad practice).
This case was found at https://github.com/odoo/enterprise/pull/13815/commits/a651413df915f166697d26a83084582207405858closesodoo/odoo#60115
X-original-commit: 1d21924c1da0bed59cd105a3d9bf9b60fa2d7bc4
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#59916
X-original-commit: 89c301b445cc415140367314bc5a858b4431b922
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Adrien Horgnies <AdrienHorgnies@users.noreply.github.com>
Write guidelines on how to write secure code and avoid commons
mistakes.
Update outdated information and move existing security guidelines to
the same section.
closesodoo/odoo#58065
X-original-commit: 10184274fb6be1639d2047e863654ed5c7bef9f0
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commits solves different rendering issues in the javascript reference
documentation, following the work done in #57270, but for issues added in
further versions and missed in the forward-port.
Forward-port of #57758
Forward-port of #57775closesodoo/odoo#57835
X-original-commit: 8885cf578468d34e740bada95440f092f10c6268
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
The behavior isn't exactly undefined: it will appear to work if the
relation refers to only 1 instance. If there are multiple it will give
results for 1 instance and ignore the others. This behavior should not
be relied upon, hence I'm documenting it as undefined. I confirmed this
with mat from the ORM team.
Even better would be to raise an error or warning if `related` is used
in this context.
closesodoo/odoo#57270closesodoo/odoo#57815
X-original-commit: 6ae421f551ee36afa836494bc8563fc9276ab31e
Signed-off-by: Raf Geens <raf-odoo@users.noreply.github.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Raf Geens <raf@odoo.com>
Added an example because it's non-trivial to realize why you would want
to set `mode` to `primary` together with `inherit_id`.
Another way to look at it is that the view matching doesn't understand
delegation inheritance. If it did there would be no need to override
`mode` because it would be able to see that the parent and derived views
refer to related models. But since that feature might not be worth the
effort, it's ok for me to just document the current situation.
X-original-commit: 549d159a836229f634be04131db947b275240edb
Some line items in a bulleted list would span a paragraph but the first
line of the paragraph would be in bold and the rest would be indented
and not bold below it. You would end up with sentences that broke off
half in bold and half in the regular font. This was due to wrong
indentation in the source.
The pattern was also used for more legitimate cases (field descriptions),
as well as borderline cases (where a section might have also worked).
I've updated the borderline cases to have consistent formatting across
the document and removed the bullet points that were prefixing
description lists in both cases.
X-original-commit: 2d865d80b1b9d14994562f0c77b16e99a4167fcf
MAT confirmed the Javascript API is currently not being built due to
repeated compatibility problems between ES6 and the docstring output
with no clear solution in sight.
X-original-commit: 3198d0120a9388768ee882bb98e279f860a5b456
The page shows the first 15 lines of a CSV in raw form as an example.
Next it shows the same data rendered as a table. However, it was
displaying the entire 680-line source data. `csv-table` doesn't have a
`:lines:` directive. I copied and truncated the original file for use
in the documentation.
X-original-commit: 04d4ec33043627747e36730953479557aae278f2
If you define a report using `<report>` it will implicitly add that
action to a Print menu in the model's views. If you use ``<record>`` to
do the same, that won't happen unless you also set `binding_model_id`.
In older versions that wasn't really an issue because people mainly used
`<report>`, but it was deprecated in 13.5, hence this update. And it
applies to versions older than 13.5 as well, I tested until 11.0.
X-original-commit: 6768d4190993e95b50785ac4ebf3be7213ef5e3f
Remove this incoherent comment, and move the interesting information in
the dedicated section.
closesodoo/odoo#57383
X-original-commit: 1be2806045a6d92416a63364391e035ed36589f0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
- Split driver.py to multiple files
- Remove hw_proxy module as most of its routes were not used and
move remaingin routes to a controller in hw_drivers
- Add missing coding and license lines at the beginning of files
- Reorder imports and remove unused ones
- Rename device_id to device_identifier for clarity
- Rename screen to display for consistency
- Other minors improvements
Taskid: 1973956
X-original-commit: 841c016913a87133bf7257c62ae5f6bf7d99e06d
Until now, the quick creation dialog of the calendar view assumed that
the underlying model used a 'name' field for quick creation, with a
graceful degradation if it was not the case (redirect to the form view).
This prevented quick creation of models created through customizations
(for example).
This commit adds a `create_name_field` attribute on the view declaration
(similarly to many2one field) that allows to specify the field to use
during quick creation.
Task-2185423
closesodoo/odoo#48122
Related: odoo/enterprise#11242
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
PURPOSE
Be able to remove some measures from graph / pivot views. Currently fields
are automatically added but some of them make no sense.
SPECIFICATIONS
Add the possibility to not display some fields in the measures dropdown for
the graph and pivot views.
When a field is not displayed in the measures of a pivot views we remove them
also from the list of groupable fields.
LINKS
Task ID-2288381
Community PR #54774
Enterprise PR odoo/enterprise#11970
Upgrade PR odoo/upgrade#1519
This commit adds some doc for the new `limit` parameter of map view.
Task id: 2150548
closesodoo/odoo#55856
Related: odoo/enterprise#10882
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
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
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.
closesodoo/odoo#55734
X-original-commit: e78f777bd8ccb314b85451cbc8d1dd9109997d7a
Related: odoo/enterprise#12341
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
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
Documentation of the affected blocks have been updated to inform about
the contents of the "today" and "now" context values.
closesodoo/odoo#54438
Related: odoo/enterprise#11831
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
* 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)
* 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
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
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
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.
closesodoo/odoo#54864
X-original-commit: 4a06a4c79e962906832f98147fe87a2c19efaa75
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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>
closesodoo/odoo#54756
X-original-commit: 56de03befa16eeaaec211b5fc08116ce778b52b7
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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.
closesodoo/odoo#54709
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
After the commit 2a57a156c7b8e81c01afa095b3291361d208611f
Cloc excluded by default one more folder, it should appear
in the documentation of the tools
closesodoo/odoo#54609
X-original-commit: 93261c787d1152c94856ef31a1600a4cdab8b83b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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
The page with the documentation on all js docstrings is regularly
broken. We remove here the link referencing it.
closesodoo/odoo#53911
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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>
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