The open_action_with_context was not using _for_xml_id, producing an
error when reading the action content.
In open_action, the action_name was taken from the context and needs
sanity checks. Ensure only actions from the account module can be
read and only if the user has access to the target model.
This is a limitation of the previous behaviour but, at the moment, all
known calls are made refering to an action from the account module.
Limit the scope of this method while the 14.0 is still early to avoid
having a door open to ready any action, and difficult to close later.
Remove old action fetching from the context in create_move that is no
longer used.
closesodoo/odoo#61602
X-original-commit: a39e94f7e4dc74e850650ac90bbc5f85af130bc8
Related: odoo/enterprise#14695
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Xavier Morel <xmo@odoo.com>
Unify the behavior for smart buttons on res.partner view form
Let's consider generic records R on a specific model M
- All the R of the children and archived children of a contact C must be counted in smart button of M
in the form of C
- Clicking on the smart button of a contact C must display all R of the children and archived
children of C
closesodoo/odoo#61241
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Previously, in multiple modules, long names would result in an overflow of text.
With this commit long texts should appear like this: [aaaaa...] instead of
going out of their boxes.
Various views are updated, depending on which fields we wanted to prevent
from overflowing and the probability they do so.
Task ID-2325219
PR odoo/odoo#57713
PR odoo/enterprise#13226
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus
WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:
When saving, a read is called. By default, read has
bin_size to true to avoid performances issues.
It will return the image size instead of the content
it may lead to image dissapearing or "Incorrect padding" error
HOW:
find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
git checkout -- addons/base_setup/views/res_config_settings_views.xml
---
PR for General Settings: https://github.com/odoo/odoo/pull/47297
opw-2346644
closesodoo/odoo#61215
X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
- Create a user A with access rights to Project set as 'User'
- As user A, add a follower to a task
An AccessError is raised.
It happens because `allowed_user_ids` has the group
`project.group_project_manager`.
Since a Project User is allowed to set followers on a task, it is
legitimate to set the appropriate portal user as allowed.
opw-2369674
closesodoo/odoo#60725
X-original-commit: 5ee045b2532ce97094dea2fe6b5e354585d67691
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The widget is intended for informative fields only, i.e. the
fields do not need to be editable. It is not the case for the
date_deadline.
closesodoo/odoo#60317
X-original-commit: a455999588053d528cc779b070cac31ab3b273df
Related: odoo/enterprise#14223
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Issue
- Install "Project" module
- Active "Sub Task" feature in settings
- Create a new project `X`
- Go to settings of project `X` and activate "sub task" feature
- Add a Task `A` in project `X`
- Add a subtask `B` to task `A`
- In menu, click on `Tasks` to list all tasks
- Edit view and add `subtask_count` field then save
Wrong value in `subtask_count` field.
Cause
Retrieving childs of self instead of "current" task (`for task in self:`).
Solution
Use "current" task instead of self.
opw-2361013
closesodoo/odoo#60230
X-original-commit: c961638d49a392468ac4a521bcb208dd9d68a99d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
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>
This commit adapts the business code in which
class/module/function/method redefinition took place so that it no
longer happens and the pylint test passes.
odoo/odoo@dadcec593d introduced a duplicate name in the filters of the
view project.view_project_project_filter.
This commit renames the new filter from my_projects to own_projects.
closesodoo/odoo#60137
X-original-commit: a372d34a4c98e459c5170369fd90cbd4181ba4a3
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
This change ensures that when the user activates optional features of the
project app, they are enabled in existing projects as well as newly created
projects automatically, which is likely what the user expects.
For most optional features, this behavior was already in place. It was not in
place yet for the sub-tasks and timesheets features, which this change fixes.
Two added tests check the behavior described above for features that are
activated through a `group_*` field on `res.config.settings` (sub-tasks,
recurring tasks and ratings). The tests do not cover features that are
activated through a `module_*` field, as such fields require the installation
of further modules and we cannot simulate this.
Task 2297054
closesodoo/odoo#60106
X-original-commit: 8dd0edae898a532dbe7e4f18c9118b9b68e57900
Related: odoo/enterprise#14119
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Kevin Baptiste <50135801+kba-odoo@users.noreply.github.com>
- Create a new Project with 'Portal user and all employees' as
visibility;
- Add a portal user as customer;
- Create a new task in the Project, without assigning the task to
anybody;
- Connect to the portal as the portal user;
- Send a message on the task.
Before this commit, an Error 403 forbidden was raised, this error occurs
because the task don't have an access token created, this token will be
created when an internal user send a message on the task.
Now, the access token is created if the project has a 'Portal user and
all employees' visibility, and the portal user can post a message on
the task.
opw-2345070
closesodoo/odoo#59733
X-original-commit: 64e93794efb4193b3dfa7aa43360a1ef274e623d
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Including demo data this time
closesodoo/odoo#58862
X-original-commit: 575abde110acb3d12b25f177a863374becef0894
Related: odoo/enterprise#13705
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
When the alias had been set, if the user wanted to disable it
he had to erase the email first. Otherwise unchecking the check box
didn't work.
Task-2299286
closesodoo/odoo#58634
X-original-commit: 45cd13e14fef0bab6921a1fff79335df9015cbf0
Related: odoo/enterprise#13613
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
For the graph views based on reporting models (e.g sale.report), click
on a group in the chart redirects the user to an "empty" list view. Here
we use the attribute disable_linking to avoid that redirection for those
views.
Task ID: 2336960
closesodoo/odoo#57622
X-original-commit: 0b0ae92b6bdac25843ba24d767dbcab3b75703e5
Related: odoo/enterprise#13192
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit:
The field `planned_hours` and `subtask_planned_hours` are present
twice. This causes problems with widget: different widgets are put
on different fields, but only the last on was put on all of them.
Code to edit label with hours/days is not flexible, we need to
write each possibilities.
After this commit:
All fields are present only once in the view. A new widget is
created to manage days with a factor. In this new widget, instead
of having a toggle button, we can insert a float.
When the widget timesheet_uom is set on a field, we modify his string
with hours/days.
closesodoo/odoo#57557
Taskid: 2326216
X-original-commit: 5b3804402b3ebee5abe7004b8f8caccadaabfe1e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
PURPOSE
Clean code and be and more performance oriented.
SPECIFICATIONS
Various portal pages hold references to archive_groups. It was a summary
of customer documents for portal, containing a count of all documents split
by model.
Currently its computation is not used. Indeed archive_groups is displayed
only in 'my_details' page that does not hold any document-based reference
or code call. Other calls to archive_groups are dead code as the result is
not used. Since 13.0 it is even not computed on standard pages to speedup
their load (as it was not used).
It is not used anymore and its computation and references can be removed
safely, especially with v14 in mind for which we want to remove dead code
to maintain.
Followup of odoo/odoo#55228
LINKS
Task ID-2329081
PR odoo/odoo#55800
PR #12368closesodoo/odoo#56859
X-original-commit: e75086000ee4317b2ad2994db5d906fbcbd5081f
Related: odoo/enterprise#12830
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.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>
In multi-company configuration setup, Company A and Company B.
Have a project in Company A that I want to share with a user in
Company B. The user only has access to Company B.
Share using the project link and open using the user
Traceback error will raise.
Adding a default value to retrieve in case the filter option is used
but the user has no permissions on the records.
opw-2322236
closesodoo/odoo#57090
X-original-commit: bcb62e8f6e20bccc2f2350bdc1268c495b7103da
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
PURPOSE
Clean code. Be more performance oriented.
SPECIFICATIONS
Improvements applied in this commit
* not all() --> any(not) for earlier returns;
* all([generator]) --> all(generator) to avoid unnecessary list casting.
This code construct is better managed by all;
This commit will probably not have a big performance effect on standard
production databases. However each performance and cleaning improvement
is welcomed.
LINKS
Task ID-2328619
closesodoo/odoo#56810
X-original-commit: 1cc6bb1231401ea7f501d2f5b5e9641ec8734850
Related: odoo/enterprise#12802
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Before this commit, it was not clear that allowed portal users could see all tasks, even when they were not the customer.
closesodoo/odoo#53962
Taskid: 2265562
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Split completely 'non billable' from 'task rate' for more clarity.
Simplify the task form view of non-billable projects.
TaskID 2032048
closesodoo/odoo#55972
Related: odoo/enterprise#12441
Related: odoo/upgrade#1662
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The commit 79132f6 allowed multiple level for the subtasks, but a
remnant from the ancient time was left.
closesodoo/odoo#56104
Taskid: 2317929
X-original-commit: ace68ceceb92f8d7c16155fd72acd469424accd0
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, the time to compute all counters was making the rendering
of the portal page slow.
Now the count is done in rpc after the loading of the page.
Now you can decide which part you want to show on the portal, and only compute
for these one.
It is not because you have purchase installed for your internal process, that
it means that your supplier use your portal and it avoid the computation for
all end users.
We parallelize the counters in arbitrary 3 rpcs.
closesodoo/odoo#55999
Related: odoo/enterprise#12456
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.
Add sudo for other operations on ir.actions.*
/web/action/load is the public controller that Should be used by the
webclient to fetch actions
_for_xml_id is the default access method on actions that implements
fields filtering to avoid leaking server action code or other
information not needed by the webclient
Implementing whitelist of fields that can be access per model
The purpose of this task is to improve the UI of the 'Apps', by
improving the clarity of the kanban, sequencing the apps and
simplifying the app categories in the searchpanel
So in this commit, Added the new sequences for ir.module.module
and ir.module.category records.
TaskID: 2240257
Related Enterprise: https://github.com/odoo/enterprise/pull/12413Closes: #55907
Values filled in "Assigned To" m2o were differing:
- if I "CREATE" task with "group by" then m2o is filled with
internal-users + portal-users
- if I "CREATE: task without group by then it filled with internal
users only.
In Project also same case.
To have a more coherent behaviour, we decided to put only internal
users in both cases.
Task ID #2229592
Community PR #54776closesodoo/odoo#55820
X-original-commit: 8269c1958843002246c589cdd593417dec44f024
Related: odoo/enterprise#12376
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
PURPOSE
Review the tips and digest layout design to make sure they have a WOW effect
and increase trial conversion/retention.
SPECIFICATION
“Customize tasks and stages according to the project”
See code for specifications.
LINKS
Task ID-2274264
COM PR: odoo/odoo#53580
ENT PR: odoo/enterprise#1139
X-original-commit: bd2cd2ca4e4fd1fa99d6a97b8af291363e4b1d84
Some interventions are done on a regular basis (e.g. maintenance of
fire alarms, safety inspections). Having tasks auto-generate would
facilitate the process and would ensure that the next intervention
isn't missed/forgotten.
closesodoo/odoo#55517
Taskid: 2172156
Related: odoo/enterprise#12246
Related: odoo/upgrade#1604
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, In the project module, the archived/deleted sub-task is
not deducted from the count of the 'sub-tasks' stat button.
Steps to reproduce:
- Go to Project > Configuration > Settings > Enable 'sub-tasks'
- Go to a Project with sub-tasks enabled, open a task and create a sub-task
- Archive/Delete this sub-task
So in this commit, we applied filter on sub-task which show only active
sub-task on the stat button.
closes odoo/odoo#55347
Taskid: 2304887
Closes: #54904
X-original-commit: 81db237e3324922ff16f2b290922f21d98046738
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The archive groups feature allows the user to have fast access to
records of a given month, under its details information.
But since the details section isn't shown anymore on portal sub-pages,
the feature is computed for nothing on (most) pages.
Removing this computation avoids a read_group call on portal subpages
(multiple potential queries).
This commit disables the feature until a total removal in master.
my_details is only truthy on the /my/account portal page, where no
archive_groups is given anyway (and the value is set to True only in the
rendered tempate itself).
X-original-commit: 40c57fafdd5651a522891ab68affe38933ea5202
The record counts are only useful for the badges displayed in /my &
/my/home.
By avoiding those counts on subpages, we gain a lot of useless queries,
improving the loading speed of those sub-pages.
X-original-commit: 79c8384f1bcbcdede030e187008319a70c664571
Leave the generic management of fields default to the orm as much as
possible.
* Default method is not called unless necessary.
* Default values are correctly post-processed by the orm when necessary.
- The field `allowed_user_ids` is only accessible to Project Manager.
When trying to duplicate a task, an access right issue is raised
if you are not project manager.
This is due to the fact that when trying to duplicate this field is
read.
To avoid this issue, we specify that this field should be copied thus
not be read.
closesodoo/odoo#54509
X-original-commit: 95dedd23cc7a7d66d7a7dc17b9f9ac4f5473e226
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Update mail alias layout, makes email address
clickable (mailto) and fix a couple of typos.
Task ID 2287394
closesodoo/odoo#53960
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
opws: 2269230, 2248760
When a database has a lot of projects with many tasks, and needs
to send a lot of feedback mails, the cron tries to send mails to
all tasks at the same time, thus it times out.
This fix will allow to treat projects one at a time so that when
the cron times out, it will not restart from the beginning.
closesodoo/odoo#53922
X-original-commit: 07c828b48741500573b4286480b23752a28163c7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit fixes all issues detected by the new pylint
gettext-variable test.
It converts some calls to the new syntax
_("Foo %s", bar)
to progressively migrate the code to the new syntax.
A few calls were not technically incorrect but still detected by the
linter.
_("Foo" +
"Bar")
has been converted to
_("Foo"
"Bar")
as it has the same effect and make sure the argument is of type
asteroid.Const instead of BinOp).
closesodoo/odoo#53683
Related: odoo/enterprise#11467
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
1. Generic timesheets improvements
- Portal /my/timesheets
- Add a group bys task, date, employee
- Add search in project, name, employee, task
* The task column should not be visible if none of the timesheets have the Task field set
- If a group by task, date, employee or project is applied, the corresponding column should not be visible
2. Timesheets from sub-tasks on parent tasks
- Portal /my/tasks
- Display the 'Total Hours' spent on a task at the end of the list of timesheets
- Below the list of timesheets for the task, display another table detailing the respective timesheets (and total hours) of each sub-task linked to this task (= 1 table/list per sub-task)
* Title should be: 'Timesheets for sub-task: xyz'
* only visible if there are sub-tasks linked to this task
* only visible if total hours > 0
3. Timesheets on Invoices
- Portal /my/invoices
- Add Project + task fields
* Task field only visible if set on one of the timesheet entries
* Project field only visible if there are at least 2 different projects in these timesheet entries
4. Correct visibility for the portal users
- Portal users is allowed to see timesheets if the users are added in allowed portal users list in the project
- When a portal user is added as the message follower of the project, the user is added to allowed portal users as well
- When a portal user is removed from allowed portal users, the user is also removed from message followers
closesodoo/odoo#47248
Taskid: 2201908
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Done the below several improvement on project:
- move the stage description and tooltips to the debug mode
- remove the 'need assistance' tag
- Change the app description in manifest file 'Organize and
plan your projects.'
- Change the burger menu sequence into: Edit/Delete/Share/Set Cover Image
- change the description of the pad feature into, 'edit tasks
description collaboratively in real time. see each author's
text in a distinct color.'
- add the following tooltip for the allow_billable field,
'invoice your time and material from tasks.'
- add an fa-stopwatch icon in front of the Start & the Stop buttons
in task's form view
- rename the 'validate time spent' modal into 'confirm time spent '
+ increase the size of the description field
+ this field should not be required
- project overview: rename 'Hours recorded' into' Recorded Hours'
- project form view: disable the creation for the portal users field
- Rename the 'ready for next stage' kanban state into 'Ready'
TaskID: 2232051
Related Enterprise PR: https://github.com/odoo/enterprise/pull/9961
closes odoo/odoo#49694
Closes: #49694
Related: odoo/enterprise#9961
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The 'stage_id' field is now a stored-editable computed field.
The 'company_id' has been converted to a stored-editable computed field.
The modification of the 'partner_id' field in the onchange method has been
moved and merged into the _compute_partner_id method.
Remove the empty 'onchange' method from the project.task model and also remove
this method call from the sale_timesheet module, which inherits from the project.task model.
Adapt the _compute_partner_id to retrieve exactly the behaviour before the onchange
method deletion.
Update code and tests of the task/subtask partner_id management after discussion with Alexandra to clarify the behavior.
Add the 'multi_edit' attribute to tree views.