Commit Graph
118753 Commits
Author SHA1 Message Date
Priyanka Kakadiya 66b44a5d8a [FIX] mail: auto-focus input on open thread in Discuss (touch and non-mobile devices).
Before this commit, when opening a discuss thread with a touch device that is
not mobile (e.g. laptop with a touchscreen), the focus was not set on the input
automatically.

The intent behaviour is to auto-set the focus on non-mobile device including
touch devices. This commit fixes this issue for touch and non-mobile devices.

Task-ID 1838244
2018-07-24 13:10:48 +02:00
Xavier Morel a56372a4ca [FIX] various broken JS docstrings
Resulting in sphinx warnings or ill-formatted doc all the way to the
doc not building at all.
2018-07-24 12:06:13 +02:00
Hetashree Chauhan 26fbf93387 [IMP] repair: display product description on repair line and repair fee
PURPOSE
=======

All quotations should look the same, no matter if they are made in sales app or repair app to avoid to confuse the users.
From ticket : https://www.odoo.com/web#id=1833072&view_type=form&model=project.task&menu_id=

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

Minor refinement for repair quotations, show the product description, like in normal quotations, when printing the quotation from a repair order

This commit is related to task : 1834225
2018-07-23 18:37:28 +02:00
Yannick Tivisse d00ff6187a [IMP] stock, product_expiry: Improve the traceability of the products
PURPOSE
=======

Improve the traceability of the products.

1. If you have an issue with a serial or lot number, you want to easily find from which supplier it's coming and to which customer it has been delivered, to contact them in case of problem.

2. We have the possibility to define expiration dates on products but the users are not informed when this date is reached. Now we can easily inform them with the next activities.

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

