summaryrefslogtreecommitdiff
path: root/addons/project/models/project.py
AgeCommit message (Collapse)Author
2021-04-23[FW][FIX] mail, various: fix document access link computationThibault Delavallée
Purpose of this commit is to fix computation of access link. In some cases msg_vals modification leads to invalid URL computation, notably for frontend or backend differentiation for target recipients. Followup of odoo/odoo#63292 . Task ID-2513724 COM PR odoo/odoo#69607 ENT PR odoo/enterprise#17849 X-Original-Commit: odoo/odoo@2015ef463c9ac7c7f89d543745c02a2d1528acf2
2021-02-18[FIX] project: Creating project via service product deletes contact's dataGoffin Simon
Steps to reproduce the bug: - Let's consider a customer C1 with email address A1 and phone P1 - Let's consider a project PR with C1 as customer - Let's consider a service product P with: - Milestones (manually set quantities on order) as Service Invoicing Policy - Create a new project but no task as service tracking - PR as project template - Create a sale order SO with C2 as customer with A2 as email address and P2 as phone - Confirm the SO Bug: The email address and phone of C2 were changed into A1 and P1 instead of keeping A2 and P2 opw:2439459 closes odoo/odoo#66307 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-02-02[FIX] project: filter when not requiredbit-odoo
Before this commit: A method action_subtask is including the other actions context if have which reflects while clicking on the Sub-tasks stat button. For examples: - When click on the stat button 'Sub-tasks' of any task which one is clicked by systray activity icon results - When click on the task menu in project there a default search filter 'My task' which also passes when click on 'sub tasks' stat button After this commit: Remove the context that startswith `search_default'. Hence, now subtask will display with the correct context. Task-2413127 closes odoo/odoo#65395 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-01-19[FW][FIX] project: propagate internal subtypes to tasksPriyanka kakadiya
before this commit: while changing subtypes of the project it was only propagating those subtypes to the task, whose parent_id is set. internal subtypes are not propagating in the task of a project. So, filter internal subtypes and concat them with the subtypes which have parent_id. after this commit: internal subtypes will also propagate to their tasks closes odoo/odoo#62495 X-original-commit: odoo/odoo@2ad320e9050160725601b82fa6239c94aad93d20 X-original-pr: odoo/odoo#47336 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-13[FIX] project: remove dependency cycle in compute methodRaphael Collet
The issue was triggered by the fact that editable fields are no longer computed when they have a default value. closes odoo/odoo#64359 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-01-06[FIX] mail: send notification mail with right access link when using mail.threadAchraf (abz)
PURPOSE Notification may be sent using a generic mail.thread record, notably when sending user notifications. In that case links to view document are incorrect. HOW TO REPRODUCE Issue - Install "Approvals" - Submit new approval with you as "Request Owner" - Click on "View Approval Request" in your mailbox The link redirects to a 505 error Cause The model is not the correct one and the res_id is undefined Solution Specify the model and the res_id to _notify_get_action_link when creating the link with kwargs SPECIFICATIONS Propagate message value through various notification sub methods. That way we can rely on them if model seems void. Also limit values given as URL parameters to some white listed values. LINKS opw-2358846 Task ID-2379766 Followup of odoo/odoo#60998 Followup of odoo/odoo#61545 Closes odoo/odoo#63292 Closes odoo/enterprise#15585 closes odoo/odoo#64170 X-original-commit: 2b6d2b71f6c60bcf64db440473c88d1dc335acbf Related: odoo/enterprise#15588 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com> Co-authored-by: Achraf Ben Azzouz <abz@odoo.com> Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-12-08[FIX] project: Fix wrong recipient display based on email_fromKamesh Patel
Currently, The customer that is not selected anymore is suggested as a recipient steps to reproduce: 1. create a project task without a customer set 2. select a customer, then remove it, then save 3. send a message in the chatter --> the customer that is not selected anymore is still suggested as a recipient. The issue is due to invalid value of partner's email in the field email_from on task. So in this commit, when the customer is not defined or is not a child task then keep the email_From of the task. (Here we are checking the task.parent_id because when someone update the email_from on parent it should be updated in child task's email_from and when we remove the email_From in parent it should not be removed from child task) closes odoo/odoo#63042 Taskid: 2339894 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-27[FIX] project: show "View Task" to portal customersKevin Baptiste
Since commit 62024ca the portal customer of a task were missing the "View Task" button. closes odoo/odoo#62484 Taskid: 2393286 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-23[FIX] project: don't send rating email when disabled on projectKevin Baptiste
The rating emails were still sent even if the rating feature was disabled on the specific project. This commit ensures the emails are only sent to project with the feature enabled. closes odoo/odoo#62145 Taskid: 2390802 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-16[FIX] *: rephrase, correct typosMartin Trigaux
Courtesy of Transifex's translators for reporting bad/unclear sentences. closes odoo/odoo#61785 Related: odoo/enterprise#14751 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-10[FIX] *: sanitize action content readingMartin Trigaux
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. closes odoo/odoo#61365 Related: odoo/enterprise#14682 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com> Co-authored-by: Xavier Morel <xmo@odoo.com>
2020-10-26[FIX] project: add follower as project userNicolas Martinelli
- 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 closes odoo/odoo#60702 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-19[FIX] project: wrong subtask countNasreddin (bon)
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 closes odoo/odoo#60229 X-original-commit: c961638d49a392468ac4a521bcb208dd9d68a99d Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-09[FIX] project: access token on taskJorge Pinna Puissant
- 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 closes odoo/odoo#59282 X-original-commit: 8a68fac8b246a3e2435e670d9fb2bfb91cc9f83f Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-09-28[FIX] project : fix issue with alias and display issue in portaljdoutreloux
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 closes odoo/odoo#58571 X-original-commit: 45cd13e14fef0bab6921a1fff79335df9015cbf0 Related: odoo/enterprise#13583 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-02[FIX] hr_timesheet: Widget for planned hoursjbm-odoo
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. closes odoo/odoo#56702 Taskid: 2326216 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-31[IMP] various: improve code style and performance by improve ``all()`` usageVictor Feyens
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 closes odoo/odoo#56060 Related: odoo/enterprise#12486 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-19[FIX] project: remove constrains for multilevel subtasksKevin Baptiste
The commit 79132f6 allowed multiple level for the subtasks, but a remnant from the ancient time was left. closes odoo/odoo#56104 Taskid: 2317929 X-original-commit: ace68ceceb92f8d7c16155fd72acd469424accd0 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-13[IMP] hr_timesheet,pad_project,project,rating,sale_timesheet: back2basics ↵Arnaud Joset
project Multiple UI and UX changes taskid: 2299401
2020-08-17[FIX] *: adapt action content retrievalMartin Trigaux
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.*
2020-08-17[IMP] base,web: _for_xml_id as a safe access pointMartin Trigaux
/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
2020-08-12[IMP] project: add recurring tasksKevin Baptiste
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. closes odoo/odoo#55517 Taskid: 2172156 Related: odoo/enterprise#12246 Related: odoo/upgrade#1604 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-03[FIX] project: Fix sub-tasks stat button countNisha patel
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>
2020-07-23[IMP] *: replace default_get overrides by default attribute on fields.Victor Feyens
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.
2020-07-15[FIX] project: allow non manger to duplicate tasksToufik Ben Jaa
- 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. closes odoo/odoo#54509 X-original-commit: 95dedd23cc7a7d66d7a7dc17b9f9ac4f5473e226 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-07-01[FIX] project - send rating mail by projectsnd
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. closes odoo/odoo#53922 X-original-commit: 07c828b48741500573b4286480b23752a28163c7 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-30[FIX] *: correct all or improve code translation lookupMartin Trigaux
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). closes odoo/odoo#53683 Related: odoo/enterprise#11467 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-29[IMP] hr_timesheet: Improve the usability of timesheet portalqho
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 closes odoo/odoo#47248 Taskid: 2201908 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-24[IMP] project,sale,hr(_timesheet): Generic improments for projectHardik Prajapati
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>
2020-06-23[IMP] project: convert onchange to stored-editable computed fields.Rémy Baranx (bar)
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.
2020-06-18[IMP] *: replace to new _() syntaxMartin Trigaux
Using a few regex like \((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\) ($1, $3)) Old syntax is still compatible but starts the migration to the new syntax that catches error.
2020-06-15[IMP] project: create tasks in batchVictor Feyens
2020-06-02[IMP] project: Improve global UX (back2basics)Yannick Tivisse (yti)
Improve the onboarding of new users and clean a few screens. Task ID: 2237996 closes odoo/odoo#50284 Related: odoo/enterprise#10536 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> Co-authored-by: dmonzonis <mod@odoo.com>
2020-05-26[FIX] project: Allow sub-tasks configuration per projectLucas Lefèvre
Enabling sub tasks is done through the general settings but it should be possible to disable/enable it on specific projects. The current implementation does not allow that since the field enabling the feature is a readonly, user dependent field. Task 2192763
2020-05-25[IMP] project,...: Improve list views with new widgetsYannick Tivisse
Purpose ======= Task 2195254 introduced many wonderful widgets to pimp the list view. This task aims at implemeting them into the Services apps: project, timesheets, helpdesk, expense, planning and field service. Remaining days: https://drive.google.com/file/d/1o4Wn47445GxLqBkw-ifH9MgtFU_437xz/view Avatar: https://drive.google.com/file/d/1yDwJWP0MZCUKZbqCa8hte1ziVTYRMMtb/view Activities: https://drive.google.com/file/d/1e_rXH50eZq4zY2HOzw7_pfgiD39SoRIl/view Field-specific decorations: https://drive.google.com/file/d/1WFnqJ-jkyDFftRHxWW4bgomoWrOpOuaY/view More control on buttons Specifications ============== You will find below a list of which widgets to apply to which fields by model. Some changes have to be done in the form/kanban views as well. 1) project.task remaining days -> date_deadline -> list + kanban + form views hide this field if is_closed is true avatar -> user_id -> list view activities -> 'next activity' field to be added -> list view field-specific decorations https://nimb.ws/ACewrY remove the current orange/red decorations we have if planned_hours > 0, display the remaining_hours field in (list view): red if progress is > 100% orange if progress is between 80% and 100% green if progress is <80% display unit_amount in red if > 24:00 -> form view 2) rating.rating display the rating in: green = satisfied orange = not_satisfied red = highly_dissatisfied list + form views 3) project.project avatar -> user_id -> list + form views 4) account.analytic.line avatar -> employee_id -> list view display unit_amount in red if > 24:00 -> list + kanban + form view https://nimb.ws/eIWa7E merge the timer and duration fields together 5) helpdesk.ticket avatar user_id -> list view employee_id under timesheet_ids -> form view remaining hours -> sla_deadline activities -> 'next activity' field to be added -> list view field specific decoration -> display unit_amount in red if > 24:00 -> form view 6) hr.expense avatar -> employee_id -> list view activities -> 'next activity' field to be added -> list view badge -> state -> list view draft = blue reported = green approved = green done = green refused = red combine the unit_amount and the currency_id fields (see the total_amount field for reference) -> list view (idem for the expense_line_ids one2many on hr.expense.sheet) display the total_amount in bold move 'company_id' before 'amount' 7) hr.expense.sheet avatar employee_id -> list view user_id -> list view activities -> 'next activity' field to be added -> list view badge -> state -> list view draft = blue submit = green approve = green post = green done = green cancel = red display the total_amount in bold move 'company_id' before 'amount' 8) planning.slot avatar -> employee_id -> list view decoration display the allocated_percentage field in red if > 100% -> list + form view display the forecast_hours field in red if > planned hours and if planned_hours > 0 -> form view display the effective_hours field in red if > forecast_hours and if forecast_hours > 0 -> form view 9) misc calendar.event -> avatar -> user_id -> form view mail.activity.type -> combine the delay_count and delay_unit fields together -> list view note.note -> 'next activity' field to be added -> list view crm.lead.mining.request combine the lead_number and lead_type fields together -> list view display the name in bold badge -> state draft = blue done = green error = red planning.slot.template -> display the duration field in red if it is = 0 closes odoo/odoo#51271 Taskid: 2248351 Related: odoo/enterprise#10605 Related: odoo/upgrade#1252 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-08[IMP] customer ratings flow improvementsBenjamin Frantzen (bfr)
- Rename the 'Use Rating on Project' feature into 'Customer Ratings' - Rename the 'Set Email Template to Stages' link to 'Set a Rating Email Template on Stages' - Add an optional list view for the Stages menu - display warning if the rating_template_id field is set and if one of the selected project_ids doesn't have the rating_status field set to true - Project form view revamp - rename the '% on tasks' stat button into 'Customer Satisfaction' - Remove the 'no option' for the rating frequency field because it is required - project form : Add a 'Go to Website' stat button - Project dashboard: remove the 'Customer Ratings' menu item in more - Ratings page: the 'Last 30 days' filter include ratings from today - remove the Appointment / Helpdesk Customer Satisfaction / Live Support menu items TASK ID : 1251
2020-05-08[IMP] project: add closed stage in projectKevin Baptiste
closes odoo/odoo#46749 Taskid: 2205057 Related: odoo/enterprise#9119 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-15[IMP] project: hide 'View Task' in emailKevin Baptiste
Hide the View Task button in the emails sent to a task's followers based on the project's privacy settings. closes odoo/odoo#49021 Taskid: 2230189 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-22[IMP] various: Set a default random color on certain tagsYannick Tivisse
Purpose ======= For a tag to be displayed on a kanban card, it needs to have a color set. We won't be changing that behaviour, since it would mean having two options > the color, and whether or not to show it in the kanban The purpose of this task is to set a color on new tags to make the user save a bit more time, set a color for him as he might not find the feature, and make sure the tag will be on the kanban cards. Specification ============= For each of the following models, at creation, set a random integer between 1 and 11 in field 'color' Models: res.partner.category crm.tag project.tags hr.applicant.category helpdesk.tag hr.employee.category event.track.tag mrp.eco.tag repair.tags closes odoo/odoo#49967 Taskid: 2234527 Related: odoo/enterprise#10112 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-22[IMP] project: ease stage deletionKevin Baptiste
Before this commit, deleting a stage with tasks, the user received an error. With this commit, when deleting a stage containing tasks, a wizard offers the choice to move the tasks to another stage. closes odoo/odoo#46410 Taskid: 1869030 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-17[REF] mail, various: clean usage of mail aliasThibault Delavallée
Clean the usage of mail aliases and more specifically its associated mixin `mail.alias.mixin` . Stop using context for model of aliases, and correctly give model_id and parent_model_id to the call chain through a cleaned code easier to override. We also merge methods get_alias_model_name and get_alias_values in single one called before record creation (alias first values) and right after (to have values depending on actual record). LINKS Task ID 1919277 Community PR odoo/odoo#41160 Enterprise PR odoo/enterprise#6983 Upgrade PR odoo/upgrade#872 Co-Authored-By: Rémy Voet <ryv@odoo.com> Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-04-09[FIX] project: make label_task translatablejvm-odoo
Issue - Install Projects - Change language - Check projects There is a word "X Tasks" which is not translated. Cause This is a model attribute which is not translatable. It can have any value "Tasks" is not mandatory. Solution Make it translatable OPW-2233084 closes odoo/odoo#49346 X-original-commit: 587160376237a12a9174ad5c4578a273b48ca489 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com> Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-04-09[IMP] Planning: Improve help messagejbm-odoo
And add optional max-depth to find all sub-tasks of a task. Task Id: 1985510 closes odoo/odoo#47429 Related: odoo/enterprise#9168 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-08[IMP] project: improve usability (back2basics)Kevin Baptiste
* Reword tasks in the sample project * Add a "Create and Edit" button on the project creation modal * Open the file chooser in "Set a cover image" if there are no images set * Correclty display the kanban state button on archived task * Add a button to list the tasks when deleting a project * Open file chooser for cover image: Automatically open the file chooser when setting a cover image on a task if there are no attachments to chose from. closes odoo/odoo#47306 Taskid: 2209133 Related: odoo/enterprise#9141 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-10[FIX] project: Allow multi company ir rule relaxionLucas Lefèvre
If you want to de-activate the multi company ir.rule, those checks will still raise an error. Task 2198433 closes odoo/odoo#47291 X-original-commit: 12a81a3a5265cbd18f5c00ab439cd1486696521b Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2020-02-10[REF] mass_mailing, project: remove deprecated '_period_number' attributeoco-odoo
This parameter declared on mailing and project classes is not used anymore. Let us remove it to clean model definitions. closes odoo/odoo#39401 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-31[IMP] project, industry_fsm: Improve subtasks and configuration UXKevin Baptiste
Purpose ======= In Project, the configuration has to be done twice: in the settings of the app and on each project. During the onboarding, the user won't understand that a feature has to be enabled at both places and will think that the system just doesn't work. If the user enabled a feature, he most likely intends on using it for most of his projects. Therefore, having to do a double configuration for each new project is annoying. By the way, sub-tasks is the only global feature (it can't be enabled or disabled by project), so we are breaking it down by project to remain consistent with the rest. Specification ============= 1/ Enable subtasks per project Before this commit, sub-tasks were a global feature (i.e. once enabled they were enabled for all projects). This commit gives the ability to enable/disable sub-tasks per project. 2/ Make project_id on planning required 3/ Change default rating status on new projects 4/ Default value for allow_subtasks 5/ Enable timesheets on existing projects 6/ Hide Total Hours if subtasks are disabled 7/ Create project in the company context. Otherwise some records generation could use a default company which is not the company for which we want to create a project. 8/ Default value for allow_forecast, is_fsm 9/ Change reference to timesheet product 10/ Fix tracback on industry_fsm_report. Before this commit, there was a traceback when enabling "Worksheets" (industry_fsm_report) after "Time and Material" (industry_fsm_sale). 11/ Convert some onchange method into computed editable stored fields closes odoo/odoo#41218 Taskid: 2146474 Related: odoo/enterprise#6998 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> Co-authored-by: Yannick Tivisse <yti@odoo.com>
2020-01-28[IMP] *: use ast.literal_evalMartin Trigaux
When simply need to parse a domain, it is easier Add .strip() on ir.ui.view as ast.literal_eval produces an syntax error if the node starts with spaces (as done in the xpath of hr_attendance.view_employee_form_inherit_hr_attendance) closes odoo/odoo#43831 Related: odoo/enterprise#7894 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-15[MERGE] project, hr_expense: Fix several multi-company issues + testsfw-bot
Purpose Fix multi-company access issues following the big changes that happened (the 13.0). Make the usability better in order to avoid potential multi-company issues for the user. Specification Check the related commits to see the different fixes that have been made. For more information about the technical/functional considerations, check the related task. Taskid: 2088891 X-original-commit: 5c8df3a5e5f7960e5eab6439e0a32a06224ba826
2020-01-14[IMP] project: Following a private project no longer requiredLucas Lefèvre
======= Purpose ======= Currently for a user to be allowed to see a private project they must follow the project. This means that they will be added as a follower of all new tasks in the project which causes them to receive 1000000 notifications, especially if there are a lot of tasks in a project. ============== Specifications ============== 1) Add an Employee m2m field on project next to 'Invited Employees' - only visible if the 'Invited Employees' option is selected - the project should only be visible to employees selected there (regardless if they are followers or not) 2) Add an Employee m2m field on tasks below the 'Email cc' one in debug mode - only visible if the 'Invited Employees' option is selected on the related project - should be pre-filled with what is set on the project - the task should be visible to employees selected there (regardless if they are followers or not) 3) Add a Portal users m2m field on project next to 'Portal users and all employees' - only visible if the 'Portal users and all employees' option is selected - the project should only be visible to portal users selected there (regardless if they are followers or not) - rename the option into 'Invited portal users and all employees' 4) Add a Portal users m2m field on tasks below the 'Email cc' one in debug mode - only visible if the 'Portal users and all employees' option is selected - should be pre-filled with what is set on the project - the task should be visible to portal users selected there (regardless if they are followers or not) 5) Following a project/task should not grant the user/employee the ability to see the project/task Task 2031527 closes odoo/odoo#40505 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>