Commit Graph
128780 Commits
Author SHA1 Message Date
Thibault Delavallée e7cd604afa [IMP] sms: add a is_mail_thread_sms field allowing to filter models
PURPOSE

SMS are a powerful marketing tool. For instance it is perfect to announce a
sale or to communicate a coupon code, to welcome a new customer in a fidelity
program, ...

Purpose of this task is to integrate SMS sending in batch in mass mailing. It
will use same mailing objects but sending SMS instead of emails. Some metrics
and flows will have to be slightly updated at the same time.

SPECIFICATIONS

Limit use of templates to models that are really capable of sending
SMS. Templates are now available on models that inherit from mail.thread
and effectively have fields used in SMS sending.

Technically this is done through a not stored field on ir.model that is
searchable. SMS sending capabilities is based on

  * having fields holding phone numbers, as defined on mail.thread in SMS;
  * having fields holding partners, as defined on mail.thread in SMS;

This implied some code rewriting notably about finding default SMS
recipients on a given model, in order to have fields instead of directly
returning partners.

LINKS

Task 1997464
PR #34424
Original SMS addition: Task 1922163 (4287481)
2019-08-12 12:00:22 +00:00
Thibault Delavallée 5450415354 [REF] sms: improve onboarding and user experience of SMS composer
PURPOSE

SMS are a powerful marketing tool. For instance it is perfect to announce a
sale or to communicate a coupon code, to welcome a new customer in a fidelity
program, ...

Purpose of this task is to integrate SMS sending in batch in mass mailing. It
will use same mailing objects but sending SMS instead of emails. Some metrics
and flows will have to be slightly updated at the same time.

SPECIFICATIONS

Clean the use and options of sms composer after FP feedback :

  * see https://s.nimbusweb.me/share/3167586/ap1xpy95rz29a5cys576 as basis;
  * globally, do not display invalid recipients, only valid / invalid count
    as well as current selection / active domain counts;
  * consider logging a note as default behavior when using the composer;
  * simplify code: when doing a mass SMS, send SMS and attach a simple note
    to the document;

Some other points

  * make name of sms templates translatable;
  * improve various wording, notably in sms widget;
  * display error code in sms list view;
  * update sms composer actions accordingly by correctly setting active id
    or ids;

LINKS

Task 1997464
PR #34424
Original SMS addition: Task 1922163 (4287481)
2019-08-12 12:00:22 +00:00
Thibault Delavallée 9bd9cbf532 [IMP] mail: allow message creation in batch
PURPOSE

Allow quick message creation by allowing create multi on mail.message.
Also introduce a new helper tool method to log in batch on records.

SPECIFICATIONS

Purpose of this commit is to add a way to log notes in batch on a document.
Those notes are logged without any notification mechanism, allowing to
attach a note in as few queries as possible.

This is implemented by

  * allowing create multi on mail.message. Nothing changes in its behavior
    except that it is not working on a list of dictionaries;
  * adding a ``_message_log_batch`` tool method allowing to post a batch
    of notes on records;
  * adding a tool method to correctly find author / email_from, to be used
    in various message_post / log / notify methods in order to have the
    same behavior in all those methods;

Logging in batch will soon be used in SMS when attaching a note to sent
SMS without having extra notifications. This will be used notably when
performing mass SMS without using the standard notification mechanism.

LINKS

Task 1997464
PR #34424
Original SMS addition: Task 1922163 (4287481)
2019-08-12 12:00:22 +00:00
Thibault Delavallée 5d1f08a012 [IMP] sms: integrate duplicate / blacklist into composer in batch mode
PURPOSE

SMS are a powerful marketing tool. For instance it is perfect to announce a
sale or to communicate a coupon code, to welcome a new customer in a fidelity
program, ...

Purpose of this task is to integrate SMS sending in batch in mass mailing. It
will use same mailing objects but sending SMS instead of emails. Some metrics
and flows will have to be slightly updated at the same time.

SPECIFICATIONS

