Commit Graph
124195 Commits
Author SHA1 Message Date
Géry Debongnie c1752b8347 [FIX] web: display action menu in form/list view
The recent refactoring of the control panel moved the sidebar management
from the action manager to the view itself.  However, the sidebar
parameter was forgotten, which resulted in the fact that it was no
longer created.

This fix was a little tricky, because the sidebar needs to be
instantiated in some tests, but not in most of them (in particular, the
document application changes its behaviour, which is annoying).

closes odoo/odoo#29389
2018-12-11 12:58:49 +00:00
Romain Derie f69c004795 [FIX] website_membership: correctly check if customize view is active
Commit 5804246e0f introduced some improvements to speed up performances.
One of them was to check if a customize_show view was active or not but the
condition was on view.customize_show instead of view.active.

Thus, as that view is always a customize_show, the condition would always be
met.

closes odoo/odoo#29414
2018-12-11 10:23:50 +00:00
Martin Geubelle c70a36961f [FIX] web: correct load act_window with empty id
There was a traceback when reloading the webclient with an act_window and an
empty id in the URL (ex: after saving Settings). A `read` without id was
peformed when loading data instead of a `default_get`.

Before rev. odoo/odoo@40dd121 the action environment was generated by the
ActionManagerActWindow, which was currently defaulting the `currentId`.

Now that this is not the case anymore, the `loadState` should have this responsability.

Task 1902826

closes odoo/odoo#29411
2018-12-11 10:02:03 +00:00
Martin Geubelle 0ba9daa2ce [FIX] mail: adapt activity view icon
Task 1889687 adds the activity view to Studio>Views, the view is represented by
icon fa-clock-o. Task 1894990 was supposed, among other things, to change the
current activity view icon (fa-th) to fa-clock-o. Since this task was not merged
it creates an inconsistency between the 'view switcher' and Studio.

Task 1902826

closes odoo/odoo#29392
2018-12-10 14:01:24 +00:00
Arnold Moyaux b0d79b9802 [FIX] stock, mrp: log less activity on PC type
Usecase to reproduce:
- Set manufacture step to 2 or 3 steps
- Create a MO
- Go on the PC picking and validate some quantities w/h BO

Traceback because there is no documents to log the activity.

It happens because the function used in groupby and sorted
(in the method _log_less_quantities_than_expected) expect a picking.
The purpose of _log_less_quantities_than_expected is to generate
an activity on the next picking in order to notify that some quantities
will be missing due to the cancelation of the back order. In order
to find the following picking it uses the destination moves from the
current's picking moves.

	Picking w/h BO		Next Picking (activity to post)
		|			|
	      moves -----------> destination moves

However in the case of 'pick components' picking type(PC) the destination
moves are linked to a manufacturing order and not a picking. So it
_log_activity_get_documents return an empty parent since picking_id is
False.

In order to fix it, _log_activity_get_documents only add the tuple
(object where the activity should be log, responsible for the activity)
if the object is not False. It also add a hook in order to add
(mo_id, repsonsible) during _log_less_quantities_than_expected on top
of (picking_id, repsonsible) in order to log activity on MO directly
linked to PC.

This commit also add a missing precision_rounding in backorder
confirmation

opw-1908753

closes odoo/odoo#29385
2018-12-10 12:43:39 +00:00
Nicolas Martinelli bc38850c96 [FIX] portal: missing translation
closes odoo/odoo#29413
2018-12-11 10:21:22 +00:00
Romain Derie 66c33c880d [FIX] website_membership: fix SQL error on non existing column
Since multi-website 4f6ec1cd2a, `website_published` became a computed field
and `is_published` was introduced for storing the old `website_published` value

Still, old SQL select was trying to read `website_published` instead of
`is_published`.

Step to reproduce:
  - Create a Membership Product
  - Create a Membership Customer
  - Add the Membership to the Customer (Buy Membership)
  - Publish the Customer
  - Go to /members, it will error 500