1. Locate precisely a SN/LN (find to which customer it has been delivered and from which supplier it's coming from)
Add fields "Purchase Orders" and "Sale Orders" (must be a many2many) and displays PO's and SO's related to this LN/SN.

2. Log a next activity for the product responsible when expiration date is reached for a product [OK]
- Check the alert_date on the stock.production.lot, if the date is in the past or today, log a next activity on the stock.production.lot
- Assigned to = the product responsible
- Due date = today
- Activity = Alert Date Reached
- Text = The alert date has been reached for this lot/serial number.
- Raise a next activity only for products that are still in stock = that are in a location of type internal.
- This cron checking the alert dates should be added in the existing scheduler cron
- The next activity is only create one time for the each lot. If a next activity has already be create for this lot previously, next activity will not be create again.
2018-07-23 15:58:12 +02:00
Nicolas Vannieuwerburgh edbf129372 [IMP] product_expiry: Schedule an activity on lots when expiration date is reached 2018-07-23 15:57:02 +02:00
Nicolas Vannieuwerburgh 86448be319 [IMP] purchase_stock: Compute the related purchase orders on production lots
Add a computed field on a stock.production.lot to retrieve all the purchase
orders coming from a done stock.move.line if the stock.move is also
done and if the destination usage is 'supplier'.
2018-07-23 15:57:02 +02:00
Nicolas Vannieuwerburgh cfd3e6b369 [IMP] sale_stock: Compute the related sales orders on production lots
Add a computed field on a stock.production.lot to retrieve all the sales
orders coming from a done stock.move.line if the stock.move is also
done and if the destination usage is 'customer'.
2018-07-23 15:57:02 +02:00
qsm-odoo 946189eeff [FIX] base: onboarding assets should at least use backend helpers
See task-60668
2018-07-23 14:49:57 +02:00
Kishan Gajjar 7fa1525921 [FIX] web: correctly render "font awesome" icons on buttons
Revision on https://github.com/odoo/odoo/commit/9de1bc0

From the commit above, the style of some field binary images are broken.
This is due to changes from `<span>` to `<button>`. The style has been
altered by the default browser's style, which does the following on
Google Chrome:

```
    border-color: white;
    border: 1px solid;
    padding: 1px 7px 2px;
```

Most browsers set a border and some padding on buttons. This commit fixes
the style specifically for "font awesome" icons on buttons, by removing
the border and by overwriting the padding.

Tested browsers:

  - Google Chrome 67
  - Mozilla Firefox 61
  - Safari 11

Task-ID 1864027

Closes #25691
2018-07-23 13:34:33 +02:00
Laurent Smet 93cacd5e59 [FIX] account: improve security in reports and in account's query_get()
* privatize the get_report_values() method
* check read access rights and ir.rules in _query_get() from account module

Was task 36590
Was PR #25822
2018-07-23 12:21:06 +02:00
Laurent Smet 6ea300498f [REF] account, stock_landed_costs: use AssertRecordValues in tests
Was task: 1856976
Was PR #25893
2018-07-23 11:50:35 +02:00
Laurent Smet 45cde5ff38 [IMP] tests: added assertRecordValues() in BaseCase
This method will help to compare a recordset with their expected values, in the form of a list of dict

Was task: 1856976
Was PR #25129
2018-07-23 11:13:39 +02:00
Prakash Prajapati 6391e0044e [FIX] mail: expand/collapse planned activities in chatter
Before this commit, when the user clicks on the chatter category
"Planned activities", the user is redirected to the home menu.

The "Planned activities" category in the chatter is only visible when
there is at least one planned activity on the record.

The intended behaviour is to expand/collapse the planned activites on
the chatter. This commit fixes this issue.

Task-ID 1864452
2018-07-23 10:34:21 +02:00
XavierDo 18b24e8a22 [FIX] mail: add missing license 2018-07-20 17:26:52 +02:00
Yannick Tivisse e547fa0710 [MERGE] account,(website_)sale: Add onboarding configuration panels
Purpose
=======

Ease the configuration of the main applications by adding configuration panels on the main views,
i.e. on the customer invoices, quotations and ecommerce dashboard. This panels are composed by steps
to configure the company data, the report layout and templates, the payment acquirers,...

Specification
=============

Invoicing Application
---------------------

The gist of the task is to add a config bar for invoicing app. After going through the config step, the system should be all set to send real invoices

Mockup: https://app.moqups.com/fgi@openerp.com/qhrp1ZJB1i/view

1. Configuration bar
- The current onboarding modal should not pop up when the user clicks on "Print Invoice" anymore: https://drive.google.com/a/odoo.com/file/d/1xMin8lBB3guDOlIQaGCnLrBKKl5nbA-9/view?usp=drivesdk
- Add the following configuration bar between the top menu and the list of Customer Invoices
- This bar can only be viewed with "administration - settings" access rights.
- Each part of the bar opens a corresponding modal (defined below).
- Once information is saved on the modal, a green checksign appears next to it on the configuration bar. The user can still open the modal and modify information afterwards.
- Add a grey cross on the top right side of the bar. Clicking on it removes definitely the bar.
- The bar has to stay as long as the user has not clicked on the grey cross.

config bar design branch: https://www.odoo.com/web#id=1835748&view_type=form&model=project.task&action=333&active_id=133&menu_id=4720

2. Company Data
Do the following changes to the current company form:
- hide company logo in the modal (will be shown next step). But keep it visible in the company full form
- remove "Report Footer", "Company tagline", "Verify VAT  Number" https://drive.google.com/a/odoo.com/file/d/1CrGoY_sH4wsTHuu6Zggilo6qOzWb0oCW/view?usp=drivesdk
- remove tabs: https://drive.google.com/a/odoo.com/file/d/1X7EglwY5zHmJtR4Xafnkm9uBX6TlcJsB/view?usp=drivesdk
- mark this step as done if street 1 is filled

3. Invoice Template
new screen to choose a report template, set a logo, etc.
- Use the default logo used in demo data as new default image for any new company. See for reference : http://nimb.ws/1TFn8O
- add "company tagline" and "document footer" (removed from company form)
- open this screen in general settings: https://drive.google.com/a/odoo.com/file/d/1hP5CW7-MPXre8r8Ex-KKSomVaef932qV/view?usp=drivesdk
- mark as done if logo is set.

4. Payment Method
- Activate the payment acquirer selected, and set in production mode (if paypal or stripe)
- For manual payment, rename "Wire Transfer" payment acquirer into the name provider by the user
- if any payment method selected, activate "Online Payment" in invoicing settings: https://drive.google.com/a/odoo.com/file/d/1Vy6os1eDznumOyR80Q2nFctzQ7S2PvYN/view?usp=drivesdk
- otherwise the customer will not be prompted to pay online.
- mark as done if any method is selected or if "Skip this step" is clicked.

5. Sample Invoice - Send a sample draft invoice to user email address
- Open the email composer modal with invoice's email template (like clicking "Send by email" in the invoice), do the following changes:
- Hide the template field and the "save as new template" button.
- Generate & delete direclty the sample draft invoice to be sent when clicking the config bar step. The user should never see this invoice appear in the invoice list
- Generate the invoice with following information:
    - put the admin as customer.
    - for the Invoice Lines : do not enter any Product. Add a 2-3 Descriptions, with a Quantity and a Unit price.
    - the Invoice has to stay in draft and should not appear in the Customer Invoices list.
- Allow to open portal view of this sample invoice from the email sent (as any other invoice) / if complex, to check with AL
- mark as done when the email is sent.

Sale Application
================

help users configure the system in order to send the first quotation to a customer

mockup: https://app.moqups.com/fgi@openerp.com/rP8gOb077Y/view

remove current mechanism of company data completion when clicking Print button in the quotation form (e.g. with company logo not set).
Signature: if Yes, activate the option in sales settings https://drive.google.com/a/odoo.com/file/d/1IoHn_3b4BbevKqdVajBWysn_jamQ1tAA/view?usp=drivesdk
Payment: activate the option in sales settings + activate the selected payment acquirer
background image: https://drive.google.com/a/odoo.com/file/d/1LXRrslRBEo8ma_1dFH8nTTlhiE1uPa-Z/view?usp=drivesdk
see in https://projects.invisionapp.com/share/2MGSJ30H53F#/screens/290568105

Ecommerce Application
=====================

help users go through all the config steps needed to start selling

Add the bar in the ecommerce dashboard: https://drive.google.com/a/odoo.com/file/d/1NmFJXjYZXN2KdZ9Fv19cPqyq1v-1ehiJ/view?usp=drivesdk
steps to implement:
Theme (checked if a theme is installed)
allow the user to change theme. When installing a new theme, uninstall any other theme installed (uninstall theme_common? what about community themes that don't use theme common?)
Company Data
[for eCommerce only] Payment Method (same screen than in invoices)
Domain Name (set a custom domain name, only for saas users) -> display the domain config modal used in https://accounts.odoo.com/my/databases/manage: https://drive.google.com/a/odoo.com/file/d/1K_AYHJGHWBb2g08vq6ICDc2BHhErb5HI/view?usp=drivesdk

Accounting Application
======================

Transform old config bar to new style config bar
2018-07-20 12:00:35 +02:00
eco-odoo 19775de261 [ADD] website_sale: onboarding steps
Add new onboarding steps: payment and theme selector. There are
initially used on the website_sale_dashboard onboarding panel.

task: 38876
2018-07-20 11:59:13 +02:00
eco-odoo 6671d3d72b [IMP] account: convert dashboard onboarding to new design
Convert the current design of the account dashboard setup bar in order to uniformize the design of the onboarding panels.

task: 1858542
2018-07-20 11:59:13 +02:00
eco-odoo f5a58effdd [ADD] sale: add onboarding panel for quotations
Help users configure the system in order to send the first quotation to a customer.
This panel appears above the sale quotations list.

task: 1839195
2018-07-20 11:59:12 +02:00
eco-odoo 15f498ebbd [IMP] sale: disable logo check before printing
When the logo was not set and you tried to print a quotation, a modal form opened and offered you to edit the company data. You then had to save, close the modal and retry to print.
Now the quotation is printed without the logo.
2018-07-20 11:59:12 +02:00
eco-odoo d1ec3306b8 [ADD] account: onboarding panel for invoicing
Add an onboarding panel for invoicing, it appears above the invoice
list.
After going through the steps the system should be all set to send real invoices.

In the payment module, add a payment acquirer step and add it to the invoice onboarding panel.

task: 60668
2018-07-20 11:59:12 +02:00
eco-odoo 9744fecd05 [IMP] base: add support for onboarding
Add a base template file, html and stylesheet for the onboarding banners.
Add a step for company onboarding.

task: 60668
2018-07-20 11:59:12 +02:00
eco-odoo 872cf9160d [FIX] web: controller update now waits for _update to resolve
Before this, the deffered returned by _update was not taken into
account.
2018-07-20 11:59:12 +02:00
eco-odoo c1498ff36b [IMP] web: add option to display a banner above a view
Add a banner_route attribute to AbstractView to allow fetching html from a
controller route and displaying it above the view.

The initial use case was the onboarding panels.

Supported views are the ones inheriting both AbstractView and AbstractController.
2018-07-20 11:59:12 +02:00
eco-odoo 0dd6a0b2bf [IMP] web: core: ajax: loadCSS now returns a promise
It is useful to know when the stylesheet has been loaded in order to prevent displaying unstyled content.

CalendarView and the dashboard_graph widget (JournalDashboardGraph) use loadCSS through cssLibs / loadLibs so the tests now have to use createAsyncView instead of createView.
2018-07-20 11:59:12 +02:00
eco-odoo 7c6bc684a9 [IMP] base: some cleaning in general settings
Use a new view to choose the document template.
Remove layout fields from base company form.
Reword Edit Header -> Edit Layout
Set a default logo for a new company in data instead of demo data

task: 60668
2018-07-20 11:59:12 +02:00
Xavier Morel b67209b001 [FIX] : and / are not safe in content-attachment filename
Browsers accept it as they are wont to do, but the Content-Disposition
lib (introduced in 35d452cffb) does
not. Simply don't mark them as safe when %-escaping the filename so
they do get %-escaped properly.

RFC5987 states

ext-parameter = parmname "*" LWSP "=" LWSP ext-value
ext-value     = charset  "'" [ language ] "'" value-chars
value-chars   = *( pct-encoded / attr-char )
attr-char     = ALPHA / DIGIT
              / "!" / "#" / "$" / "&" / "+" / "-" / "."
              / "^" / "_" / "`" / "|" / "~"
              ; token except ( "*" / "'" / "%" )

Neither : nor / are in attr-char. This is further confirmed by
checking out RFC2616:

CTL            = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
token          = 1*<any CHAR except CTLs or separators>
separators     = "(" | ")" | "<" | ">" | "@"
               | "," | ";" | ":" | "\" | <">
               | "/" | "[" | "]" | "?" | "="
               | "{" | "}" | SP | HT

Here we can see "/" and ":" are both in "separators", which are
specifically *not* in token. attr-char restricts token further, so an
invalid token char can't be a valid attr-char.
2018-07-20 11:36:31 +02:00
Deep Patel 5ef8300cdd [ADD] web_unsplash: Find free high-resolution images from Unsplash
This commit:
1. Adds settings to install the new `web_unsplash` enterprise module.
   See counterpart commit on enterprise for details.
2. Export `ImageWidget` and `update_control_panel` to be able to override them.
3. Add the unsplash access key rights to website designer. (see related OE
   commit)

task-35060
Closes #25825, closes #25637
2018-07-20 10:16:59 +02:00
Thibault Delavallée 624d75ca94 [IMP] mail: store activity creator on activity record
Currently due to technical reasons all activities are created using the
superuser. It means we have no idea who created an activity. This
commit fixes that by adding a field used to store the activity creator.
It is also displayed in the vignette displayed in chatter giving details
on the activity.

This commit is related to task ID 1865557. Closes PR #25842.
2018-07-19 17:22:18 +02:00
Thibault Delavallée 513fac6230 [MERGE] mail, various: do not display 'Pay Now' in payment emails
Several addons (account, sale, purchase) use specific 'send by email'
templates to send the invoice / SO / PO to the customer as well as
holding a view / payment button.

Purpose is to separate the template content (payment information) from the
payment button (Pay and sign online) when sending those documents by
email. Composer and chatter should not hold the button. It should be added
only in notifications emails.

Technical solution is to move the button into the notification template.
Model template holds the content (document and text) and notification
template holds the payment button.

This merge is related to task ID 1860049 and closes PR #25824.
2018-07-19 17:16:28 +02:00
Thibault Delavallée a2403b0695 [REF] purchase: clean send by email templates
Purpose

 * use the new notification template allowing to display the payment button
   only in emails;
 * reorder the fields definition to ease the reading;
 * slightly clean the email body using a maximum of div and br tags as it
   seems better integrated with Odoo edition capabilities;

This commit is linked to task ID 1860049 and PR #25824.
2018-07-19 17:14:33 +02:00
Thibault Delavallée 14a3fd6018 [REF] account: clean send by email template
Purpose

 * use the new notification template allowing to display the payment button
   only in emails;
 * reorder the fields definition to ease the reading;
 * slightly clean the email body using a maximum of div and br tags as it
   seems better integrated with Odoo edition capabilities;

This commit is linked to task ID 1860049 and PR #25824.
2018-07-19 17:14:33 +02:00
Thibault Delavallée bc79f92481 [REF] sale: clean send by email template
Purpose

 * use the new notification template allowing to display the payment button
   only in emails;
 * reorder the fields definition to ease the reading;
 * slightly clean the email body using a maximum of div and br tags as it
   seems better integrated with Odoo edition capabilities;

This commit is linked to task ID 1860049 and PR #25824.
2018-07-19 17:14:33 +02:00
Pierre Masereel 28eb461242 [IMP] purchase_requisition: validate demo data purchase tender
In the demo data, some requests for quotations are linked to the demo
purchase tender, but this one is in draft state. It is inconsistent with
what can be done in odoo, because draft purchase tender never generate
requests for quotation.

TASK-ID 1864372
2018-07-19 17:12:29 +02:00
Thibault Delavallée 3da7340bf5 [IMP] mail: add a new payment-specific notification template
This commit introduces a new notification template. Its target is to be used
when sending payment-based templates like 'Send by email' for sale orders,
invoices or purchase orders.

Purpose is to separate the template content (payment information) from the
payment button (Pay and sign online) when sending those documents by
email. Composer and chatter should not hold the button. It should be added
only in notifications emails.

Technical solution is to have a somewhat-generic template available in mail
to be used in some specific actions. Another solution is to hide the
button but it breaks if people edit or remove the hidden content when
editing the mail in the composer without knowing it. As the button is
mandatory in those actions we choose to have it added by the notification
email.

Future commits will gradually use this template in some addons.

This commit is linked to task ID 1860049 and PR #25824.
2018-07-19 17:05:20 +02:00
Thibault Delavallée dd72fef73f [IMP] base: do not format email for partners not having email
Currently if a partner has a void email, its email_formatted field holds
a value like "Raoul Grosbedon <False>" which is quite rarely considered
as a valid email address.

Minimal fix for this field is to return a void value if there is no email.
Having a void return is easier to manipulate for callers in order to
handle it.

This commit is linked to task ID 1860049 and PR #25824.
2018-07-19 17:05:20 +02:00
Christophe Simonis 49f634e472 [MERGE] forward port branch saas-11.4 up to 1f7a39964b 2018-07-19 16:36:03 +02:00
Rémi Rahir 4cb9194275 [ADD] snailmail: new iap module to send letters by post 2018-07-19 15:54:00 +02:00
Rémi Rahir 01efffc472 [FIX] iap: fix url generation
Added missing part of the default url in get_credits_url
introduced in af2f12b136
2018-07-19 15:54:00 +02:00
Christophe Simonis 1f7a39964b [MERGE] forward port branch saas-11.3 up to 0c42dcfc22 2018-07-19 15:36:54 +02:00
Rishabh Jadia b942a5c131 [IMP] product, stock: hide qty_on_hand and forcasted on views
Hide value of the column when the product is consumable or service in
tree views.

TASK-ID: 1864329
2018-07-19 15:15:23 +02:00
Arnold Moyaux 202b0515c8 [FIX] purchase_stock: post init hook for warehouses rules 2018-07-19 14:43:08 +02:00
Darshil Trivedi 827958a890 [REF] stock: rename procurement.rule to stock.rule
This commit is related to task ID 1852969.
2018-07-19 14:43:08 +02:00
Arnold Moyaux c93ae01986 [MOV] stock, mrp, purchase_stock: rename procurement in stock_rule
Procurement rule do not reflect reality anymore since it is common for
push and pull rules. We decide to rename it stock rule instead.
2018-07-19 14:43:08 +02:00
Darshil Trivedi a35df8d371 [IMP] stock: merge push and pull rules
Usability improvement:
- Common view for push and pull rules
- Add an help text in order to describe the rule
- Rules menu
- Warehouse checked by default on route created by a warehouse
- Lower the MTO route sequence in order to take it first.
- Tooltip cleaning

Technical improvement:
The purpose of this task was also to merge stock.location.path(push rule) and
procrement.rule. Those two model were design to execute the same task
but in a different direction. Thus it contains duplicate code.

Task ID 1852969.
2018-07-19 14:43:08 +02:00
Christophe Simonis 0c42dcfc22 [FIX] board: adapt test. 2018-07-19 14:32:26 +02:00
Laurent Smet 02ccb58401 [IMP] l10n_nl: improve tax report/tags
Improvement in tax report
Make the distinction between services and products

Was task: 35554
Was PR #23439
2018-07-19 14:30:55 +02:00
Alexandre Kühn 766df6de29 [MERGE] mail, *: several improvements and bug fixes (JS)
*: im_livechat, im_support, website_livechat

Improvement on top of this commit: https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c

=============
Improvements:
=============

1. New thread models "abstract threads" and "website livechat"

    new modeling:

                        0..1   0..1
    AbstractThreadWindow <-----+
                               |--->  Abstract Thread
         AbstractMessage <-----+       /      \
                         *     *      /        \
                                     /          \
                                  Thread     Website Livechat
                                   /  \
                                  /    \
                                 /      \
                  Thread With Cache     Document Thread
                   /      |       \
                  /       |        \
            Mailbox    Channel    Support Channel
                          |
                          |
                          DM

  - Thread is used in the backend, while Website Livechat is used in the frontend.
  - The main distinction is that Thread relies on mail_manager, while Website Livechat doesn't.

2. Thread widget has its file renamed (from thread.js to thread_widget.js)
3. Most templates in thread.xml now handles Abstract thread

==========
Bug fixes:
==========

1. [FIX] Mail failures from channels were not grouped together.
2. [FIX] Channel names in the discuss sidebar were displaying their escaped representation.
3. [FIX] Thread was rendered several times when receiving a new message.

=======
Others:
=======

1. Removed unused code.
2. Fixed some classnames and corresponding style.
2018-07-19 14:02:53 +02:00
Alexandre Kühn d7741c7c55 [FIX] im_support, mail: correct style and classname
The style for preview info in the systray were incorrect.
Also, mailbox had the old classname ('o_channel_name'), instead of the new one ('o_thread_name')
2018-07-19 14:01:58 +02:00
Alexandre Kühn a5be128bb1 [REMOVE] mail: fix from forward-port
`documentModel` is already declared and assigned the same value, so this
part is not necessary inside this conditional branch.
2018-07-19 14:01:58 +02:00
Alexandre Kühn 4bcfcb9aa4 [FIX] mail: unescape channel name in discuss sidebar
When the user creates a channel by providing a name, the name is escaped
in order to avoid XSS attacks. As a result, the logic make use of escaped
string, which may be different from the provided string by the user.

As a result, if we do not unescape the string when necessary, the user may
see the escaped version. For instance, if we creates a channel named 'R&D',
it may display 'R&amp;D' to the user.

This commit plays safe by still keeping the handling of channel names in
their escaped form, but unescape it just before displaying it on the sidebar
of the Discuss app to the user.
2018-07-19 14:01:58 +02:00