Commit Graph
13 Commits
Author SHA1 Message Date
Thibault Delavallée 626557147c [REF] various: remove duplicated sms helper tools
RATIONALE

Simplify field management for mail / phone / sms flows. Make it working out
of the box, easier to use and tweak.

SPECIFICATIONS

Simplify model custom code when dealing with phone and sms by using helpers
and standard behavior defined on all models.

'_sms_get_partner_fields' was introduced at odoo/odoo@bdebcab0ce to have a generic
implementation of finding partners on a record. Since then another version
has been added directly in 'mail' module, using '_mail_get_partners'.

'_sms_get_number_fields' was introduced at the same time to have a generic
implementation of finding numbers on a record. Since then a generic and
improved version has been added directly in 'phone_validation' module, see
'_phone_get_number_fields'.

Those method can therefore be removed, and replaced by the generic ones
available on BaseModel.

Task-3422449 (Mail, Phone: Move and improve field helpers)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130468
2023-08-02 18:50:17 +02:00
Thibault Delavallée baf20910a2 [IMP] phone_validation: improve default phone fields heuristic
RATIONALE

Simplify field management for mail / phone / sms flows. Make it working out
of the box, easier to use and tweak.

SPECIFICATIONS

Support by default 'phone' and 'mobile' fields if present on model as phone
fields to fetch when searching for a number. This allows to remove several
of unnecessary overrides always doing the same thing.

Task-3422449 (Mail, Phone: Move and improve field helpers)

Part-of: odoo/odoo#130468
2023-08-02 18:50:16 +02:00
Eteil Djoumatchoua(etdj) d1da2928e9 [FIX] stock: number field for stock picking record
The ``stock.picking`` record doesn't have a 'mobile' or a 'phone'
field which can be used by ``sms.composer``,thus we need to return
the ``partner_id`` field instead.

opw-3286153

closes odoo/odoo#123716

X-original-commit: 35311aecef034402eac76e60acdc2658b9c681cf
Signed-off-by: Djoumatchoua Eteil Junior (etdj) <etdj@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-12 10:02:23 +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
Christophe Monniez 65c8814a2f [FIX] various: replace deprecated currentThread method
CurrentThread is now really deprecated in Python 3.10 ... Time to
change.

Part-of: odoo/odoo#91927
2022-05-23 08:29:52 +02:00
Nicolas Martinelli 77773fddf9 [FIX] point_of_sale, stock_sms: do not send mail and SMS
Complement of PR #50720 to aovid sending email as well.

opw-2250185

closes odoo/odoo#50814

closes odoo/odoo#51042

X-original-commit: 64ef9d74753ddf532cb4fc3d9769cd4913a2d9d7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-11 13:40:33 +00:00
Nicolas Martinelli 8e493f3f3d [FIX] stock_sms: SMS for picking from POS
Avoid sending an SMS for picking created from the POS. We usually don't
want to send an SMS if the customer just bought the product in the
physical shop.

This is more a workaround than a real fix, since the only field that
can be used to distinghish the pickings is the picking type. A better
solution would probably be to set the SMS sending configuration at the
picking type level.

opw-2250185

closes odoo/odoo#50768

X-original-commit: 58492733b81073694a7e2f5e790b31983f91df7d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-06 14:04:37 +00:00
jbm-odoo 620730ed70 [IMP] stock: Add context key to avoid send sms
In stock, before sending an sms, we check if there aren't the key
'skip_sms' in the context. It is useful, for example, in fsm
application.

TaskID: 2081191
2020-02-03 13:11:58 +00:00
jbm-odoo 576b26a974 [FIX] stock_sms: Fix read access sms_template
closes odoo/odoo#43775

X-original-commit: d21af3535298f3a93ee2a08eb0fe8587d9d994ca
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-22 14:48:04 +00:00
Simon Lejeune 6ab4b0d496 [REF] stock: make picking button_validate multi
So we have to adapt
- the sanity checks
- the immediate/backorder wizards
- split the call to _action_done with and without backorder

This is a preliminary work to remove all the override in
stock_picking_batch and to allow choosing the pickings to immediate or
backorder directly in the wizards.

Before this commit, both wizards were calling _action_done and one
another. We make them go back through `button_validate` so that it is
more sane to handle and allow future extensions to add pre-action done
wizards.

Also the first part of button_validate is some sanity check. We adapt
them to be multi (inside of a loop over self) without any other
changes.

Now the wizard can work on the records (immediate: write the done
quantities) or work with the context (backorder: picking ids to not
backorder in the context).

Also we adapt the stock sms weird wizard (a confirmation wizard but the
feature is auto installed? wth). Now there it isn't manually called in
the middle of button_validate but it uses the pre_action_done_hook.

task-2069646
2019-10-25 08:10:40 +00:00
Pierre Rousseau 333f1087cf [FIX] stock_sms: do not send mail notifications
The aim of this commit is to remove the mail notifications when there is no more credits on IAP accounts for SMS integration with stock.

Task-ID 2077783

closes odoo/odoo#37559

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2019-09-30 12:32:06 +00:00
jbm-odoo a5af052d67 [IMP] stock_sms: Fix non admin flow and improve first confirm box
Fix: A simple user is allowed to confirm sending sms wizard.
Improve SMS wizard: remove things about policiy and creation of
iap account.

closes odoo/odoo#37016

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-18 13:08:53 +00:00
jbm-odoo c230cfa0fe [ADD] stock_sms: Integration with stock pickings
The user can already send a confirmation email when the
Stock Picking is done. It'd be great to communicate the
same information by SMS.

In addition, the current mailing tool requires a manual
action. The idea is to automate the process via a
Setting instead.

id=1972567

closes odoo/odoo#35662

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-21 10:04:54 +00:00