closes odoo/odoo#29412
2018-12-11 10:11:09 +00:00
Goffin Simon 52881d0f4a [FIX] payment: Traceback when configuring payment methods
Steps to reproduce the bug:

- Create a payment acquier PA with no journal
- Click on "Set payments" on your website dashboard
- On the wizard, choose "Custom payment instructions"
and select PA as Method
- Set a new bank name and a new account number
- Click on "Apply"

Bug:

A traceback was raised because no journal was set on PA.

opw:1916418

closes odoo/odoo#29378
2018-12-11 08:44:59 +00:00
Nicolas Martinelli 4344c44760 [FIX] mail: missing translation
closes odoo/odoo#29356
2018-12-10 13:27:20 +00:00
Nicolas Martinelli 3f72a8fab6 [FIX] purchase: View RFQ button
- Create a RFQ
- Send it to the customer

The email sent contains a 'View Purchase Order' button instead of 'View
Request for Quotation'.

We make use of the previous commit to correct the issue.

opw-1915230
2018-12-10 13:27:20 +00:00
Nicolas Martinelli 8cd7de2204 [IMP] mail: model description
Allow to specify the `model_description` when sending an email to take
into account for cases where the same model is used for different
business concepts.

opw-1915230
2018-12-10 13:21:21 +00:00
Nicolas Martinelli 9e71d228ed [FIX] mail: translation of custom layout
- Create a PO for a French customer
- Send by email

The body of the email is in French, but some parts (such as the View
button or the footer) are not translated.

The body is translated following the field `lang` of the email template,
in this case `${object.partner_id.lang}`. This is done when opening the
mail composer (so the message appears in French). However, other parts
are rendered only when sending: at this point, the language to be used
in the template is lost forever in the darkness.

To avoid this, we keep a specific context key `custom_layout_lang` that
we retrieve when rendering the custom layout.

opw-1908420
2018-12-10 13:21:21 +00:00
Nicolas Martinelli 0687f17622 [FIX] mail: model description
Do not use the model `_description` field which cannot be translated. Use
the `display_name` of the corresponding model instead.

Moreover, `<t t-esc="'%s' % model_description or 'document'"/>` gives
`'None'`, while `'document'` is expected.

This adds a query to some tests, which is expected since `display_name`
requires information stored in the DB, while `_description` is defined
at the Python level.

opw-1908420
2018-12-10 11:59:03 +00:00
Denis Ledoux fba844c732 [FIX] project, rating: project percentage satisfaction compute performance
This is basically a backport of revision
47479401cb
to gain the performance on the project
percentage satisaction computation

but without introducing the new parent mixin,
which would not be a stable change.

closes odoo/odoo#29354
2018-12-10 15:59:44 +00:00
jem-odoo f098c787c0 [IMP] rating: don't call compute method directly
The correct way to trigger a recomputation of a field is not
to call directly the compute method. The ORM offers mecanism
to do it: we have to flag the field as "recompute to do" and
then call `recompute` method (availble on every models). This
one will call the recompute method of all fields marked as
"to recompute".

This will optimize the performance by doing recomputation in
batch.

Task-1903565
2018-12-10 15:59:44 +00:00
Toufik Ben Jaa 007669feac [FIX] sale: do not schedule activity when no user_id
- The `_write` override on `sale.order` create a Next Activity for the
  SO's salesperson when changing the SO `invoice_status` to upselling.

  If the SO doesn't have a salesperson this code crashes since `user_id`
  is required on Next Activities.
  To avoid this crash we create the Next Activity only if a salesperson
  is set on the SO.

  OPW-1914087
2018-12-10 11:43:12 +01:00
Christophe Monniez 5e92adb39c [FIX] web: adapt clickeverywhere test to the controlpanel refactor
Since 4cd379cf6e the ControlPanel is now a child of the viewController.
This breaks the clickEveryWhere test.

