with this commit we adding weekly recurrent widget, currently proeject and
calendar shows boolean for each day vertically but with this widget we displays
week days and its boolean horizontally.
Here widget will display first day as per language's week_start field, also we
adds FieldDependencies on custom widget and consider those FieldDependencies
while processing view node in basic_view.js
We add support of registry to contain owl custom widgets and add support
of rendering owl custom widgets.
Also with this commit we removes fields like sun, mon, tue etc. from view and
instead use "web_weekly_recurrence" custom widget to display boolean for each
week day.
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Purpose of the commit is to display the default label next to the icon
for state_selection widget in list view.
also that widget support the hide_label option to hide the label in
state_selection widget of the list view.
Related Ent PR: odoo/enterprise#16559closesodoo/odoo#66589
Taskid: 2451287
Related: odoo/upgrade#2195
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In tests, we might want to disable a specific patch for a specific
test (e.g. to remove a monkey patch done when another addon is
installed, to test the behavior of the current addon).
Before this commit, it was possible to unpatch at the beginning of
the test, but we couldn't re-patch when the test was over.
Feature required by task~2392303
Commit [1] altered the way the FieldMany2Many behaves with respect
to 'create' and 'delete' options. Indeed, for many2many fields,
adding or removing records doesn't mean "creating" or "deleting"
records, as it is only about adding/removing records to/from a
relation. This is completely fine and correct.
Unfortunately, a feature has been lost in the process: it is no
longer possible to state that a many2many field should be editable
but should not allow to add (or remove) record to the relation.
This commit fixes the issue by adding two new options: 'link' and
'unlink' for that purpose.
[1] https://github.com/odoo/odoo/commit/c98579d25af01c14df4baf57fb4652f3e7469096
opw~2466213
closesodoo/odoo#67495
X-original-commit: df44e65bbbba55a7ee2224ad5b4f13248a39423a
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The Many2ManyCheckboxes widget displays all values that could be
in the many2many relation, with a checkbox indicating whether each
value is in the relation or not. It is designed to be set on fields
where the comodel contains a few records (typically, we don't want
to see dozens of checkboxes in the form view). This widget shouldn't
be used on many2manys with a large comodel, as we have better tools
to handle them (like a tree view).
We deal with extreme cases (when the widget is, by mistake, set on
a field where the comodel is huge) by using the name_search limit
of 100: at most 100 checkboxes are displayed.
Before this commit, this extreme situation wasn't correctly handled.
If there were in the relation records that weren't displayed
(because they weren't inside the 100 limit), then, editing the value
by (un)selecting a checkbox would automatically remove all non
displayed values from the relation.
This commit ensures that we keep in the relation all values that
aren't displayed.
Issue spotted when working on opw~2439041
closesodoo/odoo#67400
X-original-commit: 9e9d3aa78c42ad4ffca3b56a28382ed84078cde3
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
* This feature will be useful when the user needs to "reschedule" an event.
It is more convenient to open the CalendarView around the original start date of the
event instead of "Today"
* Add a test to ensure that the context key is correctly passed to the view as the initialDate
Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
* hr, hr_holidays, im_livechat, mail, snailmail, website,
website_livechat
This commit removes `patchMixin` and improve `utils.patch`.
`utils.patch` now supports native classes and has a new parameter
used to patch class members.
`utils.patch` is now used everywhere `patchMixin` was and it must
be used to patch classes.
closesodoo/odoo#65967
Related: odoo/enterprise#16278
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: ged-odoo <ged@odoo.com>
With the new native JS module system, we have a lot of new features for
the developer: autocompletion, docstrings, ...
However, it does not work across modules: if a JS file in
/addons/stock/static/src/some_file.js want to import a file in web, say
/addons/web/static/src/blabla.js, we will need to use a statement like
this:
import { something } from '@web/blabla';
Obviously, there is no automatic way for IDEs to know that '@web' should
map to 'addons/web'.
This is why we propose to use a tsconfig.json that defines the mapping
between modules and their paths. This is not mandatory, and only
affects those developers that work commonly in JS.
Part of PR 63177
Co-authored-by: Francois (fge) <fge@odoo.com>
Because of the way Odoo works at its core, we do not know before hand
which files will be loaded as an asset in the browser, because it
depends on the installed Odoo addons. This is why it is historically
difficult to integrate Odoo with standard JS tooling, and this is why
Odoo needs to use a custom javascript module system.
However, there is a way to use native JS modules (and gain all the
benefits from it: IDE autocompletion, ease of refactoring, intellisense,
...): we can write JS as native JS modules, but convert them at runtime
into Odoo custom modules. This is exactly the strategy applied by this
PR.
This has a lot of benefits, but there is a downside: we can no longer
serve statically JS files in debug=assets. This would be a dealbreaker,
if we did not have sourcemaps (implemented in the next commit).
This commit introduces the python code that will transpile native JS
modules into odoo JS modules.
Task ID: 2414902
PR: 63177
Co-authored-by: Francois (fge) <fge@odoo.com>
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