Commit Graph
232 Commits
Author SHA1 Message Date
Martin Trigaux a74a648030 [IMP] *: use ast.literal_eval
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-28 13:58:05 +00:00
Debauche Stéphane 75f7ab0608 [FIX] web: fix email and phone widgets with empty value
When the value is empty in a related field, string of the element was
displaying "false" instead of an empty string which is not what we expect.
This commit fixes that issue.

Task ID 2119333
PR #40949
2020-01-28 09:14:43 +00:00
Lucas Perais (lpe) 9538245267 [IMP] *: adapt views for phone widget sms enabled default
Task 2123526

This commit adapts the views to take into account
that the phone widget enables sending an sms by default

*: crm, hr, sms, base
2020-01-27 09:31:53 +00:00
Lucas Perais (lpe) d41d627569 [IMP] web: field phone widget deals with SMS by default
Task 2123526

Before this task, the phone widget on char fields was not
displaying the send sms button by default

After this task, the default behavior of the phone
widget is to display the send sms button
2020-01-27 09:31:52 +00:00
Jason Van Malder ee8a30a19b [FIX] sms: fix context action not deleted when unlink template
Issue

    - Install Calendar
    - Technical > SMS templates > Calendar reminder > Add context action
    - Calendar > Tree view > meeting > action is there
    - Delete SMS template and/or uninstall calendar_sms

    Template deleted but action still there with a traceback
    when you click on it.

Cause

    The action is never deleted.

Solution

    Delete the action when the template is deleted.

OPW-2161653

Closes #42328

closes odoo/odoo#43984

X-original-commit: eb95f06f19c60babc775de57813a293ffc35c581
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-01-27 09:06:19 +00:00
Swapnesh Shah 32695d2747 [FIX] sms: do not add 'preview' action for SMS templates in dropdown menu
'Template Preview' action shouldn't be accessible through the action dropdown
as it is linked to a given template and accessible directly from the
template form view. Having it available in dropdown makes no sense.

closes odoo/odoo#42353

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-02 15:29:43 +00:00
Yenthe666 7876af3ad0 [IMP] *: set name on page elements
page is an element that is often used for xpath

closes odoo/odoo#41718

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 15:10:24 +00:00
Martin Trigaux b5db1c61ee [I18N] *: export saas-13.1 source terms
Without demo data, for the odoo-master transifex project

closes odoo/odoo#41935

X-original-commit: dab7670b73506fb3a835695ee3bd735e0c5e5c2b
Related: odoo/enterprise#7287
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 12:49:55 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Florimond Husquinet (fhu) 30cd679b81 [IMP] sms: allow to send SMS to oneself
Currently discuss post (through mail or sms) does not allow the author
to be notified of its content, as

  * he posted it and is therefore already updated;
  * it could create email loops;

However with SMS one could easily try to send SMS to himself using the
sms composer that is different from the mail composer. In that case
just use the ``mail_notify_author`` context key allowing to bypass the
"no author notification" rule.

Task ID 2091685
PR #40650

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-12-02 15:34:14 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
shivam shah 92cf2474a2 [IMP] base_automation,sms: Improve the interface of automated action
Below points are improved in automated action
- Set no_create on model_id, crud_model_id, partner_ids, and channel_ids
- Set widget many2many tags and change string for trigger_field_ids
- Rename 'Trigger Condition' to 'Trigger'
- Change on_change_fields into a many2many to ir.model.fields
- Set 'Hours' as default of field trg_date_range_time
- Rename label of crud_model_id to 'Target Model'
- Rename label of sms_mass_keep_log to 'Log as Note'
- On creation of template set the default model
- Hide the 'Security' tab
- Set no_create on fields resource_ref and col1
- Make 'value' readonly when col1 is not set
- Rename 'Link using field' to 'Link Field'

Task-2082503

closes odoo/odoo#39622

Closes: #39622
Related: odoo/enterprise#6515
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-11-26 07:35:34 +00:00
laa 72aa049844 [IMP] mail, mass_mailing: add dynamic placeholder mixin and use it in mailing and templates
PURPOSE