With this commit, the view_controller selector is adapted in the clickEverywhere
test.

closes odoo/odoo#29383
2018-12-10 10:42:48 +00:00
Thibault Delavallée b65202cb8e [FIX] survey: fix test url redirection
closes odoo/odoo#29381
2018-12-10 10:31:33 +00:00
Raphael Collet befb3a1cd6 [FIX] models: make valid aggregation functions explicit
In `read_group`, allow an explicit set of aggregation functions.

closes odoo/odoo#29348
2018-12-10 08:52:50 +00:00
Christophe Simonis 764ab2507d [MERGE] forward port branch 11.0 up to d129b0220e 2018-12-14 10:53:31 +01:00
Christophe Monniez 36870481f9 [REL] saas-12.1 2018-12-08 07:36:21 +01:00
Raphael Collet 54238c88e8 [FIX] mail: wrong many2many definition
The definition of `attachment_ids` on model `email_template.preview` is wrong,
because its table/columns refer to the model `mail.template`.  As the field is
only used to preview a result in a wizard form, it does not need to be stored.

closes odoo/odoo#29349
2018-12-07 12:28:58 +00:00
Julien (juc) Castiaux 23d9aeb22d [FIX] website_project: buggy pager
The pager wasn't taking care of the filter

opw-1912293

closes odoo/odoo#29360
2018-12-10 14:21:45 +00:00
qdp-odoo 299f9f1eb0 [REF] account: refactoring of the invoice validation
Better split of invoice_validate() and action_move_create() functions: the later now only deals with the account.move creation while the former assigns missing values (dates) and gets its number. The move now always receives its name from the invoice, which means there's no need anymore of the 'invoice' arg in account.move post() method.

We now also put the origin of the invoice in the move ref, in order to allow searching on that reference in the bank statement reconciliation widget.

closes odoo/odoo#29343
2018-12-07 10:29:16 +00:00
qdp-odoo fd7aa0cfa0 [IMP] sale: invoice creation for downpayments cleanup
don't set the SO name in the reference/description field of the customer invoice, as it's already copied in the origin field
2018-12-07 09:08:06 +00:00
Thibault Delavallée 8e38d97f69 [FIX] survey: make a specific route for testing surveys
Purpose of this commit is to clean a bit the test mode of surveys before
working a bit on ACLs and survey access. Currently when taking a survey
with a magic 'phantom' token it generates a test answer allowing to go
through the survey process. However it has several drawbacks :

 * 'phantom' is not a real token. Token parameter should be used only for
   real tokens and avoid having corner case when managing simple parameter;
 * token should only be used to ensure people have been granted access to
   answering surveys;
 * it is currently available for every users;
 * it is pure unwanted magic;

In this commit we add a separate route for testing surveys that create the
test answer and then redirects to the survey with this answer. It is now
also limited to survey managers or survey officers testing their own surveys.

Survey JS tour now uses the standard URL and not the testing one. Indeed as
testing is now limited to survey officers and managers tour should test
real life use cases.

This commit is linked to task ID 1916034 and PR #29339.
2018-12-07 09:36:46 +00:00
Aurélien Warnon f5625969be [FIX] survey: properly inherit survey assets in website_survey module
Purpose
=======

Survey assets were incorrectly overridden in the website_survey module and all copy/pasted.

This will correctly include the survey_assets template and get rid of these copy/pasted
assets references, while keeping the website style on survey pages.

Task: #1915790
closes #29314
2018-12-07 14:15:46 +00:00
Robot Odoo 4cd379cf6e [REF] web: move ControlPanel inside controllers/actions
This branch introduces a large-scale reorganization of the
component tree generated by the web client.  The short version is
that now, the control panel is a child of the view controller and
no longer a sibling. Graphically (and simplified), we go from
this:

                  webClient
                 /    |    \
               ...   ...  actionManager
                           /         \
                   controlPanel   viewController
                                    /       \

