Commit Graph
126133 Commits
Author SHA1 Message Date
Ivan Yelizariev 5cecd0a197 [FIX] web_editor: restore website context for assets editor
The assets editor controller was stripped of the website context with
https://github.com/odoo/odoo/commit/198673bf35f14e3a797d2ff09208a289e12bec4e

It was however needed by some client customizations.
2018-06-26 12:58:00 +02:00
Christophe Simonis c9a01ab30a [MERGE] forward port branch 10.0 up to 58c92d9374 2018-06-26 12:57:31 +02:00
Christophe Simonis 58c92d9374 [MERGE] forward port branch 9.0 up to 22084bc52e 2018-06-26 12:27:30 +02:00
XavierDo 3ea85a603e [FIX] mail: fix forwardport mistake
A part of the code was unreachable after merging forwardport.

Closes #25477
2018-06-26 11:58:59 +02:00
Nicolas Lempereur fadb3e155e [FIX] addons: no unsubscribe for unsubscribed
The `/groups` route display mail.channel and allow:

- a public user to subscribe specifying a mail address
- a logged in user to subscribe/unsubscribe itself

The `/groups?unsubscribe` route is the same but only allow:

- a public user to unsubscribe specifying a mail address
- a logged in user to unsubscribe itself

When a user is logged in, there is the oddity that all mail.channel
appear as to "unsubscribe" even if the user is not subscribed.

With this commit, the unsubscribe is shown only if user is subscribed.

opw-1861208
closes #25439
2018-06-26 11:37:57 +02:00
Martin Trigaux 8d9c9aa516 [REM] note: bad translation file
Remove fr_BE translation file
This file contains a duplicated translation for "Stages of Notes"
Moreover the fr_BE.po file is supposed to contains only translation that are
specific for French from Belgium and different than "standard" French

Bug revealed at cb00803473
2018-06-26 10:53:43 +02:00
len-odoo f28875b1b7 [FIX] crm: make the force assignation field visible in wizard
Commit: https://github.com/odoo/odoo/commit/83a4374
Introduced a parameter force_assignation to choose to overwrite the salesman
when converting a lead to an opportunity.
However the field had never been made visible in the wizard view.

opw 1859447
2018-06-26 10:39:26 +02:00
len-odoo d7f5a1b25e [FIX] delivery, sale, sale_order_dates: ignore delivery line in commitment date computation
The commitment date is computed using every line from the sale order.
When the picking policy is set to direct, it takes the earliest date
among the sums of the order date and lead time.
However when the delivery is set, is adds a line with an order date of 'now' and
no lead time.
This date thus necessarily becomes the commitment date, bypassing what was
intended by setting a lead times on products.

We simply ignore delivery lines in this computation.

opw 1855646
2018-06-26 10:35:57 +02:00
Nicolas Martinelli 2254b5cf1c [FIX] base: default value in set_multi
Make sure to test `None` instead of any falsy value. Indeed, when we
want to explicitly pass a `False` default value, `set_multi` might
select an incorrect default value.

This is for example the case of `_inverse_product_pricelist`, where
`default_for_country` might be `False` on purpose.

opw-1858271
2018-06-26 09:46:53 +02:00
Damien Bouvy eb67d83016 [FIX] base: missing sudo in partner merge
When reassigning the company from the destination partner, most users
don't have enough rights to update companies on partners with registered
users; hence the sudo call.
2018-06-25 17:39:45 +02:00
Toufik Benjaa 542409a1b6 [FIX] payment_stripe: If exception occurs display the message
- The code to display the exception message was not working.
2018-06-25 16:21:17 +02:00
Josse Colpaert 70ddff760f [FIX] stock: when creating a procurement from a stock move, pass the date_expected as date
Before, when we created a picking manually with MTO+buy products,
put a scheduled date in the future and did "mark as todo", the
date on the po was related to now instead of that schedule date.

The scheduled date of the picking was passed to the date_expected
of the move, but not to the date of the move, which was passed to
the date_planned of the created procurement.  By passing the
date_expected instead of the date of the stock_move to the
date_planned of the procurement, the po will have dates in function
of the scheduled date of the picking.