Upgrade the "mass_mailing" and "mass_mailing_sms" modules with a dynamic
placeholder generator as it already exists in "mail module" as depicted in
https://www.screencast.com/t/cnFA0gIY.

SPECIFICATIONS

As duplicated code already exists for that and that a third version of this
code has to be added, instead create a mixin for this dynamic placeholder
generator to avoid code duplication.

Thereby

  * a mail.render mixin for the dynamic placeholder generator must be
    created in mail;
  * dynamic placeholder generator code present in mail.template.py must be
    moved to that mixin and replaced by a simple inherit;
  * use the mixin in

    * mail templates: mail.template.py (mail module);
    * mass mailings: mailing.py (mass_mailing module);
    * sms templates: sms.template (mass_mailing_sms module);

In a near future, some code will be added in this mixin, notably the template
rendering that could be moved outside of mail.template core model and moved
in that rendering mixin.

LINKS

Task ID 2070612
PR #36722

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-07 16:19:37 +00:00
Thibault Delavallée fea0827153 [IMP] mail: add views for mail.notification model
Somehow having views could be necessary. Previously the only way to see
notifications was embedded inside mail.message views (notification_ids).

Task 2118599
PR #39460

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-07 12:21:33 +00:00
Adrian Torres 3da477dfc5 [FIX] *: adapt code to comply with new ondelete policy
The ondelete policy must be explicitly set for m2o fields whose inverse
is a reflection model (ir.*)
2019-11-07 08:39:17 +00:00
RomainLibert dfd25263f8 [FIX] sms: avoid cache miss in compute
We should always ensure to assign something in a compute method

Since sms_template_id is not required, we have to check that it is set
before trying to render the template

Also make sure to have a default value in case you don't have a res_id

closes odoo/odoo#38546

X-original-commit: b96bb2a00737339dc53ff06167c1a0cd424ad717
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-11 21:48:31 +00:00
RomainLibert e5f41040a1 [FIX] sms: avoid crashing when no res_model of res_ids
sms_composer could crash in case you didn't pass it the active_id,
active_ids context keys or don't call the default_get

In that case it would try to access `self.env[False]` which would crash
in the `_compute_recipients_count`

We also have to ensure that we have a default value for `self.res_ids`
because `literal_eval(False)` will crash

closes odoo/odoo#38545

X-original-commit: 7ed0bd258d8a744716101d89cfa0bdf0f7990fb5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-11 21:48:11 +00:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00
Martin Trigaux 42417956c0 [I18N] *: export 13.0 source terms
closes odoo/odoo#38028

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-07 07:55:34 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
fja-odoo 423402f1e5 [IMP] http_routing, *: move error pages to http_routing
* = portal, website, test_website, account, sms

Portal an Survey error pages were ugly default pages.
Now the error pages will be the same as the website ones.

Also fixing single module builds tests

task-2059969

closes odoo/odoo#35535

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-02 06:59:15 +00:00
Odoo Translation Bot 40deff7cbe [I18N] Update translation terms from Transifex 2019-10-01 21:21:46 +02:00
Benjamin Vray 6eaf5da98a [FIX] sms: avoid error when resending sms
avoid a traceback when resending a SMS
It was because arguments of the js function setSmsStatus
were undefined in this case

closes odoo/odoo#36907

Task-id: 2070836
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2019-10-01 11:45:27 +00:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
Martin Trigaux 6378c8fb25 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#37502

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-27 11:58:55 +00:00
Rémy Voet 8636fd8313 [FIX] sms: fix some usability issues
- In the portal chatter, when a message was send by sms and failed
the icon was grey. Change it to make it red when there is a failure
(revert by another task).

- In the sms composer wizard, if the sanitized number is wrong,
show 'Raoul Grosbedon (Invalid number)' instead of 'Raoul Grosbedon (False)'.