Purpose of this commit is to support blacklisted and already-done numbers
when sending SMS.

  * blacklist support: necessary to avoid sending SMS in batch to people that
    asked to stop being spammed;
  * already-done support: when performing mailing in batch or doing A/B testing
    we may have already-done SMS;

When sending SMS in batch, already update state and error code of SMS that
should not be sent

  * blacklisted number: set to canceled, with blacklist error code;
  * duplicated number: set to canceled, with duplicated error code;
  * invalid number (cannot sanitize): set to error, with either missing number
    if void or wrong format if not void;

Support of blacklist / duplicated / invalid will notably be used when
performing SMS marketing (mass SMS) and marketing automation using mass
SMS.

LINKS

Task 1997464
PR #34424
Original SMS addition: Task 1922163 (4287481)
2019-08-12 12:00:22 +00:00
Thibault Delavallée 7e8a02cd6e [IMP] phone_validation: add blacklist mechanism
PURPOSE

SMS are a powerful marketing tool. For instance it is perfect to announce a
sale or to communicate a coupon code, to welcome a new customer in a fidelity
program, ...

Purpose of this task is to integrate SMS sending in batch in mass mailing. It
will use same mailing objects but sending SMS instead of emails. Some metrics
and flows will have to be slightly updated at the same time.

SPECIFICATIONS

Purpose of this commit is to add a blacklist mechanism for phone numbers
used to send SMS like what already exists for email addresses when sending
emails.

Define a new phone.blacklist model, holding a number and the state of the
blacklist (active field), as well as tools methods to access it. Make it
as private as possible, accessing it in sudo once access are granted.

Also clean phone validation tools: lessen number of tool functions and update
caller to simplify code readability. Some fixes are also included in this
commit, notably blank spaces cleaning in phone numbers.

Improve phone.validation.mixin to add a tool method computing a sanitized
number, in addition to formatting it to national / international.

Define a new mail.thread.phone mixin computing the blacklist status of a
record. This mixin

  * inherit from phone.validation.mixin in order to have access to some
    base phone number parsing capabilities;
  * computes a sanitized phone number based on ´´_phone_get_number_fields´´.
    It takes first sanitized value, trying each field returned by the
    method. That means one sanitized phone number is available per record
    even if several fields are available;
  * compute blacklist state of records. It is based on phone.blacklist
    model and give an easy-to-use field and API to manipulate blacklisted
    records;
  * give some API methods :

    * ``_phone_set_blacklisted``: set recordset as blacklisted;
    * ``_phone_reset_blacklisted``: reactivate recordset (even if not blacklisted
        this method can be called safely);

Put menus in technical in order to have access to it. Add a Phone / SMS
menu below "Email" and use it to store SMS / Phone actions.

Finally prepare tests addition by performing some light cleaning while adding
blacklist tests. Purpose is to ease future tests related to SMS.

LINKS

Task 1997464
PR #34424
Original SMS addition: Task 1922163 (4287481)
2019-08-12 12:00:22 +00:00
Kishan Gajjar 22b598bc1b [IMP] web: export improvements
* remove center buttons, corresponding features either moved to fields
list (handle / bin on exported, etc...) or removed
entirely (e.g. clear)
* replace XLS to XLSX format, increases rows# to 1048579
* add FAYT filtering of available fields
* sort available fields alphabetically (CI) always
* change export templates UI: remove buttons

TaskID: 1910953

closes odoo/odoo#32339

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-08-12 13:38:31 +00:00
jbm-odoo b6193a6b8d [IMP] Res_partner: Improve res.partner form UX (back2basics)
- Clean form view
- Add a new widget to check if IBAN account number is correct
- On the res.partner model, default value for "is a company" is True.

TaskID: 2025362

