36 Commits
Author SHA1 Message Date
lase@odoo.com 1ecd0b2160 [FIX] project_sms: Allow transition of task to state with SMS template
Steps to reproduce:

Be sure to have the `sale_sms` module installed.

- Connect as Marc Demo. Note: Marc has the administrator access rights
  in every service application including projects,...
- Go to the field service app create a new task and change its state to
  `planned`.

> Access error: you are not allowed to access 'SMS Templates'

Expected behavior:

Since the newly created user has the rights to modify the state of the
task and since he does not try to access the content of any sms.template
he should not raise this access error.

Cause of the issue:

The stage `planned` is associated with an SMS template. As such, when a
task is moved to this stage, an sms will be sent using the template.
This action is done during the `write` override of the `project_sms`
module:
https://github.com/odoo/odoo/blob/5f1a3bdcaa63492cf169f6f5f3eb2e2281ad5ab5/addons/project_sms/models/project_task.py#L24-L32
However, this `_send_sms` method will need to 'read' the sms.template to
generate the sms:
https://github.com/odoo/odoo/blob/e6be732450d9ef662a48ba074e1ca1ad32e35c04/addons/sms/models/mail_thread.py#L191-L192
Since the user does not have the acess rights to 'read' this template
because of the `ir_rule_sms_template_so_sale_manager` access rule
defined in the `sale_sms` module, the access error will be raised.

Fix:

Since the `_send_sms` method will only read records in order to generate
the sms that will be send, we should bypass access rigths checks during
the call of this method.

Note: this was already the solution used for portal users.

opw-3789197

closes odoo/odoo#163525

X-original-commit: b5b63509a6bc4467cf84cd15ebdf3b4b0601aeb0
Signed-off-by: Lancelot Semal (lase) <lase@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2024-04-29 08:07:28 +00:00
Odoo Translation Bot b31ea21cab [I18N] Update translation terms from Transifex 2024-04-28 00:10:20 +02:00
Odoo Translation Bot 3275156773 [I18N] Update translation terms from Transifex 2024-04-14 00:09:33 +02:00
Odoo Translation Bot 1b9fd01d46 [I18N] Update translation terms from Transifex 2024-03-10 00:13:03 +01:00
Odoo Translation Bot cb45934163 [I18N] Update translation terms from Transifex 2024-03-03 00:09:56 +01:00
Odoo Translation Bot dd40867949 [I18N] Update translation terms from Transifex 2024-02-11 00:14:17 +01:00
Tiffany Chang (tic) 94c58407f6 [I18N] *: add in Russian translations
For a first iteration, Russian translations were done using DeepL using
1 large .pot file of all the standard modules to translate (e.g. no
localizations, no test modules, etc). Unfortunately for some reason
doing a msgmerge with the existing ru.po files didn't seem to work, so
old "Translators" metadata at top of files were lost (maybe they will be
re-added during next Transifex sync?)

Part-of: odoo/odoo#152285
2024-02-06 18:49:02 +00:00
Odoo Translation Bot c95419af44 [I18N] Update translation terms from Transifex 2024-02-04 00:11:05 +01:00
Odoo Translation Bot 625dac5a10 [I18N] Update translation terms from Transifex 2024-01-28 00:16:34 +01:00
Odoo Translation Bot ad35458e8b [I18N] Update translation terms from Transifex 2023-12-31 00:18:24 +01:00
Odoo Translation Bot 50e8e08183 [I18N] Update translation terms from Transifex 2023-12-24 00:18:24 +01:00
Odoo Translation Bot 304a6caa14 [I18N] Update translation terms from Transifex 2023-12-17 00:08:26 +01:00
Odoo Translation Bot 2ac98dc2e5 [I18N] Update translation terms from Transifex 2023-12-03 00:18:54 +01:00
Odoo Translation Bot 3ffba892de [I18N] Update translation terms from Transifex 2023-11-26 00:20:02 +01:00
Odoo Translation Bot f6fe982853 [I18N] Update translation terms from Transifex 2023-11-19 00:28:08 +01:00
Odoo Translation Bot 5d2bc9e9b3 [I18N] Update translation terms from Transifex 2023-11-05 00:21:55 +01:00
Odoo Translation Bot 6739c317d1 [I18N] Update translation terms from Transifex 2023-10-29 00:07:17 +02:00
Hugo Carlier (Huca) 2236e5c97c [REF] project, project_todo: refactor personal stages
Personal stages of project.stage records are based on two main field:
- personal_stage_type_ids: the list of all personal stages linked to a
  task (M2M)
- personal_stage_type_id: a computed field (not stored) indicating the
  personal stage of a task for the current user.

When reading a set of project.task records grouped by personal stages,
two options are possible:
- Group the records by personal_stage_type_id (approach used in former
app Notes): in which case the read_group method has to ne rewritten as
it can be used on a non-stored field.
- Group the records by personal_stage_type_ids (approach used in app
Project) in which case, the kanban view has to be overriden to be able
to drag and drop a task between personal stages (which is not possible
by default, when grouping according to a M2M field).