Task 2075733
2019-09-25 17:43:42 +00:00
Thibault Delavallée e875357b99 [FIX] sms: do not send sms already failed
Failed SMS should stay in error state and not be sent to IAP as we already
know it will fail. No pain, no gain.

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:14:09 +00:00
Thibault Delavallée 1a8530a178 [FIX] sms: allow system users to unlink sms templates
PURPOSE

Allow people to edit sms templates. Limit that rights to some main
application managers.

SPECIFICATIONS

SMS Template access rights
GROUP-------------R-W-C-D-Note
Internal User-----X
​​​Admin / Settings--X-X-X-X
Stock Manager-----X-X-X-stock.picking
Sales Manager-----X-X-X-crm.lead, res.partner
Event Manager-----X-X-X-event.registration
Sub Manager-------X-X-X-sale.subscription, res.partner
MarkAut Manager---X-X-X-no limit
Account Manager---X-X-X-res.partner (followup)

Other groups
  * Online Appointment NO TEMPLATE USED
  * Accounting Manager NO TEMPLATE USED
  * SMS Marketing NO TEMPLATE USED
  * Studio Automated Action Need Technical Settings Anyway
  * Scheduled Actions Need Technical Settings Anyway
  * Server Action Need Technical Settings Anyway

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:13:07 +00:00
Thibault Delavallée 48cc126137 [FIX] (mass_mailing_)sms: allow to directly send SMS in mass mode
PURPOSE

Sending SMS is sometimes required as an immediate marketing tool.
Using delayed crons is not always the best user choice. Implement a
Send Now mechanism in batch SMS.

SPECIFICATIONS

Allow to send directly SMS when doing SMS marketing

SMS Application
  * in sms composer, in mass mode: rename Send SMS to Put in queue and
    add a Send Now button by-passing the queue;
  * set Put in queue as primary, Send Now as secondary;

SMS Marketing Application
  * in mailing view for SMS: rename Send SMS to Put in queue and
    add a Send Now button by-passing the queue;
  * set Put in queue as primary, Send Now as secondary;

Tests of SMS marketing with 400 contacts to SMS indicates it takes about
10 seconds to be completed which is considered as ok.

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:12:59 +00:00
Thibault Delavallée 31aa195efa [FIX] sms: set correct value of batch when contacting IAP sms
Batch of 10 text messages was ok for testing. Production environment should
be able to handle more of them.

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:12:51 +00:00
Martin Trigaux c667e95224 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#37274

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-24 07:33:09 +00:00
sri-odoo 6d76501345 [REF] sms: redesign mail thread icon 2019-09-22 09:33:17 +00:00
sri-odoo ec9eadc352 [REF] sms: replace mail/systray fail icon
Use SVG format to improve rendering in HiDPI display while keeping tiny
the file size.
2019-09-22 09:33:17 +00:00
sri-odoo 59498db811 [REF] sms: redesign composer button 2019-09-22 08:21:33 +00:00
Odoo Translation Bot 974261f7e9 [I18N] Update translation terms from Transifex 2019-09-22 01:19:57 +02:00
Remy Voet 428da3d539 [FIX] sms: number is actually not really required
sms, in the form view of sms composer (mass composition) : we got a blocking
message when we validate the composer sms with records which doesn't have a
phone number.

However we generally explicitly handle void numbers: in composer in comment
mode there is an User Error, and mass mode has specific error code to put on
sms records telling number is void (and sms is in error, meaning it will not)
be sent.

As sms record is required notably for mass mailing traces and marketing
automation traces we have to keep sms records with void numbers. We therefore
remove the required attribute on sms record.