closes odoo/odoo#34691

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-12 12:07:53 +00:00
Wolfgang Taferner f20a8285f3 [FIX] account: extend the scope of the template tax too for the usage
closes odoo/odoo#35622

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-11 17:12:46 +00:00
Kevin Baptiste 0f15adb304 [IMP] hr: improve employee profile
closes odoo/odoo#34931

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-12 11:26:09 +00:00
Kaushalya Mandaliya 9b9780e17b [IMP] web: show avatar correctly even when rectangle image is used
Before this commit,
In top-right corner, the avatar that is being shown doesn't correctly
look like a circle if the shape of the avatar is rectangle.

After this commit,
The avatar appears in the top-right corner will be shown in correct circle
shape, irrelevant of the image is square or not.

task-2042276
closes: #35265

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-05 10:26:07 +00:00
Kaushalya Mandaliya bf2b11a232 [IMP] web: image field control buttons layout issue
image widget control button icon(Edit and Delete) not displayed in one line
button tag is used for control buttons and button tag has default padding
so removed default padding added by browser by explicitly defining padding 4px

task-2042276
closes: #35265
2019-08-05 10:15:01 +00:00
Kevin Baptiste f23cc14d13 [IMP] purchase: improve usability (back2basics)
TaskID: 2040826

closes odoo/odoo#35394

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-06 13:05:32 +00:00
Pierre Masereel 7c5b4cbc03 [IMP] point_of_sale: customer display computation
Since the POS customer display is not anymore a stored field, we don't
need to keep this override of write and create.

closes odoo/odoo#35638

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-12 09:03:49 +00:00
Pierre Masereel f2477cf875 [IMP] point_of_sale: avoid writing on pos config when session open
When a session is opened on a POS config, we don't want to let users
editing the pos config as modifying journals, payment method,
pricelists,... Could lead to inconsistancies between what has been
encoded on the pos orders and what are the available values on pos
config.

Before this commit, it wasn't taking into account the rescue sessions,
only the normal ones.
2019-08-12 09:03:49 +00:00
Martin Trigaux 98cc300cec [IMP] tools: ignore line number for code translations
The line number was only indicative and was not used by the system.
When the translations source were updated, a big part of the diff was
only about the line numbers.
Ignore the given res_id value and export the line at 0

When reading the po file, the res_id from the file is still read and
stored in database but should be ignored

closes odoo/odoo#35582

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-09 07:59:56 +00:00
Joseph Caburnay 8becb17b8a [TEST] point_of_sale: create one account move by session
We've adapted the tests to work with the new implementation
of payments and session closure. And we've added some new
ones to have a better coverage on point_of_sale module.

TASK-ID: 1862388

closes odoo/odoo#33578

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-09 14:45:44 +00:00
Joseph Caburnay b234e97f87 [IMP] point_of_sale: create one account move by session
Main goal of this task is to create single accounting entry
(AE) when closing a pos.session instead of individual AE for
each order in the session.

This significantly minimizes the number of created journal
entries by point_of_sale which also results to faster closing
of session when there is large numbers (order of thousands)
of orders. It also eases the reconciliation of payments because
on one hand, cash payments are automatically reconciled and on
the other, other payments are combine in a receivable line
based on the payment method.

**Important points to note**

1. Two new models (pos.payment.method and pos.payment) are
introduced replacing the functionalities of account.journal
(and account.bank.statement) and
account.bank.statement.line, which served before as payment
methods and payments.

2. The creation of single AE relies on the receivable_account_id
defined in each pos.payment.method. This receivable_account_id
is supposed to be different from the account module's receivable
account, thus, a new receivable account for pos is introduced
in each localization.

3. A simple example below can illustrate this change.

Given the following orders:

    +---------+----------+----------+-----+-------+-------+
    | order   | payments | product  | qty | price | total |
    +---------+----------+----------+-----+-------+-------+
    | order 1 | cash     | product1 |  10 |    10 |   100 |
    |         |          | product2 |   5 |    20 |   100 |
    +---------+----------+----------+-----+-------+-------+
    | order 2 | bank     | product2 |   7 |    20 |   140 |
    |         |          | product3 |   1 |    30 |    30 |
    +---------+----------+----------+-----+-------+-------+
    | order 3 | bank     | product1 |   1 |    10 |    10 |
    |         |          | product2 |   3 |    20 |    60 |
    |         |          | product3 |   5 |    30 |   150 |
    +---------+----------+----------+-----+-------+-------+

