Commit Graph
118198 Commits
Author SHA1 Message Date
Sébastien Theys b2c1d5ede2 [IMP] web: fix default sequence for list with handle
The sequence had a static default value, but when there is an handle, it's important that new items are added at the top or the bottom of the list.

This is a rare case where the defaul_get from the server will be ignored by the view for a certain field.

This will work:
- both in editable mode (inline) and in dialog mode,
- both for X2Many and standalone list.
2018-06-29 10:39:42 +02:00
Sébastien Theys 217fee2636 [FIX] web: prevent RPC from failing if no route is set
The scenario is:
- create a new parent model, which has a one2many
- add at least 2 one2many lines which have:
    - a handle field
    - a many2one, which is not required, and we will leave it empty
- reorder the lines with the handle

This will call a resequence, which calls a name_get.
With the bug that would throw an error at the RPC, but this commit fixes it.
2018-06-29 10:39:42 +02:00
Sébastien Theys 13667b0dff [DOC] doc: update the QWeb documentation
The $as_all variable was mentioned in the doc but it is non-existing in the Python code.

This commit makes clear it is only available on JS QWeb.

Also rename OpenERP to Odoo.
2018-06-29 10:39:42 +02:00
Romain Derie 124be154bf [FIX] sale_payment: back to SO page after payment
Commit a3c9c286cc made stripe.js more generic. By doing so it also fixed the
`provider_form.innerHTML = data` that was not doing anything since
provider_form was not a dom element.

For orders on /my/orders/XX, the `return_url` was /my/orders/XX before going
through stripe.js.
stripe.js would then call `/pay/sale/XX/form_tx/` that would return new
acquirer form values that should replace the old ones, including a new
`return_url`.

But since `provider_form.innerHTML` was undefined, the old data would remains.

With commit a3c9c286cc the data is now correctly replacing the old ones.
The `return_url` is now /my.

So when an user pays a SO, he is redirected to the portal root page instead of
the SO he just paid with a confirmation message (like it was the case before
the stripe.js improvement).

This fix ensure that the user is still redirect to his SO, by redirecting to
/my/orders/xxx and not /my.
2018-06-28 18:48:04 +02:00
Joren Van Onder 0ea864ca90 [FIX] account: don't crash when generating an invoice from website_quote
res.currency's `_convert` expects a record not an id.

On res.currency:

_convert() calls
_get_conversion_rate() which calls
_get_rates()

_get_rates does company.id.
2018-06-28 18:47:57 +02:00
Joren Van Onder 2362ea09f8 [FIX] website_sale_digital: make /my/orders accessible with just token
This route should be public because the public user should have access
if the correct access token is passed. super() will ensure that.
2018-06-28 18:47:51 +02:00
Joren Van Onder 2fa469c5e5 [IMP] sale, website_quote: allow portal payment after signature
Both features already existed but it was not possible to enable both.
This makes that possible. When both are enabled the quotation first has to be
signed, then it can be paid.

Purpose
=======
No way to combine digital signature and online payments to confirm orders.
A customer signature matters for big deals, in order to keep an official print
of customer agreement.

Specs
=====
- when the customer signs online, a new pdf is generated with the customer
  signature on it and posted as a note in the chatter, replacing the current
  signature jpg.

- show the signature in the portal view, with both sale_management and
  website_quote module

- change in settings: Digital Signature and Electronic Payment are now 2
  checkboxes instead of a radio button

- these settings must be company-specific (add company icon if multi-companies,
  like other company-specific settings)

- when both modes are activated, it first request the signature, then the
  payment

- the order is confirmed after payment

opw-1818837
Closes #24174
2018-06-28 18:47:51 +02:00
Joren Van Onder 803162537b [FIX] portal: show signing error messages returned by the server
The funny self.$('#o_portal_sign_accept') line was some leftover
debugging code. It doesn't actually match anything, because that
element is not in self.$el.

