This revision is to make uniform the behavior of the `groups` attribute
on the Python model fields
and on the node in the view architecture.
In both cases, remove the node from the view completely.
Before this revision,
in a back-end view:
- In the Python model, if a field has the `groups` attribute set
and the user is not part of
the groups, the field is removed, completely, from the view.
- In the view architecture, if a node has the `groups` attribute set
and the user is not part of
the groups, the node is made invisible (not completely removed, just
made invisible).
in a front-end view:
- if a node has a "groups" or "t-groups" set and the user
is not part of the groups, the node is removed from the view.
So it's 2/3 cases removing nodes restricted to a group.
and 1/3 case making invisible nodes restricted to a group.
It's simpler to have a uniform behavior for the 3 cases,
simpler to understandard for developers.
In addition, this will help for the goal to cache back-end views.
It makes possible to convert views using the `groups_id` field
by moving the content of these views directly
in the view to which they add content which is suppose to be completely
removed when the user has not the according group.
By getting rid of the `groups_id` many2many field on `ir.ui.view`,
it makes possible to cache the view architecture without
requiring to use the groups in the cache key.
Currently, if we want to cache the view architecture,
it would be required to use the intersection of the user
groups with the `groups_id` groups of the view,
making it costly to compute the cache key,
therefore altering the performance point to cache the view
architectures.
closesodoo/odoo#95729
Related: odoo/enterprise#29592
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Only for terms containing Credit Note and expenses
closesodoo/odoo#97840
X-original-commit: 1754b094a66476a0bdb29fe60dc5583c03336c3f
Related: odoo/enterprise#30262
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Remove most values uselessly specified because giving the same value as
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)
* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default
This will reduce noise/inconsistencies between manifests specifications,
simplify analysis of manifests content, ...
closesodoo/odoo#90209
Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Most of the extensions of `_name_get` are very similar and only want to
search for the given string in multiple fields.
A lot of extensions also don't take into account the negative operators.
Some implementations were also really outdated and needlessly
complicated.
closesodoo/odoo#86588
Related: odoo/enterprise#25608
Signed-off-by: Raphael Collet <rco@odoo.com>
`account.analytic.line` has been set as translatable in saas-15.1. In hindsight,
we can say it was clearly a bad idea as it introduced complexity and confusion.
This is why we are reverting it.
closesodoo/odoo#86203
X-original-commit: 0e0d9e76c6735a688707d51b54f8e978c168a1d9
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
The possible index names have been renamed "btree", "btree_not_null"
(instead of "not null") and "trigram" (instead of "gin").
Task 2742526
Part-of: odoo/odoo#83274
Three supported types:
- btree (default for index=True)
- btree not null (when >90% of the data are null)
- gin trigram search (for char fields)
Review of indexes on all objects.
closesodoo/odoo#83015
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-01-19 16:52:23 +00:00
Laurent Stukkens (LTU)andXavier BOL (xbo) <xbo@odoo.com>, Nicolas Seinlet <nse@odoo.com>
This commit adds an index on the user_id field of account.analytic.account
task-2700429
closesodoo/odoo#81907
X-original-commit: 9b7ad00143145030ca67d8a7bfbe44b700cd1573
Related: odoo/enterprise#23100
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>, Nicolas Seinlet <nse@odoo.com>
Purpose of this commit to improve ux for timesheet app.
So, In this commit done following changes:
- make name field of account.analytic.line model translatable
by user.
- changes in report of timesheet:
- make generic table templete for timesheet.
- changes label for employee_id field column 'responsible'
into 'employee' and unit_amount field column
'time spent (hours)' into 'hours spent' and
'time spent (days)' into 'days spent'.
- move name(description) field column right of the task
column.
- add timesheet entry report for project.
- change internal project name when user has access to
multiple companies.
TaskId-2604773
closesodoo/odoo#75141
Related: odoo/enterprise#20242
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Purpose of this commit change search view that display in
act_window view that open by cost/revenue stat button in
analytic account form view.It displays the search view that
come from timesheet, it should be display search view of
analytic items.
So, In this commit add analytic items search view in
action of cost/revenue stat button.
Task Id: 2622912
closesodoo/odoo#76999
X-original-commit: 8a6145ca809168080a1a2162f2d6da98b6e5c7e2
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
We clean various graph archs taking into consideration that:
- the default type of a graph is "bar".
- a bar chart is by default stacked.
- the field attributes type="row" and type="col" does not make sense for
a graph view (since its implementation was separated from the pivot
implementation a long time ago))
- the boolean attributes should now take 1 or 0 as value (but the other
values are accepted for retrocompatibility).
Part-of: odoo/odoo#76065
This commit moves the Track cost setting from account to analytic in
order to use it in modules depending on analytic.
This setting is based on a group defined in analytic
(analytic.group_analytic_accounting), this group is not moved.
PR : #72736
See odoo/upgrade#2706
task-2545084
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
The attributes field.depends and field.depends_context are problematic
for sharing fields across registries, because they depend on the model's
registry class, which may vary from one registry to another. In order
to make computed fields shareable, we have to move those values away
from fields.
For the same reason, field.recursive should not be inferred, because its
value may depend on the registry, although it is generally not the case.
Moreover, the flag recursive=True is set on a field when field triggers
are determined (on the registry). A compute method may be called before
the flag is set (if no update has been done yet), and that can lead to
incorrect computations.
This happened in test TestUsers2.test_reified_groups in module 'base'.
The user groups view was apparently determined without the flag being
set, and the view depends on the recursive field 'trans_implied_ids',
which was not correctly computed.
We thus force developers to be explicit about recursive computed fields.
The code now logs a warning when the flag is not set up properly.
* account, analytic, calendar, coupon, crm, crm_iap_lead_website,
delivery, digest, event, event_crm, fleet, gamification, hr,
hr_expense, hr_skills, im_livechat, lunch, mail, maintenance,
mass_mailing, membership, mrp, point_of_sale, pos_mercury, product,
purchase, purchase_requisition, sale_management, sales_team, sms,
stock, stock_landed_costs, survey, website_crm_partner_assign,
website_event_exhibitor, website_event_track, website_forum,
website_slides, base
This commit removes oe_edit_only labels and adds placeholder
on fields in form views from a lot of apps to minimize the
shift when switching mode.
task 2330101
The balance/debit/credit compute fields need the user to be part of 'account.group_account_readonly' in order to be calculated. This will avoid having an access error when a user who is not in 'account.group_account_readonly' accesses a view of 'account.analytic.account'.
We need it for the task-2195019. This task adds the possibility to display a m2o('account.analytic.account') field that can access the tree view with the 'Search More...' button.
Task-2195019
closesodoo/odoo#56554
Related: odoo/upgrade#1810
Related: odoo/enterprise#12680
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
From now on, it is possible to use the analytic account's code field in the "doesn't contain" filter.
Until now, only the name of the analytic account was processed when using this filter.
When using the "Contains" filter, both the name and the code of the analytic account were taken into account,
which was inconsistent with how the "Doesn't contain" filter worked.
Ticket #2368695closesodoo/odoo#61830
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Mainly transifex issues but also some errors found through 'grep' checks.
Fix typos and obscure english strings in xml contents, fields strings/helps, some docstrings, ...
ensuring correct translations base (and fallback when translations isn't available).
closesodoo/odoo#57276
X-original-commit: 4214f05d454bca2b60fda3a288d529c098e84f77
Related: odoo/enterprise#13053
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This provides a better API to search for records by name without the
formatting part (`display_name`).
This also simplifies all the overridings of `_name_search` that no
longer need to call `name_get()`. The call to `name_get()` is done in
method `name_search` in a generic way.
Widget attributes have been removed from all search view archs since
they are no longer supported.
closesodoo/odoo#54107
Related: odoo/enterprise#11665
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.
From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:
- models, which are logical entities that depict the client-side state of
messaging as a whole.
- components, which are in charge of displaying information from models.
This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.
Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249
Task-1914207
This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.
closesodoo/odoo#39023
Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
Do not crash if the commercial partner doesn't have a name.
opw-2158809
closesodoo/odoo#43533
X-original-commit: 90b55325894a248b0386d2f8c4b8568d278963f9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Steps to reproduce:
-install accounting
-go to settings > accounting > check the 'Analytic Tags' and the
'Analytic Accounting' options
-go to accounting > configuration > analytic tags and try to use the search
=> You should be unable to search tags by name (working in 12.0)
Previous behavior:
searching tags by name is not possible
Current behavior:
searching tags works as intended and allows to filter by tag name
opw-2152154
closesodoo/odoo#41807
X-original-commit: bcd4458d57d996aa0812da21e7d03155a4314bcd
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía
closesodoo/odoo#41624
X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Open Bank reconciliation, deactivate some record (-), go to "Manual
Operations" tab, add Analytic Tags using the "Search More" functionality.
Resulting tag will be blank and impossible to delete.
This is because:
1) The field shown is the display name, which is missing.
2) When selecting analytic tag(s) this way an array of
results is returned but it is not handled correclty by the view.
When selecting the analytic tag from the drop down menu a single value
'{id: , display_name: }' is returned.
opw-2146833
closesodoo/odoo#41419
X-original-commit: 42ae9ce544605314d969ae1210245f5b5bbf2628
Related: odoo/enterprise#7073
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
To avoid slowing down search like "{relational_field}" contains "{value}"
we always need to return the lazy name_get() for each [_]name_search method
closesodoo/odoo#36735
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>