Instead of generating 3 accounting entries, a single
accounting entry (linked to the pos.session) will be created.
This accounting entry will have the following lines:

    +---------------------+---------+------------+
    | account             | balance | reconciled |
    +---------------------+---------+------------+
    | sale                |    -590 |    -       |
    | pos receivable cash |     200 |    yes     |
    | pos receivable bank |     390 |    no      |
    +---------------------+---------+------------+
    | Total balance       |     0.0 |            |
    +---------------------+---------+------------+

Note that the cash receivable line is already reconciled
because it can assumed that the payment is already received.
The unreconciled receivable line can be reconciled manually
using the reconciliation widget.

More examples can be seen in the tests.

TASK-ID: 1862388
2019-08-09 13:57:11 +00:00
Joseph Caburnay 536560bbf5 [IMP] l10n_*: add new receivable account for pos
A new feature[*] in point_of_sale (PoS) which minimizes the
creation of account.move records in closing a pos.session relies
on a receivable account made specifically for PoS.

This commit addresses this feature's requirement by adding a
new receivable account to each localization.

[*] point_of_sale: single AE for a pos.session

TASK-ID: 1862388
2019-08-09 13:57:10 +00:00
Robin Heinz af91527929 [IMP] delivery: Hide generate return label
Now we hide the generate return label if this option is not available for the current carrier.
Before this fix, we could set the field to true even if the option was not available for this particular carrier.

Task-Id: 1956970

closes odoo/odoo#35178

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-09 15:31:26 +00:00
Robot Odoo 912f6cb23d [MERGE][REF] mail: improve routing and bounce / blacklist management
PURPOSE

Add some improvements in mail gateway: remove private discussion, improve
bounce management, allow resetting bounce counters, improve automatic set or
reset of blacklists and ease mass mailing inheritance.

MAIN SPECIFICATIONS

Remove private discussion support in mail gateway. It is not really supported
since several versions. This merge removes remaining code in gateway.

Perform all incoming email parsing in message_parse and its sub methods. That
way future processing can use parsed values instead of re-doing parsing of
required information.

Add ``_message_parse_extract_bounce`` parsing sub method to parse bounce
information and use it in mass mailing.

Add ``_routing_handle_bounce``: handle bounced emails by notably updating
the bounce counter on blacklist records.

Add ``_routing_reset_bounce``: handle valid incoming emails by notably
resetting bounce information on that specific email.

Have ``_message_receive_bounce`` and ``_message_reset_bounce`` being
void in mail.thread and updating reset counter in blacklist enabled records.

Update blacklist / unblacklist in mass mailing, take into account traces and
partner information.

Add tests.

See sub commits for more details and explanation.

LINKS

See task 1893155

closes odoo/odoo#35284

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-09 17:25:16 +02:00
David Beguin 92fe83ecf8 [IMP] mail, mass_mailing : reset bounce on mail reception
PURPOSE

Add some improvements in mail gateway: remove private discussion, improve
bounce management, allow resetting bounce counters, improve automatic set or
reset of blacklists and ease mass mailing inheritance.

SPECIFICATIONS

The number of message bounce is incremented each time the email bounce
on a specific email address. To have a correct information, we should
reset to zero this counter if we receive a mail from this address.
Indeed, if we receive an email from an email address, this email is
active and the message bounce number (if > 0) is not relevant anymore.

Only models inheriting form blacklist are impacted by this improvement
in order to limit a bit side effect.

Also, add a check in autoblacklist rule. No need to check the stats
if message_bounce is < 5.

This commit introduces

  * ``_routing_reset_bounce`` routing method managing the bounce reset;
  * ``_message_reset_bounce`` model method that resets bounce counter
    in blacklist enabled models;

LINKS