Courtesy of chienandalu.  Closes #25223
2018-06-25 15:38:23 +02:00
Josse Colpaert d4582cf020 [FIX] purchase: no mrp fields in purchase please
Fields of mrp should not be put in purchase like this,
as it can throw a traceback e.g. if you generate a purchase
based on a picking in MTO.
2018-06-25 15:38:23 +02:00
jem-odoo 8346461634 [FIX] sale: SO line autocreation for vendor bill only
On a sale order, when adding a line with an expensable product with a
reinvoice policy, on the linked invoiced validation, the analytic entries
are created. During this creation, the line will be reinvoiced, so a second
SO line will appears with the same product.
This should not happen, as the SO line creation from an AAL should be done
only when the amount is negative (meaning it comes from an expense or a
vendor bill).
This was introduced in 3bf8a62e0d.
2018-06-25 15:31:07 +02:00
Nicolas Martinelli 752347cdef [FIX] website_sale_options: prevent double-click
- On the eCommerce, open a product
- Click twice on 'Add to Cart'

The modal is opened twice, with potentially multiple SO created.

opw-1858080
2018-06-25 14:50:33 +02:00
jem-odoo 884fe14235 [FIX] sale_timesheet: prevent CRUD from plan project for SO/INV
When coming from the project overview throught the sale orders, or
invoices stat buttons, creating the object will not linked it to
the project. This might confuse the users. The CRUD operation should
be prevent from there, as this is reporting.
2018-06-25 14:29:26 +02:00
jem-odoo efce9e4a14 [FIX] sale_timesheet: create SO from project label and domain
We want to allow use to set any services when making
a project billable. This commit also changes the
label for a better understanding.
2018-06-25 14:29:26 +02:00
jem-odoo ac294b25af [FIX] sale_timesheet: expense reinvoiced at cost in plan project
When reinvoice an expensable product at cost, it should
takes the amount on the analytic lines created when posting
expenses, instead of the cost on the product.
For instance, you create an expense with the generic expense
product (for a lunch, for instance). The cost of the generic
product is zero, but you don't want to see that amount in
your project plan, and we don't want to create a product
per "lunch expense".
2018-06-25 14:29:26 +02:00
William Henrotin 9d4a811bea [FIX] stock: same label on stock move line
previous commit
(https://github.com/odoo/odoo/commit/325c02775e06aee116657cb9920cbe38d68d8ef0)
set a the same label on stock_move_line.lot_id and
stock_move_line.lot_name.

This commit set two different labels
2018-06-25 13:35:29 +02:00
sri-odoo 99cdd48dc7 [IMP] account: reconciliation design, layout adjustments 2018-06-25 13:29:35 +02:00
Yannick Tivisse 914d5da44a [FIX] account: Apply correctly attrs on label instead of displaying it
With the courtesy of seb-odoo.
2018-06-25 13:08:29 +02:00
Nicolas Lempereur 8188e6c802 [FIX] project: default on email as suggested recipient
With 82ca3d3f in 11.0 it was possible to have an email address on a
task, without specifying a partner.

Because of a small issue, this address was not suggested as a possible
recipients like it was in a project.issue object.

opw-1858170
closes #25427
2018-06-25 12:30:45 +02:00
William Henrotin 325c02775e [FIX] stock: correct lot label
In the stock move line form view, the field lot_id had 'Lot' as
label.This commit change it by 'Lot/Serial Number'. It remove the
fieldlot_name too which is useless next to lot_id.
2018-06-25 11:46:31 +02:00
William Henrotin 5ba5bae22d [FIX] mrp: correct column name
In the 'Produce' wizard showed on manufacturing order. The column lot_id
had 'Lot' as label.
This commit change it by 'Lot/Serial Number'
2018-06-25 11:12:34 +02:00
Martin Trigaux cb00803473 [I18N] export saas-11.3 translations
To odoo-master Transifex project
2018-06-25 10:33:05 +02:00
Olivier Dony 6c9176652f [IMP] res.partner: improve error message when changing company 2018-06-25 09:59:00 +02:00
William Henrotin 85f8e4761b [FIX] uom: useless constrain on purchase UoM
The purchase UoM doesn't interfere with account move line at all so we
can remove this check.

Task id: 1844684
2018-06-25 09:20:55 +02:00
William Henrotin 74737865d5 [FIX] stock: block changing location usage if reserved moves
This commit block users to change the location usage (or set it as scrap
location) if there are moves starting from this location.
This commit ensure the stock management will remain consitent.

Task id : 1844684
2018-06-25 09:20:55 +02:00
William Henrotin 850bb6cae4 [FIX] stock: block updating uom factor if reserved moves.
This commit block users to change unit of measure factor. if there are
reserved move on product using this UoM. This will allow the quantities
to be correctly unreserved when the stock move will be confirmed.

Task id : 1844684
2018-06-25 09:20:55 +02:00
Lucas Perais (lpe) 786c044a39 [FIX] pos_restaurant: don't crash when printer have no url set
Have a printer in a pos.config that doesn't have a url set

Open the pos

Before this commit, there was a JS traceback, since we tried to call
string operation on undefined.

After this commit, we avoid the traceback with a behavior that *looks like* the v9.0's
i.e. we don't care if the url actually means something, we put a message in the console though

OPW 1858063

closes #25442
2018-06-25 09:15:12 +02:00
Nicolas Martinelli f89d4201c7 [FIX] sale: default invoicing policy
The default invoicing policy setting is not compatible with the logic
implemented in a222afb7d4.

opw-1860867
2018-06-25 09:14:30 +02:00
Christophe Matthieu 8e9936ba04 [FIX] sale: test depend of another module
It may crash when we install only the sale module

backport 513dca4726 from v11
closes #25437
2018-06-25 09:10:06 +02:00
Nicolas Martinelli 2e4a75cbee [FIX] auth_signup: do not send email to duplicated user
When duplicating a user, an email was sent to a user at the email of the
previous user (as the create is called before changing the email).

opw-1853359
2018-06-25 08:37:24 +02:00
Nicolas Martinelli 39f08950d6 [FIX] web: disable Save button
When hitting the 'Save' button, buttons should be properly disabled
until the record is reloaded.

opw-1859027
2018-06-25 08:29:25 +02:00
Odoo Translation Bot eef2426c10 [I18N] Update translation terms from Transifex 2018-06-24 07:04:15 +02:00
Odoo Translation Bot f9737d79e7 [I18N] Update translation terms from Transifex 2018-06-24 04:09:30 +02:00
Odoo Translation Bot 268357bf15 [I18N] Update translation terms from Transifex 2018-06-24 00:25:09 +02:00
Olivier Dony bf9a4663ff [IMP] mail: improve UI text in mail resend wizard 2018-06-23 03:12:05 +02:00
Olivier Dony cab349e7e4 [FIX] mail: access related fields for resend as normal user 2018-06-23 03:12:05 +02:00
Olivier Dony c77d3e5531 [FIX] mail: line endings: DOS->UNIX 2018-06-23 03:12:04 +02:00
kujiu b623eb2263 [IMP] Improve compatibility with screen readers (accessibility) (#2146)
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.

This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.

* [IMP] Labels must have a for attribute. Improve accessibility.
* [FIX] Update some title attributes for a11y.
* [IMP] Add aria-labels
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views
* [IMP] Add 'alt' attribute on 'img' tags
* [IMP] Add aria-label and title on icons.
* [IMP] Add dialog role on modals.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [IMP] Change main layout to more semantic tags
* [IMP] Add menuitem role when missing
* [IMP] Remove wrong role='presentation'
* [IMP] Improve accessibility of tab panels
* [IMP] Add role on alerts
* [IMP] Add role="button" on simili buttons
* [IMP] Use dialog role, header, main and footer tags for modals
* [FIX] Set all tabs aria-selected since we don't have proper script to set the attribute correctly.
* [IMP] Add widget, navigation or img role to aria-labelled items
2018-06-22 21:27:40 +02:00
kujiu 33f0e8a4ff [IMP] Improve compatibility with screen readers (accessibility) (#2146)
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.

This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.

* [IMP] Labels must have a for attribute. Improve accessibility.
* [FIX] Update some title attributes for a11y.
* [IMP] Add aria-labels
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views
* [IMP] Add 'alt' attribute on 'img' tags
* [IMP] Add aria-label and title on icons.
* [IMP] Add dialog role on modals.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [IMP] Change main layout to more semantic tags
* [IMP] Add menuitem role when missing
* [IMP] Remove wrong role='presentation'
* [IMP] Improve accessibility of tab panels
* [IMP] Add role on alerts
* [IMP] Add role="button" on simili buttons
* [IMP] Use dialog role, header, main and footer tags for modals
* [FIX] Set all tabs aria-selected since we don't have proper script to set the attribute correctly.
* [IMP] Add widget, navigation or img role to aria-labelled items
2018-06-22 21:27:40 +02:00
kujiu 9de1bc0eef [IMP] Improve compatibility with screen readers (accessibility) (#24574)
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.

This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.


* [IMP] Labels must have a for attribute. Improve accessibility.
* [IMP] Better error message when trying to read a missing cached value
* [FIX] Add some aria-label and title attributes for screen readers.
* [FIX] Template name is not included in the error message in case of SyntaxError in QWeb
* [FIX] Improve the Tour failed at step error message to be more explicit.
* [IMP] Add aria-labels
* [FIX] Add missing aria-label on failing test
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views and many2many tags
* [IMP] Add some checks on views for accessibility.
* [IMP] Add `alt` attribute on `img` tags.
* [IMP] Add aria-label and title on non-described icons
* [IMP] Add button role to widgets with btn class
* [IMP] Translate aria and formatted attributes.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [IMP] Add aria attributes on progress bars
* [IMP] Improve accessibility of basic widgets
* [IMP] Change main layout to more semantic tags
* [IMP] Add menuitem role when missing
* [IMP] Remove wrong role='presentation'
* [IMP] Improve accessibility of tab panels
* [IMP] Add aria-invalid on invalid fields
* [IMP] Add aria-sort on ordered columns
* [IMP] Add role on alerts
* [IMP] Use dialog role, header, main and footer tags for modals
* [IMP] Add labels on o_status
* [IMP] Improve accessibility of kanban view with feeds and articles
* [IMP] Add alerts in case of new messages
* [IMP] Add widget, navigation or img role to aria-labelled items
2018-06-22 21:22:21 +02:00
Romain Derie 864357203f [IMP] account*: update invoice page view on customer portal
*account_payment, l10_in(_sale), sale(_stock), web

With this commit:
The invoice preview in portal (/my/invoices..) is now the HTML version of the
PDF report.
The HTML preview is based on the invoice report to closely match what is
already done in Odoo.

The invoice preview is displayed in an 'iframe', it is mandatory since:
1. Reports are rendered as a separate page as it returns the whole page after
   rendering, which has tag <html>, <head> etc
2. Reports are having their own layouts and their own assets that we we cannot
   load in the page directly or it will break the website layout.
3. We can not use report template with t-call because internally reports are
   using extra params like context_timestamp, company, DateTime, user etc which
   is used in header/footer

--

There will be a chatter (as a modal) to display/see the history of the document

--

For responsive purpose, we use new tables with limited column (Description,
Quantity and Amount) for responsive purpose (small screen).
It also adds some bootstrap classes to reports for responsive purpose.

--

The 'Pay Now' button remains if you already paid with 'wire transfer'.
(It disappears for Credit Note)

--

Add margin after the header and before the footer to look like the real printed
document, without alterating the real printed version

--

In every portal module, the pager is now generic in the generic breadcrump

--

Task ID: 39876
Closes #24938
2018-06-22 18:34:52 +02:00
Romain Derie d6956db916 [FIX] account(_payment): display Pay Now btn only for out invoices
1. Only facture client should see pay now*, not credit note etc
2. Pending transaction should be handled like:
   * Manual & (wire) transfer pending transaction should display pending but still
     show the pay button
   * Other pending transaction should display pending & hide the button
   * Exception: A wire or manual pending transaction should have the status "Waiting for payment"
                and not pending in /my/invoices status

* and "amount due" aswel so clients won't complain about the payment arriving too late
2018-06-22 18:32:49 +02:00
Romain Derie 694f80cd03 [FIX] web: background layout should not apply margin-top on footer
1. `background layout` report template should keep the min-height property to
avoid breaking the pdf report template.
This property is needed to display the background image at the right position
(avoid image to be crop if not a lot of invoice lines). see https://github.com/odoo/odoo/commit/41c75ad0c37d567dd43e418fda927c7ae38a3add

2. margin-top can't be applied or it will also break the pdf layout.
`min-height` will ensure that the html rendered will be high enough to looks
like the real pdf invoice anyway.

opw-39876
2018-06-22 18:32:49 +02:00
Romain Derie 3a77deb6c4 [FIX] account, portal: use new syntax in sidebar widget
There is a new syntax for widgets, among other things it allows the widget code
to be partly executed before the DOM is ready, speeding the process.

Courtesy of QSM
opw-39876
2018-06-22 18:32:49 +02:00
Romain Derie a7e2bd8666 [IMP] account(_payment), payment, web: show residual amount..
.. & hide transaction list + page numbers on HTML report.

1. Before this commit:
   Portal Invoices were displaying the total amount instead of the residual
   amount. The pay button would also trigger a payment for the total amount

   Now:
   If part of the invoice is already paid, we show the residual amount and
   payment transaction amount are set to residual amount so the client is asked
   to pay what he really needs to pay.

2. Processed transaction results in a bootstrap alert message displayed at the
   top of the page, showing warning, success or alert depending of the result.
   This alert is supposed to show thank message `post_msg` only if it set.

   Before this commit:
   Since `post_msg` is an html field and editable through summernote, it will
   never be empty. Indeed, empty field with summernote are replaced by a `br` tag
   inside a `p` tag.
   The condition would never be false, resulting in an empty `p` with a `br`
   inside being displayed at the bottom of the alert, making it looks like it is
   bugged.

   Now:
   The condition also consider summernote's empty string as such.

3. Remove the transaction list from the invoice portal template since it is not
   an important information to the client.
   Some client would not even understand what it is.

4. Hide page numbers on HTML report since they are not split in pages and page
   number remains empty, resulting in `Page: /` (Or empty square with the
  'clean layout.)
2018-06-22 18:32:49 +02:00
Romain Derie 3d7e6b4757 [FIX] account, portal: Adapt sidebar to be more responsive
1. Print & Download button can't be next to each other for some responsive
   reason:
   * On small computer screen size, there is not enough spaces so one button is
     pushed on a new line.
   * Button is also pushed on a new line even on big screen on other languages
     where the words can be a lot bigger (e.g: french "Imprimer/Télécharger").
   * Inverse problem appear if the words are smaller, both buttons won't fit
     all the available width and it will breaks the layout

2. There is an issue on big phone resolution in landscape mode.
   (iPhone X, Pixel 2 XL,..)
   Indeed, they are detected by bootstrap as 'MD' and not 'SM'.
   This was causing the sidebar to be displayed as for computer (fixed on the
   left side) but since there is not enough vertical space (height) in
   landscape, the bottom part of the sidebar would be hidden off the screen.

   Side effet: On small computer screen, it will now also be displayed like in
   mobile. This is in fact better since the invoice being displayed on
   col-sm-8 on these small screen would be completely squashed (since not
   enough width available to display things correctly).

opw-39876
2018-06-22 18:32:49 +02:00
Romain Derie e6b42cf35d [IMP] account, portal, *: Move pager in breadcrump
*project/purchase/sale/website_quote

Before this commit:
Some module having a portal page (Quotation, SO, Purchase..) would display a
pager in the page, sometimes on the document header, sometimes in the middle
of it.
Every template would have to t-call the `portal.record_pager`.

Now:
The generic portal breadcrump will now display the pager directly on the top
right. It means every portal template setting `prev_record` and/or
`next_record` will automatically have the pager displayed without having to
call it.
Plus, it will be displayed at the same position for every template, making
the behavior more consistent.

Plus, it will also remove the background color from the breadcrump and hide the
home button when you are already on the home page.

opw-39876
2018-06-22 18:32:49 +02:00