Commit Graph
129760 Commits
Author SHA1 Message Date
Jeremy Kersten 34db511c8d [FIX] base: compute name for all ir_attachments
Before this commit, and since the new orm, we cannot open a record that have
no res_model and res_id.

With new orm, we should return a value for all records.
Now, we can open attachement form view without the error:

    ir.attachement(<id>).res_name traceback

closes odoo/odoo#36446

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-05 07:52:15 +00:00
laa 2b6ebb3df7 [IMP] mass_mailing : improve interface, UI and usability
In order to improve and clarify the mass-mailing (Email Marketing) module
several changes have been made

1 - Clarify the name of the application:
2 - Prevent the “Quick Add/Create” feature in the mailing kanban view
3 - Label and wording clarification in mailing_mailing form view :
4 - Clarify button names "Send now" ("put_in_queue")
5 - Mailing Form view layout
6 - Clarify the required field
7 - Clarify the readonly field
8 - Wording clarification if scheduling mail in the future
9 - Add a Placeholders tools page in the form view:
10 - Clarify the Campaigns view
11 - Clarify the Action Helpers

TASK-ID : 2046078

closes odoo/odoo#36124

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-06 07:47:13 +00:00
RomainLibert 2ab1259433 [FIX] account: change amount to amount_total
`amount` does not exist on account.move, it should be amount_total

closes odoo/odoo#36478

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-05 13:06:03 +00:00
lejeune quentin 173cfd8915 [FIX] hw_posbox_homepage: Fix to rename IoT Box
We must be able to change the hostname of IoT Box
even if we do not pass him a token.

So we give a default value to 'url' and 'token'

closes odoo/odoo#36428

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-04 14:08:33 +00:00
jem-odoo ba05c66e09 [IMP] web: formview auto close dialog
Sometimes when using a form view in a modal (e.i.: in a gantt view), we might
want to have some button in the footer. We expect clicking on buttons to close
the dialog but nothing happens, since the webclient does not know that this is
a modal.
To do so, we provide the `close='1'` attribute on the button, in form view.
This will trigger the event closing the modal.

This is done with the benediction of aab-odoo

Task-2024216

closes odoo/odoo#36493

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-09-05 20:11:28 +00:00
jem-odoo 1b24f60a5c [FIX] tools: format_datetime with inactive lang
When selecting the lang browse record, it can be empty when language is not
activated. As we don't need that lang to be active to translate the
format datetime (lang code is enough for Bable lib), we simply
need to fallback to prevent error.
2019-09-05 20:11:18 +00:00
qdp-odoo d604deccee [IMP] account: speedup of the aged partner balance
Removed a browse on partners made in a loop, for a substantial gain of time and DB queries.

Observed gain for a real data DB with 500 partners to print in the aged report:
time (ms)                  # queries
Before patch               4583                       1623
After patch                2932                        553
Gain                       1651 (36%)                 1070 (66%)

closes odoo/odoo#36488

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-05 14:08:55 +00:00
Sébastien Theys fec4e77a6c [IMP] website_blog: avoid searching all blogs twice
The same `search` was done twice in a row.

Part of task-2061122

closes odoo/odoo#36485

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-05 13:58:19 +00:00
jem-odoo be8731cc6a [IMP] hr_expense: posting flow in multi company environment
This commit tries to fix multi company problem in Expense application. Indeed, no check
were done to ensure this business flow. Some technical decisions were made:
- journal company: the journal define the company in which the accounting entries will be
created. We know ensure with 'domains' and constraints that the journal have the same
company as the expense sheet.
- journal conditionnally required: the journal is only required when posting the expense. It
is set by defaut on creation, but can be modify by accountant users. This is why the expense
company determine the journal and not the opposite.
- company fields required: As we need to use the company from the expense / expense sheet to
determine the journal field and since expense models are business models, we needed to put
company fields required.

Business Flow
When an employee creates an expense, the expense should be in its current company. A
product from any allowed company can be chosen. Only the taxes of the expense company are
applied to compute amounts. Then a report (sheet) can be created. We ensure that the expense
lines of a report belongs to the same company as the report and to the same employee. Once
submitted and approved by manager, the account journal can be set: it is forced to be in
the same company as the expense report. The accounting entries are created in the journal
(and expense report) company. As the analytic account can be shared (company is not set)
the analytic entries will be in the expense company (handle by the accounting module).
The payment is now registered in the expense company.

Migration
As company fields are now required, fill the company fields with the company of the related
employee, or fallback on the one from the journal.

Task-1999686