Related to task ID : 1893155
Linked to PR #33340
2019-08-09 14:30:55 +00:00
David Beguin f4524f03c3 [REF] mail: move and improve bounce management in mail gateway
PURPOSE

Add some improvements in mail gateway: remove private discussion, improve
bounce management, allow resetting bounce counters, improve automatic set or
reset of blacklists and ease mass mailing inheritance.

SPECIFICATIONS

Purpose
  * move bounce information detection in message parsing. It allows to have
    this information available in various steps of routing instead of having
    to manually re-compute them;
  * handle bounce in specific methods allowing easy override;
  * improve bounce management, notably when detecting a bounce not linked
    to the bounce alias configuration;
  * better integration with blacklist mechanism;

Specifications
  * compute bounce information in ``_message_parse_extract_bounce``.It parses
    bounce information and returns a dictionary allowing to update parsed email
    values;
  * remove override in mass_mailign that basically does what mail already
    does;
  * manage bounce in ``_routing_handle_bounce``;
  * when detecting a bounce, correctly call the bounce management method on
    all models inheriting from blacklist;
  * correctly update bounce counter;
  * bounced mailing traces and automatic blacklist in mass mailing should
    be done in ``_routing_handle_bounce``;
  * add some tests;

LINKS

Related to task 1893155
Linked to PR #33340
2019-08-09 14:30:55 +00:00
Thibault Delavallée 7b79045fab [REF] mail: perform some code cleaning in mail gateway about parsing email values
PURPOSE

Add some improvements in mail gateway: remove private discussion, improve
bounce management, allow resetting bounce counters, improve automatic set or
reset of blacklists and ease mass mailing inheritance.

SPECIFICATIONS

Parsing email values: make message_parse effectively prepare all required
values for later processing

  * update message_parse to add some more data directly in parsed dictionary
    and avoid having to parse value again in later processing and computation.

    * notably recipients computation is now done directly in parsing. It
      includes email check and reconstruction using tools methods. That way
      routing just has to handle those values and not compute part of them;
    * from and cc are correctly managed with parsed and cleaned (sanitized)
      versions in dictionary;
    * remove all code decoding message header and replace them by fetching
      the parsed value instead;

  * filter parsed values before calling message_post to ensure right values
    are given to it instead of having to manage them in message_post. Indeed
    caller has to give the right input;
  * make parsing sub-methods (extract payload, post process payload) have
    a dictionary as input and output to always manage a dictionary of values
    through the parsing methods and update their namespace;

Routing: remove deprecated code parts

  * remove use of email_references regex. Indeed emails are routed using their
    messageId and not the regex anymore since several versions [1];
  * clean some unnecessary variables;
  * simplify variable type input, like message_parse accepts only valid
    email.message instances and to avoid several decode / encode. Tests are
    updated accordingly;

Update docstrings of those methods.

LINKS

Related to task 1893155
Linked to PR #33340

[1] See df037e2959 and 0028c42136
2019-08-09 14:30:55 +00:00
Thibault Delavallée 442e535fdd [REF] mail: simplify and rename message_route_verify
PURPOSE

Add some improvements in mail gateway: remove private discussion, improve
bounce management, allow resetting bounce counters, improve automatic set or
reset of blacklists and ease mass mailing inheritance.

SPECIFICATIONS

Purpose: clean mail gateway code by cleaning message_route_verify

``message_route_verify`` is therefore renamed to ``_routing_check_route`` as
there are already some methods prefixed by routing, related to email routing.
This method is also made private as it has no real use for external world.

Parameters of this method are also cleaned. Various cleanings and code
improvements made some parameters not necessary anymore :

 * create_fallback: was always True;
 * update_author: was always True;
 * drop alias: no real use as aliases are used to compute the route and its
   access, dropping it at that point has no effect on code;
 * assert_model: renamed to raise_exception to be more coherent with the
   same kind of parameter used in Odoo;

LINKS

Related to task 1893155
Linked to PR #33340
2019-08-09 14:30:55 +00:00
Thibault Delavallée e132c40f66 [REF] mail: remove private discussion support in mail gateway
PURPOSE