The main evolution proposed by this refactor is to use an hybrid
approach that would:
1. Group the project.task records by personal_stage_type_id
2. Use the read_group with groupby set to 'personal_stage_type_ids' as
this should give the same result.

This would allow to:
- Avoid a complex and costly (performance wise) read_group override
- Avoid an override of the kanban view that is costly to maintain
- Simplify the implementation (and thus readability) of personal stage
management (among which, removal of the model
project.task.stage.personal).

task-3345132

Part-of: odoo/odoo#140050
2023-10-27 14:22:12 +00:00
Louis (wil) 3f6f949fa5 [I18N] export sources
closes odoo/odoo#140002

Related: odoo/enterprise#49687
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-10-27 08:36:16 +00:00
adjo-odoo 1ebc6c0044 [IMP] project(_sms),rating,hr_timesheet: improve the UI for project
The purpose of this PR is to improve the generic usage of the project app.

So in this PR done following changes:
 - In reporting > tasks analysis measures:
   - removed the # of tasks and average rating measures
   - Changed rating value (/5) to rating (/5)
 - In task analysis reporting formatted overtime as hh: mm
 - In the project  burndown chart added tip to action helper
 - In project.task search view > quick searches:
   - changed sale order to sales order
   - under the SO one, a 'sales order item' has been added to the quick search
 - Added many2one_avatar_employee widget in project sharing-> timesheets notebook
 - In project.project form view > share editable added text in muted
 - Added tip in the project.project form view > invoicing notebook under
   employee/SOL o2m
 - A placeholder has been added to the rating email template field in the project
   task stages: 'Task: Rating Request'
 - now rating submission page is editable
 - In task stages list view :
   - moved the project field on the right of the name
    - switched the 'SMS template' and 'email template' fields from the place
 - In project.task > recurrence notebook:
   - moved the 'next tasks' list to the right of the recurrence
      configuration fields
 - In project.task > sub-tasks notebook > optional fields >
   renamed 'initially planned hours' into 'allocated hours'
 - In project.task portal form view: renamed
   'history' into 'Message and communication history'
 - Added 'open' filter in my tasks menu search view
 - Added 'schedule an activity' status in the kanban activity widget

task-2903637

closes odoo/odoo#95971

Related: odoo/enterprise#29467
Related: odoo/upgrade#4095
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-16 16:04:09 +02:00
Hansun (hale) 7618380c46 [FIX] project_sms: fix sms failure
1. Install Contacts, Projects
2. Settings - Register account for SMS
3. Add the account with credit for IAP service with debug mode on
4. Create a Contact with mobile number and country from step 2
5. Go to Projects
- create a project and stages
- create SMS templates under Configuration
- under Task Stages, add sms template to each stages of the project
- on the task created, set the customer to what you created on step 3
- move the task from a stage to another

Issue:
- Lognote shows failed state when it is sent successfully
- On Settings/Technical/Discuss/Messages, record is duplicated

Resolve by:
- partiallly revert commit https://github.com/odoo/odoo/commit/5de1b941ce580253a21f0e4f6da0a8ca818f26b3

opw-3251410

closes odoo/odoo#118391

X-original-commit: c1a7e3c20244f45d49496db7d506bbf0fd96472a
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-13 05:07:55 +02:00
Audric Onockx (auon) 4b3a8b4f7a [FIX] project_sms: send sms, but for real
`/project_sms:ProjectTask._send_sms` called `_message_sms_with_template`
without numbers, and so no sms was sent.
Now, we give the method an `sms_numbers` arg, and it works.

closes odoo/odoo#116514

X-original-commit: 5de1b941ce580253a21f0e4f6da0a8ca818f26b3
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-25 18:58:00 +01:00
Audric Onockx (auon) fb59fa279a [MOV] project_{mrp,purchase,sms,hr_expense}: update files per model
In previous commit, we just copy/move the files.
In this commit, delete the part of each file
that is not related to its model, and some style.

task-3244226

closes odoo/odoo#116165

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-22 17:03:46 +01:00
Audric Onockx (auon) 978037a74b [MOV] project_{mrp,purchase,sms,hr_expense}: copy/move files per model
In this commit, we just copy/move the files.
In next commit, delete the part of each file
that is not related to its model.

task-3244226

Part-of: odoo/odoo#116165
2023-03-22 17:03:46 +01:00
Barad Mahendra 6b82a26803 [IMP] project: add form view to Send SMS Text Message action
task-3000758

closes odoo/odoo#102768

X-original-commit: 89f920b112e0b9e87ceed329becb6838788f4c11
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-08 13:30:24 +02:00
Martin Trigaux 5150d003fd [I18N] *: export 16.0 source terms
closes odoo/odoo#101053