to this:

           	  webClient
                 /    |    \
               ...   ...  actionManager
                               |
                          viewController
                            /   |   \
          ControlPanelController
              /           \
         CPRenderer     CPModel

The motivation is that this work moves the code where it should be.
Before this commit, it was kind of weird to have code in the
controllers to render buttons outside of their root node (in
renderButtons).  Also, the action manager had to take care of
coordinating search view states between view transitions.

So, this work simplifies the code.  It also makes it easier to
extend. We see day after day that Odoo needs to take care of more
complex UI needs, and in many cases, these needs were quite
difficult to implement (we prefer spaghettis in our plates, not in
our code).  The changes in this branch should open the way to
implement these features.

For example,
- it will now be easy to add the possibility of views (for example,
  the search view or a new ControlPanel view) to add custom buttons
  (of type action or object) in the control panel.
- Another need will be to serialize/ restore the state of the
  search view across action boundaries (needed by the dashboard).
- Another example is the possibility for views to customize easily
  the presence/absence of sub menus (filters/groupbys/favorites/
  time range/...)
- Another need is an easier way for views/client action to customize
  their control panel.

This commit also contains a large rewrite of the search view (so it
is more inline with our architecture and easier to maintain).

Part of task 1893568

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#29106
2018-12-07 23:26:47 +01:00
pha-odoo f14092cbfa [IMP] point_of_sale: Connect with Employee on PoS
=========
PURPOSE
=========

{Any employee can work on a PoS session, even if he has no user. This decreases the cost of PoS App.}

We are not competitive enough on the PoS Market because customers have to pay one user per cashier while they expect to pay one user per cash station.

===============
SPECIFICATIONS
===============

pos.config
- Add a checkbox : "Login with Employees"
- If set to TRUE, an "Allowed Employees" many2many appear
- If employees many2many is empty, all employees can log on this PoS
- If set to FALSE, can only log in with the currently logged user

hr.employee
- The barcode and pin fields were be moved to the hr.employee
- Set a barcode (not pin) by default at the creation of any employee
- No Employees module with PoS > dependency to hr

Open the PoS if "Log in with Employees" = FALSE
- Same behaviour than now, when I open the PoS, I'm logged in with the current user and can start working at once. The only difference is that it is not possible to switch users anymore.
- The button to close the session is visible

Open he PoS if "Log in with Employees" = TRUE
- When I open the PoS, the first screen I see is the login screen.
(a) I choose my employee and enter my pin code (if there is pin code on my employee, otherwise not required) (I can only see employees that have access to that PoS)
(b) I scan my barcode
(c) I scan my rfid card (future development)
- When I click on the employee name, I can log in with another employee
- If the employee is linked to a user that has the pos user/manager access right, I can see the button the close the session. Otherwise I cannot close the session (and thus cannot access backend).
- Add field employee on all records created by PoS (and replace the field user by that one) (on pos.orders)

Lock Screen
- Improve the PoS Interface
- Add a new feature to allow to "lock" the session. When a session has been locked, the user/employee has to re-log-in to access the PoS
- When I try to re-log-in, by default suggest the last employee logged in in the login screen

Migration
Plan a migration strategy > barcode and pin is now on the employee and not on the user anymore

closes odoo/odoo#28567
2018-12-07 14:31:56 +00:00
Mathieu Duckerts-Antoine 1e0b370b16 [FIX] google_spreadsheet: adapt code to refactoring
This commit adapts the code for the 'Add to Google Spreadsheet'
entry in the Favorites menu, according to the large refactoring of
the SearchView/ControlPanelView in web.

Part of task 1893568
2018-12-07 13:16:11 +00:00
Mathieu Duckerts-Antoine 38dc5c18b4 [REF] board: adapt code to search refactoring
This rev. adapts the code of the 'Add to Dashboard' entry of the
Favotires menu, according to the large SearchView refactoring. It
also does some tweaks for the dashboard app due to the move of the
ControlPanel from the ActionManager to the controllers.