Add some improvements in mail gateway: remove private discussion, improve
bounce management, allow resetting bounce counters, improve automatic set or
reset of blacklists and ease mass mailing inheritance.

SPECIFICATIONS

Private discussion support in mail gateway means having incoming messages
not linked to a document. It means having a void model and res_id on related
messages.

Old private conversations in Odoo were implemented using messages not linked
to any document [1]. It was possible to send an email to some people through
the UX and they were able to answer it. Messages were not attached to any
document and model. There were some limitations to this feature, notably it was
limited to replies (no beginning of private discussion through mail gateway).
One way of doing it was through the use of res.users aliases [2]. There was
also a vaguely twitter-lite use of chatter on HR employee profiles linked
to users aliases, then removed with an explicit support of private
discussions [3].

It is not supported anymore since discussion between users is now done using
chat. Aliases on users have since been removed [4]. Contacting partners or
customers can be done on business documents or on channels. Simple email
discussion is not supported in Odoo as it is not the purpose of mailgateway.

This commit removes code related to private discussion in mail gateway and
some specific support in message_post method.

LINKS

Related to task 1893155
Linked to PR #33340

[1] History is a bit messy, see notably fd90140d7b and commits around
[2] User alias addition 052f2ace57
[3] End of employee twitter-like and posting on users = private discussion 89896f32bb
[4] User alias removal 029d1baf35
2019-08-09 14:30:55 +00:00
Thibault Delavallée f7a17c2380 [FIX] sms: correctly take mobile or phone as valid number fields for partners
Partner / Contact model may hold valid mobile numbers in mobile or phone
fields.

LINKS

Task 1997464

closes odoo/odoo#35599

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-09 11:49:39 +00:00
Thibault Delavallée 2f75534244 [FIX] mass_mailing: allow to delete recently scheduled mailings
Scheduling a mailing creates a wizard with a m2o linking the mailing. While
this wizard is still alive and not garbage collected it is impossible to
delete the mailing. This commit fixes that.

LINKS

Task 1997464
2019-08-09 11:49:33 +00:00
RomainLibert 98385da449 [FIX] hr: add name to create
To create an employee you have to give it a name

closes odoo/odoo#35556

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-08-08 10:01:05 +00:00
Sapan Zaveri dafb128c14 [IMP] hr, hr_attendance: badge creation and few usability improvement
hr:
-rename btn 'generate badge ID' to 'generate'
-When the badge ID is set, replace the button Generate by "Print Badge"

hr_attendance:
-Rename menu 'Manage Attendances' to "Manager"
-Add a column "Work Hours" to attendee tree view
-Add a <br> after "Welcome to"
-add class text-muted on "or"
-remove class "text-muted" on "scan your badge
-Rename the primary btn into "Identify Manually"

Task-2040884
Closes: #35473

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-08-09 08:36:52 +00:00
Antoine Prieels 7cb9518857 [IMP] hw_drivers: PrinterDriver get hotspot name for status ticket
When the IoT Box is not connected to the IoT Box, a hotspot would be
created to configure it. The name of this hotspot is printed on a
status receipt if a printer is connected. Previously, this ticket only
showed the default name of the hotspot, but this name will be different
if the user renamed the Box. We then read the name of the hotspot from
the config.

closes odoo/odoo#33095

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-08 11:53:37 +00:00
Antoine Prieels 1e5ed54866 [IMP] pos_restaurant: Order printers with HTTPS
To use a kitchen printer, the user can only enter the IP of the Box and
it would be transformed into an URL with the protocol and port number.
This only supported HTTP so people that used HTTPS needed to enter the
full url to their Box.
2019-08-08 11:53:37 +00:00
Antoine Prieels f2230f4495 [REF] pos, pos_*: Change Escpos' XML to HTML
Receipt are now printed as JPGs so receipts need to be formatted as
classic HTML to be rendered as images by Wkhtmltoimage.