Task ID 2073016 (sms fixes)
PR #37185
2019-09-20 13:44:09 +00:00
ryv-odoo 7087e969ca [FIX] sms, mass_mailing : fix some glitches, perform YAB2B
Specifications

  * sms, in the form view of sms composer : the count of all record doesn't
    match the reality in a multi-company environment. The search_count was
    done is sudo, then records of other company was taken in account in the
    count. Fix by explicitly setting fields as computer_sudo=False;

  * mass_mailing, in the kanban view of mail marketing : A warning ribbon
    ("insufficient credit") appeared on the kanban item of mass mailing, but
    the message was for sms marketing views only. Change the attributes to be
    invisible for mail marketing;

  * mass_mailing, in the form view of mail mailing : Weird default domain
    filter ([0 = 1]) was display instead of an empty domain filter;

  * mass_mailing_sms, in the test sms wizard, remove a duplicate error message :
    When the number format was wrong a duplicate error message pop up. Fix by
    simplify the model and remove useless computed fields.

  * mass_mailing_sms, in the test sms wizard, rename the label "Number" to
    "Number(s)" to show that it can multiples ones.

Task ID 2073016 (sms fixes)
PR #37185
2019-09-20 13:44:09 +00:00
Odoo Translation Bot e80b81dca1 [I18N] Update translation terms from Transifex 2019-09-15 01:30:37 +02:00
Martin Trigaux 73e70673e7 [I18N] *: export saas-12.5 source terms
closes odoo/odoo#36853

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-13 11:38:37 +00:00
ryv-odoo 8e2da3b4d6 [IMP] (sms_)mass_mailing: improve interface
- Change the name of "Mass SMS" by "SMS Marketing"
- Improve the Mass Mailing views (kanban, form)
- Improve the Mass SMS views (kanban, search, form)
- Hide the sanitized numbers from views (sometime replace by mobile)
- Fix demo data of sms
- Explain the language field of sms template
- Improve the render of the sms composer wizard

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
ryv-odoo e4afa5d6d0 [IMP] sms: allow to create a sms context action
In the SMS template, we add the ability to create (and remove)
a contextual action on the targeted model from a sms template.
We change the sms composer to guess the composition mode,
and then to be usable by contextual action. The guess compostion mode
works differently if there are multiple target
selected (mass) or a single target (comment).

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
ryv-odoo 076e71cb5b [IMP] sms: allow to preview a sms template
Add a way for the user to preview sms content from a sms
template depending of a record (targeted model) and the
installed languages (as for the mail template). Add button
to open this preview on the form of the sms template.

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
ryv-odoo 8ef1543908 [FIX] sms - mass_mailing: fix some bugs
- Cancel button in the sms form view not related to a action :
When we click on the cancel button of the sms form view, get traceback.
Fix the issue by adding the cancel action in sms model.

- Mass mailing contact - False as the display name :
The display name was the mail address but when the contact didn't have
mail address a ugly False was print to described the contact (form view).
Then change the _rec_name to print the name as the display name.

- Fix SMS composer for the res.parnter tree
Only the first record was truely selected when open the sms composer
(mass) from the tree view of partner. Fix that by bind the actives_ids
in the context and also fix the names of related actions.

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
Martin Trigaux 68c753af55 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#36559

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-10 08:58:33 +00:00
Odoo Translation Bot 0d51520083 [I18N] Update translation terms from Transifex 2019-09-08 01:29:12 +02:00
Christophe Simonis 64e43808b7 [MERGE] forward port branch saas-12.5 up to 58a83d1222 2019-09-20 17:34:45 +02:00
Christophe Simonis 6c948c36bb [MERGE] forward port branch saas-12.5 up to 197474e5b9 2019-09-13 18:07:59 +02:00
Odoo Translation Bot 86809804f9 [I18N] Update translation terms from Transifex 2019-09-01 01:28:13 +02:00
Martin Trigaux b247aa3252 [I18N] *: export saas-12.5 source terms
That will be used a the basis for the future 13.0 version
Without demo data

closes odoo/odoo#36057

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-26 09:38:09 +00:00
Thibault Delavallée dfc8023b71 [REF] sms: make application auto install
Since the refactoring, SMS is no longer in auto install. This is a shame
because we want to put forward the SMS features. In any case, the user can
always disable SMS from the General Settings if it is too invasive.

FP / AJU request.

Task 2057705

closes odoo/odoo#35946

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-22 08:26:39 +00:00