Part of task 1893568
2018-12-07 13:16:10 +00:00
Aaron Bohy 84a1d7bd59 [FIX] point_of_sale: adapt webclient template
according to changes in web.

Some changes have been made to the webclient template (and widget)
in web, and the pos (using the webclient widget as well) needed to
be adapted.

Part of task 1893568
2018-12-07 13:16:09 +00:00
Géry Debongnie 86b6bd5ad1 [REF] point_of_sale,web: move backbone to pos
This rev. moves the backbone library from web to pos, as one of its
two usecases (the search view) has just been removed. From now on,
it is only used in the pos.

Part of task 1893568
2018-12-07 13:16:08 +00:00
86870b89bd [REF] *: adapt views outside web
to ControlPanel/Search view refactoring.

*: mail,sale,web_diagram

The ControlPanel being now inside the DOM of views' controller,
those existing widgets needed to be adapted (in the way they define
if and how they want a ControlPanel, and in the way the manipulate
their DOM as it slightly changed). Tests needed to be adapted as
well.

Part of task 1893568

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
2018-12-07 13:16:08 +00:00
b1ef0001f6 [REF] *: adapt all client actions
to ControlPanel/Search view refactoring.

The ControlPanel being now inside the DOM of client actions, those
existing widgets needed to be adapted (in the way they define if
and how they want a ControlPanel, and in the way the manipulate
their DOM as it slightly changed). Tests needed to be adapted as
well.

Part of task 1893568

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
2018-12-07 13:16:07 +00:00
40dd121938 [REF] web: move ControlPanel inside controllers/actions
This branch introduces a large-scale reorganization of the
component tree generated by the web client.  The short version is
that now, the control panel is a child of the view controller and
no longer a sibling. Graphically (and simplified), we go from
this:

                  webClient
                 /    |    \
               ...   ...  actionManager
                           /         \
                   controlPanel   viewController
                                    /       \

to this:

           	  webClient
                 /    |    \
               ...   ...  actionManager
                               |
                          viewController
                            /   |   \
          ControlPanelController
              /           \
         CPRenderer     CPModel

The motivation is that this work moves the code where it should be.
Before this commit, it was kind of weird to have code in the
controllers to render buttons outside of their root node (in
renderButtons).  Also, the action manager had to take care of
coordinating search view states between view transitions.

So, this work simplifies the code.  It also makes it easier to
extend. We see day after day that Odoo needs to take care of more
complex UI needs, and in many cases, these needs were quite
difficult to implement (we prefer spaghettis in our plates, not in
our code).  The changes in this branch should open the way to
implement these features.

For example,
- it will now be easy to add the possibility of views (for example,
  the search view or a new ControlPanel view) to add custom buttons
  (of type action or object) in the control panel.
- Another need will be to serialize/ restore the state of the
  search view across action boundaries (needed by the dashboard).
- Another example is the possibility for views to customize easily
  the presence/absence of sub menus (filters/groupbys/favorites/
  time range/...)
- Another need is an easier way for views/client action to customize
  their control panel.

This commit also contains a large rewrite of the search view (so it
is more inline with our architecture and easier to maintain).

Part of task 1893568

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
2018-12-07 13:16:06 +00:00
Géry DebongnieandAaron Bohy 48a50b4bc0 [IMP] web: add MVC Factory
This rev. adds a factory class to generate MVC components, to
properly standardize the way MVC components should behave (in the
odoo way). The most popular MVC of the webclient concerns views
(Model, Controller, Renderer, for each view type). However, we
wanted to generalize the notion of MVC (and extract it from the
views), as we will use it in a future commit for the ControlPanel.

Part of task 1893568