There were two versions of the receipt for an order. The one in XML,
to be printed, and the one in HTML, that was displayed in the POS.
Since both of them are now HTML, we can remove one of them.

TaskID: 1939455
2019-08-08 11:53:37 +00:00
Antoine Prieels 463c0ff3a2 [IMP] hw_drivers: Print Star printers notice
We communicate with receipt printers using the ESCPOS drivers.
By default, Star printers use the Star mode. This can be changed by
modifying the position of the DIP-Switches at the bottom of the
printer.

We provide a link to the documentation to the user if its printer is
not correctly configured.
2019-08-08 11:53:37 +00:00
Antoine Prieels 03b2f7b77d [REF] pos: Replace hw_escpos by PrinterDriver
ESCPOS printers are now supported as IoT Devices, just like any other
printer. We now transform the receipts to JPGs, transform these JPGs
into ESCPOS commands and send them via Cups, adding support for network
printers. Since we now print images, we can now print special
characters and therefore add support for other languages such as
Arabic.

The JPG is generated in the browser, with the help of html2canvas.

`hw_escpos` is left untouched to allow backward compatibility and
should be removed when v12 is no longer supported.

In the PoS, all the code for printing has been moved from ProxyDevice
to a separated JS file.

TaskID: 1939455
2019-08-08 11:53:37 +00:00
Antoine Prieels dd7de1bcb6 [IMP] hw_drivers: Move PrinterDriver to Community
Printers should be usable by IoT Boxes connected to a community DB.

TaskID: 1939455
2019-08-08 05:47:03 +00:00
Robot Odoo c20cb62f49 [IMP] *: M2X search/add popup should display a kanban instead of a list in mobile
- Add support of "kanban_view_ref" on many2x fields:
For many2one fields, this specific kanban view will be opened when you click
on this field. Note that in desktop, the behavior stay unchanged:
'Search More' will open the tree view.
For many2many fields, this specific kanban view will be opened when you add
a record in mobile.

- Add support "selection_mode" in kanban views.
This boolean is set to true when you want to use a kaban view to
select a record instead of open a record.
"selection_mode" is now passed in qweb_context to allow developers
to use t-if='selection_mode' in kanban views to show or hide elements;
buttons, dropdowns, anchor tags are not necessary when selection_mode
is enabled. So those elements can be hidden based on this condition.
Useful when kanban view is opened from m2o in mobile environment.

Task ID : 1924779

closes odoo/odoo#30747

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-08-09 14:50:29 +02:00
Andrea Ulliana d5d2f5014a [IMP] website: make SEO dialog clearer
Part of https://github.com/odoo/odoo/pull/34422
task-2026299

closes odoo/odoo#34422

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-09 09:45:07 +00:00
Andrea Ulliana 4616051784 [FIX] website_form: fix spacing on contact us page
Part of https://github.com/odoo/odoo/pull/34422
task-2026299
2019-08-09 09:45:07 +00:00
Andrea Ulliana 599d23c670 [IMP] website: make the menu/link dialog clearer
Part of https://github.com/odoo/odoo/pull/34422
task-2026299
2019-08-09 09:45:07 +00:00
Andrea Ullianaandqsm-odoo 615f4ceefd [IMP] website: make theme dialog clearer
Review labels and alignements.

Part of https://github.com/odoo/odoo/pull/34422
task-2026299

Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-08-09 09:45:07 +00:00
Andrea Ulliana d33c8872fe [FIX] web_editor: make the ace asset info line readable
The text was gray on gray... it is now forced to white.

Part of https://github.com/odoo/odoo/pull/34422
task-2026299
2019-08-09 09:45:07 +00:00
qsm-odoo 95c2123eba [IMP] web_editor: review optimize dialog design
This commit makes the UX of the optimize dialog clearer.

Part of https://github.com/odoo/odoo/pull/34422
task-2026299
2019-08-09 09:45:07 +00:00
qsm-odoo e60323f876 [IMP] website, *: improve brand promotion in the footer
* web, website_event, website_sale, sale_quotation_builder