closes odoo/odoo#36447

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-09-05 07:48:32 +00:00
jem-odoo 14ec06e04a [IMP] account: multi company domain on product account fields
As we have to set account on product and product category to know in which
account generate some accounting entries in some business flow (e.i.: expense),
we need to keep some consistence with those accounts.
Since those fields are company dependent, meaning their value depends on the
current company, we want to ease the selection for the end user by only displaying
the relation available in the current company. To do so, specific domain are needed.
This guidelines should be applyied on each property fields.

Task-1999686
2019-09-05 07:48:32 +00:00
fleodoo 1a36d98e5f [ADD] crm_iap_lead_enrich: enrich leads based on email address
PURPOSE

Allow the user to enrich a lead based on the domain of the email address of
the client.

SPECIFICATIONS

Following fields will be populated if found using clearbit and if they are
not yet populated :

* description
* partner_name
* reveal_id
* website
* street, street2, zip, city, country_id, state_id
* phone (using the first number found in clearbit)
* mobile (using the second number found in clearbit, else the same as phone)

A message will also be logged in the chatter.

If no data is found using clearbit no credit is used and a message will be
logged. If the user has no credits he will be redirected to buy credits for
the service.

It is possible to enrich using the 'enrich' action in listview or with a
cron that will run every hour on leads not older than 1 hour.

Add a "Lead Enrichment" setting in CRM installing lead enrichment.

LINKS

Task 193185

closes odoo/odoo#36419

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-05 15:17:14 +00:00
Odoo's Mergebot e2c1226d91 [MERGE] website_{rating, slides}: Manage attachments in review update
PURPOSE

Allow to manage attachments when updating a frontend review.

SPECIFICATIONS

Currently when posting a review in eLearning or eCommerce one can attach
files to its review thanks for portal composer. Rating popup composer allow
to update its comment and rating. However this edit mode has two limitations.
It does not display attachments previously added and does not allow to add
attachments.

This merge fixes that by

* giving attachment values to the composer, allowing its display by the
composer display at startup;
* allowing to give new attachments and properly handle them in slides
route;

Uploaded and validated attachments cannot be removed by users. Indeed
message with attachments has probably already be sent to people and removing
attachments would lead to information loss.

LINKS

Task 2066600 (manage attachments)
Task 2058595 (eLearning v13 testing)

closes odoo/odoo#36409

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-05 18:25:43 +02:00
Louis Baudoux a64476635e [FIX] account: fix main_attachment_id not set on attachment upload
When creating invoices via the 'Upload' button, the
'message_main_attachment_id' field wasn't set on the record. This
happened because the message posted in the chatter was linked to the
wrong 'res_model' which prevented it from being selected as the main
attachment.

This was causing a bug in the OCR module ('account.invoice.extract')
where we use this field to determine which attachment must be sent to
the OCR server.

closes odoo/odoo#36309

Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
2019-09-05 11:22:36 +00:00
Olivier Colson 93fa283020 [FIX] account: don't set default taxes on exchange rate difference accounts
closes odoo/odoo#36332

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-05 10:01:57 +00:00
Andrea Ulliana 5eedaad33d [IMP] event: show total of reserved seats in list view
task-2066537

closes odoo/odoo#36417

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-05 08:59:58 +00:00
oco-odoo eeea511725 [FIX] account: only display "post" button of account.move when in draft state
closes odoo/odoo#36457

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-05 09:55:04 +00:00
Simon Lejeune c58341426f [FIX] hr_maintenance: falsy value in compute
closes odoo/odoo#36456

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-05 09:52:46 +00:00
wan 5112d04637 [FIX] account: prevent multiple event concurency
* When clicking on the partner m2o selection field before having clicked on the bank statement line, 2 events occured:
* the bank statement line expanded
* the partner selection showed

This could lead to unwanted behavior as the renderer could update
-> Stop the propagation of a click on .o_field_widget to prevent
flickering and possible update of the statement line widget

* Always recompute the create line as sometimes the value is not correct
when removing a proposition

closes odoo/odoo#36322

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-09-05 10:24:55 +00:00
Thibault Delavallée a08845d2a3 [IMP] website_{rating, slides}: allow to manage attachments when updating reviews
PURPOSE

Allow to manage attachments when updating a frontend review.

SPECIFICATIONS

Currently when posting a review in eLearning or eCommerce one can attach
files to its review thanks for portal composer. Rating popup composer allow
to update its comment and rating. However this edit mode has two limitations.
It does not display attachments previously added and does not allow to add
attachments.

This commit fixes that by

  * giving attachment values to the composer, allowing its display by the
    composer display at startup;
  * allowing to give new attachments and properly handle them in slides
    route;

Uploaded and validated attachments cannot be removed by users. Indeed
message with attachments has probably already be sent to people and removing
attachments would lead to information loss.

LINKS