Co-authored-by: Aaron Bohy <aab@odoo.com>
2018-12-07 12:49:50 +00:00
David Arnold 9a95781439 [FIX] hr_payroll: Fix localdict ambiguity on rule computation
Purpose
=======

On a payslip rule computation you can return 3 parameters:
- result_qty
- result_rate
- result

From this, we compute the total amount as following:

tot_rule = amount * qty * rate / 100.0

If we set parameters result_qty=0 or result_rate=0 to force the tot_rule to
be equal to 0, then their values are set to the default one, which is ambiguous.

So
result_qty = 0
result_rate = 0

Become
qty=1
amount=100

We can't fix this in a stable release as this could imply unwanted
behavior changes for customers, and also quite difficult to spot.

closes odoo/odoo#29206
2018-12-07 10:02:12 +00:00
Robot Odoo f0d5a5ba13 [MERGE][IMP] im_livechat, website_livechat : update website default livechat
In order to facilitiate the configuration of a livechat on the website,
the first livechat channel that was demo data from im_livechat
is now set as data. Website is now using this first livechat channel
instead of creating a new one and using it.

Merge related to task ID 1912056.

closes odoo/odoo#29020
2018-12-07 12:38:34 +01:00
Robot Odoo f420544aaa [MERGE] base, web: split the documents features from ir.attachment
The first implementation of `documents` was based on `ir_attachment`,
adding fields only useful when the attachment was a document.

This task splits documents in a new model called documents.documents,
and clean the logic accordingly.

This task also recovers the "attachment" action button, to list attachments on a model
without chatter.

related to: odoo/enterprise#3048
task: #1908896

closes odoo/odoo#28563
2018-12-07 10:33:03 +01:00
Jeremy Kersten 72905feee0 [FIX] website: redirect_type oversight
Related to #2924b77b6f5
Similary to #8ca728bb9312

closes odoo/odoo#29330
2018-12-06 21:07:32 +00:00
Robot Odoo 9f6f9c71d3 [MERGE] mail, *: several UX/UI improvements
*: bus, im_livechat, mail_bot, website_livechat

Several improvements for Discuss app:

1. Improved "is typing..." notification
2. Merged private & public channels
3. Quick channel search
4. No push notification right after accepting them, and transparent odoo bot icon in native notification
5. Selected emojis are inserted in composer based on cursor position
6. Set surname to people for DMs name
7. Discard replying to a message in Inbox
8. Broadcast "seen" notification ('v' and 'vv' on messages)