Before this change nothing happened when you clicked the button and an
error occured.

Now the `data.error` message (e.g. 'Invalid Order') is shown near the
bottom of the dialog.
2018-06-28 18:47:35 +02:00
Ankit Joshi 11e966da6a [ADD]repair: Add group_account_invoice.
Hide the button "create invoice" on the repair order if the user doesn't have the right to create an invoice

Task: 1844702
2018-06-28 16:34:08 +02:00
Ankit Joshi 81f5b916ba [REM]repair: Remove invoice access rights.
The stock user shouldn't have the right to create invoices

Task: 1844702
2018-06-28 16:34:08 +02:00
Ankit Joshi acce8f2c5a [REM]stock_account: Remove invoice access right.
The stock user shouldn't have the right to create invoices,
Remove stock user invoice right,

Task: 1844702
2018-06-28 16:34:08 +02:00
kujiu 92bf89ffb3 [FIX] Remove bad aria-hidden (#25481)
Some aria-hidden are present on some elements that must be visible. Some dialogs don't open correctly with this.
2018-06-28 12:31:27 +02:00
kujiu 99c29c37f8 [FIX] Bad layout for button Published/Unpublished (#25476) 2018-06-28 12:30:11 +02:00
Pierre Masereel 373ea16380 [IMP] stock: inv. adj. line no lot edition for untracked product 2018-06-28 10:44:38 +02:00
dip-odoo 85d5360fdd [REF] stock: onchanges on stock inventory and inventory lines private
As it is not necessary to have public functions for onchanges, we set
them back private.

TASK-30921
2018-06-28 10:44:38 +02:00
dip-odoo 0cb20d2035 [REF] stock, mrp, sale_mrp: inventory validation
The method 'action_done' on inventory adjustment became private and the
action launched from the view is now 'action_validate', so we adapt
those tests to use the new function.

TASK-30921
2018-06-28 10:44:38 +02:00
dip-odoo 692847255c [IMP] stock: validate inventory adjustment with product tracked
When you have some product tracked in an inventory adjustment, the
lot/serial number is not required, so when you confirm an inventory
adjustment with product tracked for which you didn't provide serial/lot
number you get a warning to inform you.

TASK-30921
2018-06-28 10:42:28 +02:00
dip-odoo ba5918ffcb [IMP] stock: improve inv. adj. line constraint
The constraint avoifding ot have two inventory lines with the same
properties was only triggered in the create, we make it work also in the
write.

TASK-30921
2018-06-28 10:42:28 +02:00
dip-odoo 1efdf539dc [IMP] stock: inv. adj. line no product create
When you create a inventory adjustement line, you can create new products,
but you don't really want to create products in the inventory adjustment.

TASK-30921
2018-06-28 10:42:28 +02:00
dip-odoo a04d43faf2 [IMP] stock: Update quantity on hand inventory adjustment
When the update quantity on hand is clicked on a product tracked by lot
or serial number or if the database is in multi location, the button
update quantity on hand will open an inventory adjustment to allow you
to add multiple lot/serial number and/or choose the lopcation in which
you are updateing quantities

TASK-30921
2018-06-28 10:42:28 +02:00
Yannick Tivisse 15f3bbe594 [MOV] web,im_livechat: Move clipboard widget to web 2018-06-27 14:42:04 +02:00
Yannick Tivisse a46301419e [IMP] base: Rename website_sign into sign 2018-06-27 14:38:02 +02:00
Hetashree Chauhan 2c6d9a4225 [IMP] mrp: change labels on warehouse form view.
Change labels of 'manufacture in this warehouse' to 'manufacture to resupply'.

This commit is related to task id 1854693.
2018-06-27 11:18:22 +02:00
Hetashree Chauhan 91d90599b7 [IMP] stock: change labels on warehouse form view.
Change labels for reception and delivery steps as well as the
routes names.

This commit is related to task id 1854693.
2018-06-27 11:18:22 +02:00
Hetashree Chauhan c9ae24b024 [IMP] purchase_stock: change labels on warehouse form view.
Improve labels on the warehouse form view
This commit is related to task id 1854693.
2018-06-27 11:18:22 +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
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
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
jpr-odoo cea2a454ae [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'.

--

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

Task ID: 39876
2018-06-22 18:32:49 +02:00
jpr-odoo 949ce0278a [IMP] portal: add a generic PortalSidebar widget to be used in customer portal
with this commit, this generic widget allow to basic functionality for portal sidebar like: print btn (direclty print the document),
 set due or delay label of the document (based on given date), used affix to locked to an area on the page for sidebar.
 Purpose is to reuse it in account customer portal and online quotes notably.
 some css code convert to the less file to have working portal sidebar skeleton, which is already used in website_quote

 Task ID: 39876
2018-06-22 18:32:49 +02:00
qdp-odoo 07c111fa72 [IMP] account: onboarding improvement
Improves the 'chart of account' step by showing all the accounts in the list instead of the default limit

Was part of task 1838269.
2018-06-22 13:05:19 +02:00
eco-odoo 52a0395040 [IMP] account: update dashboard sales and purchase journal graph
The sales journal graph  should show the cash-in forecast of invoices.
In order to do that we need to display residual amount to be received
based on the invoice due date.

The purchase journal graph should show the cash-out forecast from
invoices. In order to do that we need to display the residual amount to
be paid based on the invoice du date.

Was task: 1855081
Was PR #25344
2018-06-22 10:10:18 +02:00
qdp-odoo d1a148a2ba [IMP] account: better order of details in aged partner balance report 2018-06-21 16:00:01 +02:00
Joren Van Onder 72c445045d [IMP] account: show total of tax base amounts when auditing taxes 2018-06-21 09:13:40 +02:00
Pieter Paulussen 50ee1c964b [FIX] account: fix account_move_line's default_get()
When creating a journal entry manually, the value proposed as next line was not taken into consideration all existing lines.

Was PR #25298. Courtesy of Pieter Paulussen (Dynapps)
2018-06-20 17:37:09 +02:00
qdp-odoo 6424111f7a [FIX] account: cash based taxes mixed with regular ones
Previously, the use case where a cash basis tax and a regular one were combined on the same invoice line (for example) was not supported (technically, there's a single boolean for the tax exigibility of the sale/purchase line). Since it appears this is a real need, this have been improved in the generic tax report (in enterprise repo) in revision https://github.com/odoo/enterprise/commit/f7e33b8114d4d649551a155d0ca8cc4f43f1fc01 and this commit fixes the community side, to copy only the base line of the tax exigibile on payments in the cash basis move
2018-06-20 17:18:21 +02:00
Romain Derie 27825cbf13 [FIX] sale: unify both pricelist & sale option to show discount
Sale module has an option to show or hide discounts on order lines.
Pricelist also have a field to include the discount in the price or display the
full price strikethroughed.

Before this commit:
If the sale option was disabled, the pricelist option would be hidden, possibly
left enabled.
This will cause a strange behavior in frontend where user would still see the
strikethroughed price even if the sale module option was disabled.

Now:
If the sale option got disabled, we also disable the pricelist option

Closes #14741
2018-06-20 16:43:08 +02:00
Olivier Colson 9cc4c453d6 [FIX] account: creation of account.payment
Allow to give the value of the payment method by the key 'default_payment_method_id' of the context, as the regular usage wants.
2018-06-19 17:55:54 +02:00
Olivier Colson 440a6fe26c [IMP] account: batch payments aren't only for inbound payments
Enterprise module has been renamed and code adapted accordingly
2018-06-19 17:53:17 +02:00
Olivier Colson 4aa28921e1 [MOV] account_batch_deposit > account_batch_payment 2018-06-19 10:26:49 +02:00