Instead of an ugly danger-colored badge promoting "odoo", we now use
the official odoo logo. The code is also refactored to use more
consistent and translatable sentences without duplicated code.

Note: the odoo logo is added in the repo, downloaded from our official
brand assets page (https://www.odoo.com/page/brand-assets), in its
'tiny' version. The repo already contained multiple odoo logos but they
are quite old and should be replaced in a further update. Note: the svg
version was not able to be used as it contains external margins...

Part of https://github.com/odoo/odoo/pull/34422
task-2026299
2019-08-09 09:45:07 +00:00
Victor Feyens e21656413a [FIX] product_matrix : templates with one attribute line.
Don't show "Not Available" as Line header when there is only one
attribute line on the product.template.

closes odoo/odoo#35586

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-09 09:06:10 +00:00
Mohammed Shekha 25ebd80b40 [IMP] *: add selection_mode condition to show/hide elements in kanban
If we use a kanban view to select a record we want to hide those elements:
dropdown boxes, buttons, anchors, some widgets, kanban color.

When it was too much change and used the new attribute
"kanban_view_ref" to explicitly define which view to open in selection_mode.

When also had to create previously unexisting kanban for
fleet.vehicle.model to show name and brand.

Task ID : 1924779
2019-08-09 09:01:19 +00:00
Mohammed Shekha 597142d12c [REF] web: move some logic in _prepareButtons method
This function was too long and it's now easier to override it
in enterprise

Task ID : 1924779
2019-08-09 09:01:19 +00:00
Mohammed Shekha 80a8b66246 [IMP] web: m2o/m2m SelectCreateDialog will now open kanban view
- many2one widget in mobile will open kanban view instead of listview when
records needs to be selected

- Add support of "kanban_view_ref" on many2x fields:
For many2one fields, this specific kanban view will be opened when you click
on this field. Note that in desktop, the behavior stay unchanged:
'Search More' will open the tree view.
For many2many fields, this specific kanban view will be opened when you add
a record in mobile.

- Add support "selection_mode" in kanban views.
This boolean is set to true when you want to use a kaban view to
select a record instead of open a record.
"selection_mode" is now passed in qweb_context to allow developers
to use t-if='selection_mode' in kanban views to show or hide elements;
buttons, dropdowns, anchor tags are not necessary when selection_mode
is enabled. So those elements can be hidden based on this condition.
Useful when kanban view is opened from m2o in mobile environment.

Task ID : 1924779
2019-08-09 09:01:19 +00:00
Andrea Ulliana 1e61522d19 [IMP] website_event_track: improve UI of website forms and form views
+ kinda allow multiple speakers by event track

task-2003209

closes odoo/odoo#34527

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-07 13:05:49 +00:00
fja-odoo 736353b169 [IMP] website, *: improve published smart button
* = web, website_blog, website_crm_partner_assign, website_event,
website_event_track, website_forum, website_hr_recruitment,
website_livechat, website_partner, website_profile, website_sale,
website_sale_delivery, website_slides

The published button name is a bit ambiguous, now it will clearly state
what it does with a new title : "Go to Website". The "Published",
"Unpublished" state is shown with the globe icon changing color
(green and red) and a title on the button.

Badge and Delivery don't have a website page, the button will then be
a publish/unpublish button in the backend.

task-2002435

closes odoo/odoo#34261

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-08-08 16:05:33 +00:00
Katherine Zaoral 50155ae08e [ADD] base: Change Argentina country data
* set country VAT Label "CUIT" which is the country TAX id name  in
Argentina in order to used in reports and other places in Odoo. CUIT
mean "Código Único de Identificación Tributaria",

* update address format of the country.

* Use the state name instead of the state code: The address for the
company and partner was showing the state code (defined by ISO) but
this one are not the ones know for the common use. In order to avoid
errors we use the state name instead of the state code.

* Also change the order of the city state and zip are shown in address
in order to match the address in Argentinain "way".

closes odoo/odoo#34961

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-08-08 16:51:52 +00:00