[1] [image1](https://drive.google.com/file/d/11_H6ZJh0wFaegAV0fTLdc68z37nhVKnW/view?usp=sharing), [image2](https://drive.google.com/file/d/1s9g_hUCMesuTLAqpeGMwLWzHCYnzanr6/view?usp=sharing)
[2] [image1](https://drive.google.com/file/d/1WUBqc2lScfWV8Yrtq6Zk4MO4jC0CdaiG/view?usp=sharing), [image2](https://drive.google.com/file/d/13XVcW0Nookwea_4xz02mIwPi5dPhXu18/view?usp=sharing)
[3] [image1](https://drive.google.com/file/d/1FuV3xH9cK6qR7ljd5vELOHc4icvHIJTF/view?usp=sharing), [image2](https://drive.google.com/file/d/1hwuu5ejlj9ou02NF5XmL-XHTiD-Ty6XT/view?usp=sharing)
[4] [image](https://drive.google.com/file/d/1si1TYtCpdyOgw9IRaMWmxuUb1d8M4ccF/view?usp=sharing)
[5] [video](https://drive.google.com/file/d/19knQ47F1wzlNvxT2nJH3A9V34wO1D9Bn/view?usp=sharing)
[6] [image1](https://drive.google.com/file/d/11ot_DtySN2cIN_bM8n7fhFV2JXNoz0lH/view?usp=sharing), [image2](https://drive.google.com/file/d/1aNyapzKePIRg903woCo3kXJhy-ZFwfEG/view?usp=sharing), [image3](https://drive.google.com/file/d/1AtVlOG67YjsS8ax1ErWhXfSDOtKhLQhC/view?usp=sharing)
[7] [image](https://drive.google.com/file/d/1U-VEut7M7-t9WzdKVagfyy6ZrbOJrflp/view?usp=sharing)
[8] [image1](https://drive.google.com/file/d/1_32q8iqPBhW4sPhAtY5mIO968gj1o9o-/view?usp=sharing), [image2](https://drive.google.com/file/d/1Ne6HMEgJxHAWYN3e3SlrF6Qqg70LDvAW/view?usp=sharing)

Task-ID 1881001

closes odoo/odoo#29191
2018-12-07 09:33:01 +01:00
ThanhDodeurOdoo 4345394e08 [REF] attachment_indexation, *: replace old references to document
*: hr_recruitment, web, website_sale_digital

This commit replaces the references to 'document' by 'attachment_indexation'
following the rename of the module.

Task #1908896
2018-12-06 19:09:34 +00:00
ThanhDodeurOdoo adab361fb5 [REF] document, attachment_indexation: renames the module document
This commit renames the module document into attachment_indexation
to provide a more descriptive name and avoid confusion with
enterprise's documents module.

task: #1908896
2018-12-06 19:09:34 +00:00
ThanhDodeurOdoo 20cbb6dc0b Revert "[FIX] document: JS feature disabled"
This reverts commit 1dbb555a

Bring the sidebar attachment dropdown feature back.

This feature was removed due to be considered as useless,
but since some models can have attachement without a mail_thread,
this feature is still necessary.

task: #1908896
2018-12-06 19:09:34 +00:00
7d85ab1eac [REF] base, *: refactor binary_content
*: tools, web, website, website_forum, mail, im_livechat

This commit refactors ir_http to make it more readable
and flexible.

Move the resize function of web/image to odoo.tools

Co-authored-by: XavierDo <xdo@odoo.com>
Co-authored-by: Antony Lesuisse <al@openerp.com>

closes: #28563
task: #1908896
2018-12-06 19:09:33 +00:00
ThanhDodeurOdoo 89f20d2c29 [REF] base, mail: splits the documents feature from ir attachment
Moved the field 'active', 'res_model_name' and 'thumbnail' from
ir.attachment to enterprise's documents.document.

Moved the pdf split feature to enterprise's Documents module.

task: #1908896
2018-12-06 19:09:33 +00:00
Alexandre Kühn 844fb2b51e [IMP] mail: channel seen icon indication ('v' and 'vv')
This commit adds the seen icon next to a message for all channels
except livechat.

It tracks received and seen messages for all members of the channel.
Icon is either 1 or 2 check(s) ('v' or 'vv').

Those are the different states of this 'seen' icon:

  ICON:                           DESCRIPTION:

  no check .................. no one has received the message.
  1 check ................... some members have received the
                              message, no one has seen it.
  2 checks (greyed-out) ..... some members have seen the message,
                              some or everyone has received it
  2 checks (green) .......... all members have seen the message

This icon is not shown for messages preceding the last message seen
by everyone, in order to reduce visual noise.

Task-ID 1881001
2018-12-06 16:18:10 +00:00
Alexandre Kühn 15bbadb69b [REF] im_livechat, mail, website_livechat: clean mail model folder
The utility classes `Timer`, `Timers` and `CCThrottleFunction`
were only used by the feature 'is typing...', thus all those files
were in the same folder.

This commit moves the utility classes in a dedicated folder,
and introduces a folder for thread mixins, in preparation for
future features on threads that will be implemented as mixins.
2018-12-06 16:18:09 +00:00
Alexandre Kühn 50dfa865ea [IMP] mail: discard replying to a message in discuss
This commit adds a button to discard replying to
a message from the Discuss inbox.

Task-ID 1881001
2018-12-06 16:18:09 +00:00