X-original-commit: 7d4c9d9736cc2ff0ee91dc17ea0f952c9a3dc65a
Related: odoo/enterprise#31752
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-24 15:00:56 +02:00
Vishal Padhiyar 812644b120 [IMP] *.*: update the tooltips in various modules
The goal of this task is to review the copywriting of the tooltips
because some of them are not correct in English and others are not
valid anymore. This is also a good opportunity to make an inventory
of the tooltips we have and to add some that could be missing.

task-2862283

closes odoo/odoo#93261

Related: odoo/enterprise#28225
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-20 16:29:13 +02:00
Martin Trigaux 1a8772769e [I18N] *: export 16.0 source terms
closes odoo/odoo#100573

Related: odoo/enterprise#31507
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-20 13:48:49 +02:00
Adesh Jolhe (adjo) 854260f436 [IMP] project,sale,hr(_timesheet): generic improvements for project
Purpose of this PR to improve generic usage of project app.

So, in this PR done following changes:

- In project.project form view :
  - Added name label above name field
  - Changed placeholder name of field to 'e.g. Office Party'
- in project_project_view_form_simplified:
   - displayed name as Title
   -  renamed 'create' into 'create project'
- in project.task form view > extra info notebook :
   - added the 'personal stage' field (Only visible in debug mode)
- in project.project form view:
   - based timesheet encoding unit set the 'cost' field name to Daily cost
     if uom in Days or In Hourly cost if uom in Hours
-  configuration > projects: if possible, clicking on a project kanban card
   will be open its form view

task-2821488

closes odoo/odoo#90588

Related: odoo/enterprise#26977
Related: odoo/upgrade#3492
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-05 14:49:49 +02:00
Xavier BOL (xbo) 1b6af2addb [FIX] project_sms: cannot change task stage to stage with sms template
Before this commit when the portal user changes the stage of a task
to a stage with sms template, he got a traceback saying he has no access
to the `sms.template` model.

This commit fixes by checking if the user is a portal one to send the
sms in sudo when the write on the task is correctly done.

Steps to reproduce:
==================
1) install `project_sms` module,
2) create a project,
3) in the kanban of tasks for this project create 2 stages,
4) edit the last one to set a sms template,
5) share the project in edit mode to a portal user,
6) create a task with the quick create,
7) log in as portal user and go the project shared
8) move the task into the last stage.

Actual Behavior:
---------------
A traceback is occurred saying the portal user has no access to
`sms.template` model.

Expected behavior:
-----------------
The task should be in the last stage and the sms should be sent.

closes odoo/odoo#99363

X-original-commit: 9aa5e65273885001106a5fcc64677a284b77f61d
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-01 06:46:55 +02:00
Fabien Pinckaers 3363e55cac [IMP] cleanup of help messages in all modules
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
   fields having a tooltip in the future UI.
4/ some cleanup of existing messages too

The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX

closes odoo/odoo#97279

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-08-02 00:26:53 +02:00
Adesh Jolhe (adjo) 8f192a9b57 [IMP] project(_sms),hr_timesheet: generic improvements for project
Purpose of this PR to improve generic UI of project app.

So, in this PR done following changes:
  - Added group by assigned to under reporting -> customer ratings
  - In quick search, changed "rated rated" operator to "assigned to" under
    project.project search view
  - Removed rating_status field from project > configuration > settings > customer
    ratings
  - Switched the 'timesheets' and 'planning' features from place from
    project > configuration > settings
  - In project.task  extra info notebook:
     - Added the 'parent task' field above the 'analytic account' field
     - Added the 'company' field above the 'sequence' field
  - Added send mail and sms action in project.project and project.task
    list view.

task-2806292

closes odoo/odoo#88446

Related: odoo/upgrade#3459
Related: odoo/enterprise#26207
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-20 12:16:04 +02:00
Vincent Larcin 483a4358a8 [IMP] project: move rating warning in task stage form view
This commit moves the 'Customer Ratings' warning to be right under the
Rating Email Template field in the task stages settings view.

It also slightly reorders other fields and fixes a typo.

Task-2741733

Part-of: odoo/odoo#86008
2022-05-05 15:14:33 +02:00
Victor Feyens 42bad1a6d2 [IMP] *: remove useless keys from manifests
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, ...

closes odoo/odoo#90209

Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-03 13:31:16 +02:00
Martin Trigaux 158b537c28 [I18N] *: export saas-15.2 source terms
closes odoo/odoo#89225

X-original-commit: 5925a83d87fa4702f4c0f22346304dc2da47c728
Related: odoo/enterprise#26435
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-04-23 08:33:43 +02:00
Prakash Prajapati 4525d65ad7 [IMP] project_sms: send sms at stage change of project and task
The purpose of this commit is to include SMS templates. Templates allow people to
customize the content of sent SMS. When the project/task stage changes, the user will
be notified and there will be a track in the chatter.

- add this field on the right of the 'email template' one in list view.
optional and hidden by default.
- add it below the 'name' quick search in the search view.

task-2683575

closes odoo/odoo#81311

Related: odoo/enterprise#22853
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-03-12 08:18:10 +00:00