Task 2066600 (manage attachments)
Task 2058595 (eLearning v13 testing)
2019-09-04 11:41:59 +00:00
Thibault Delavallée c076930863 [FIX] portal: allow portal discuss attachment css to be applied on popup composer
PURPOSE

Allow to manage attachments when updating a frontend review.

SPECIFICATIONS

Popup composer used notably in website_rating (eLearning, eCommerce) is not
instantiated inside a frontend chatter. It does not get all available CSS rules
as those are all set inside o_portal_chatter.

In this commit we move some CSS rules to allow using them in composer or chatter
independently of how they are instantiated.

LINKS

Task 2066600 (manage attachments)
Task 2058595 (eLearning v13 testing)
2019-09-04 11:41:47 +00:00
Thibault Delavallée bb197b1f87 [MOV] portal: split portal chatter from composer
PURPOSE

Allow to manage attachments when updating a frontend review.

SPECIFICATIONS

As those widgets grow it is better to have them in separate files in order to
better understand code organization. Future commits will improve composer
behavior, notably in attachments management.

LINKS

Task 2066600 (manage attachments)
Task 2058595 (eLearning v13 testing)
2019-09-04 11:41:47 +00:00
svs-odoo ee14dc0302 [FIX] purchase: units purchased product button
Before this commit, user got a traceback when he clicks on Units
Purchased button from product view form.
The issue was we asked to the purchase report to be based on a field who
doesn't exist anymore.
The fix only replaces `unit_quantity` for `qty_ordered`.

closes odoo/odoo#36342

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-02 14:13:11 +00:00
qdp-odoo b70803dc04 [IMP] account: usability of journal items tree view
shortened the full_reconcile_id column by re-labelling it 'Matching #'. Asked in 2049120

closes odoo/odoo#36445

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-05 07:48:44 +00:00
Aaron Bohy 5dd1457ccd [FIX] web: kanban: global click and 'image' widget
Let's assume a kanban view with oe_kanban_global_click className
(i.e. clicks on the card open the record in a form view), and an
image with the 'image' widget. This is for instance the case of the
hr.employee kanban view.

Before this rev., clicking on the image didn't open the record in
form view.

closes odoo/odoo#36321

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-09-04 14:41:06 +00:00
William Henrotin d1efc107dd [FIX] stock: missing move's scheduled date in picking view
closes odoo/odoo#36312

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-05 06:39:56 +00:00
Luis Torres f266eff7c4 [FIX] l10n_mx: Revert change that remove tax data
The tags in the tax are created for the Mexican taxes (IVA, ISR & IEPS)

This was assigned in the taxes on 3efefd2171,
but in the commit 333c22edd9
was removed from the tax 0%.

Now was returned that data, to be consistent with the tax for 16%

closes odoo/odoo#36206

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-03 15:08:33 +00:00
Luis Torres b050712afd [IMP] l10n_mx: completed tags for second level in CoA
When is used the option to get the CoA reports based on groups, is
necessary set the tag in each group, then, is necessary load the tags
for second level in the SAT catalog for accounts.
2019-09-03 15:08:33 +00:00
Humberto Arocha 4f524dbad6 [IMP] account: Adding Accounting Tags for Indirect Method Cash Flow 2019-09-03 15:08:33 +00:00
Yannick Tivisse e6d1d36283 [FIX] hr_holidays: Harmonize action button display between form/kanban
closes odoo/odoo#36367

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-05 07:43:16 +00:00
Yannick Tivisse 370ad6e326 [FIX] hr_holidays: Fix typo + untranslated error messages 2019-09-05 07:43:16 +00:00
Yannick Tivisse 106ee9688c [FIX] hr_holidays: Fix untranslated error messages 2019-09-05 07:43:16 +00:00
Yannick Tivisse 1eb9177bb4 [FIX] hr_holidays: Allow time off users to approve leaves 2019-09-05 07:43:16 +00:00
Yannick Tivisse d1d4364320 [FIX] hr_holidays: Only allow time off users to be time off type responsible
This could responsibility is designed for that kind of users.

Without that it could lead to inconsistencies during the time off
validation flow. (ir.rule errors, ...)
2019-09-05 07:34:33 +00:00
Kevin Baptiste 2df9d021e1 [FIX] base: Fix zoom on image fields
The goal of this commit is to adapt the zoom on image to the new names
of the fields made by PR #4865.

TaskID: 2049581
2019-09-05 07:34:33 +00:00
Aaron Bohy f60db9b93a [FIX] web: kanban: global click and 'image' widget
Let's assume a kanban view with oe_kanban_global_click className
(i.e. clicks on the card open the record in a form view), and an
image with the 'image' widget. This is for instance the case of the
hr.employee kanban view.

Before this rev., clicking on the image didn't open the record in
form view.
2019-09-05 07:34:33 +00:00
Christophe Monniez 95fefe6cc5 [FIX] web: avoid some external links in click_all test
Since 78565b1dc9 , two menus with an act_url action drive the user to
external websites. This makes the click_all test very fragile.

With this commit the Apps menus "Theme Store" and "Third-Party Apps" are
black-listed in the click_all test.

Also, it happens that a filter which is not supposed to work in some
circumstances is simply hidden. Actually, the click_all test sets that
filter and leads to  a crash.

With this commit, for a more realistic use case, the click_all test does
not activate hidden filters.

closes odoo/odoo#36433

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-09-04 13:33:15 +00:00
Gorash 35829f2031 [FIX] website: the rte tour was undeterministic
The tour try to click on the language dropdown before the reloading of the
page if the server is slow.
To fix it, we avoid the reloading by the rte, and trigger the reload
in '_reload' method of editor menu who add the class 'o_wait_reload'.
We add a selector and trigger in the test to avoid undeterministic error.

closes odoo/odoo#36098

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2019-09-04 14:45:31 +00:00
Alexandre Kühn 66a0836974 [FIX] mail: odoobot onboarding canned_response_ids
Before this commit, when user follows odoobot chat onboarding and
sends a canned response at the canned response step, odoobot did
not validate the message with the canned response.

This is caused by RPC `message_post` that filters out values that
are not message fields, such as `canned_response_ids`.

This commit fixes the issue by adding a non-stored field
`canned_response_ids` to `mail.message`. This requires the reverse
relation too, `message_ids` in `mail.shortcodes` (= the model for
canned responses).

Task-Id 2058455

closes odoo/odoo#36411

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-04 13:03:20 +00:00
Alexandre Kühn e7aff236b8 [FIX] mail: no message attachment delete in discuss and chat window
Delete attachment from message makes only sense from chatter.

Task-Id 2058455
2019-09-04 10:29:07 +00:00
Odoo's Mergebot 3ec676be00 [IMP] hw_*: Remove "Shell=True" in subrpocess calls
In the IoT Box, most calls to subprocess used "Shell=True", which can
cause security issues.

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

closes odoo/odoo#36088

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-04 17:07:59 +02:00
Odoo's Mergebot 24c93d3f7f [IMP] Customer Display as IoT Device
Linked to odoo/enterprise#5266

Move all the logic that was inside hw_screen into an IoT Driver
in order to have consistency between devices.
Move the configuration of screen_url from the IoT Box form to
the IoT Device.
If an URL different than the default one is used, refresh the
page every minute.

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

closes odoo/odoo#36074

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-04 17:07:43 +02:00
Antoine Prieels 6cf30cb869 [IMP] hw_*: Remove "Shell=True" in subrpocess calls
In the IoT Box, most calls to subprocess used "Shell=True", which can
cause security issues.

TaskID: 1966417
2019-09-04 13:10:03 +00:00
Antoine Prieels 70006311d0 [IMP] hw_drivers, hw_posbox_homepage: get_ssid helper
Create a helper to get the ssid of the wifi to which the Box is
connected.
2019-09-04 13:10:03 +00:00
Antoine Prieels 5d0afddaf2 [FIX] point_of_sale: Too many display updates
Multiple updates were sent to the customer display for each
modification of the order lines.
2019-09-04 13:08:12 +00:00
Antoine Prieels c03d33b64a [IMP] point_of_sale: No new tab on url change
Change Firefox config to open external links in the active tab.
This avoids having multiple running tabs when changing the URL
showing on the Display device.
2019-09-04 13:08:12 +00:00
Antoine Prieels 98bebfbfa5 [IMP] point_of_sale: Per device screen_url
The screen URL is not linked to the Box anymore but to the Device.
We don't need to fetch a screen_url at the boot, it'll be done inside
each device.

TaskID: 1893493
2019-09-04 13:08:12 +00:00
Antoine Prieels f03026a3d7 [REF] hw_{drivers,screen}: Convert hw_screen into an IoT Driver
Move all the logic that was inside hw_screen into an IoT Driver
in order to have consistency between devices.

TaskID: 1933834
2019-09-04 13:08:10 +00:00
Antoine Prieels 75020a74e5 [REM] hw_posbox_homepage, hw_screen: remove unused code
Function get_hw_screen_message was still present but not called since commit 8b957b7e85
2019-09-04 13:07:35 +00:00
qdp-odoo f75fc4ed63 [FIX] account: journal items tree view not editable
Task 2008956

closes odoo/odoo#36205

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-04 09:00:03 +00:00
qdp-odoo 1b91747d05 [FIX] account: fixed view_mode on specialized journal items tree view
removed form,kanban from view_mode on specialized journal items tree views

Task 2008956
2019-09-04 09:00:03 +00:00