Commit Graph
113011 Commits
Author SHA1 Message Date
Simon Lejeune 021a95d998 [FIX] stock: move: _action_assign and _free_reservation
The code made the assumption that everything brought by in chained move
is available on the quants. This is not always true, for example when x
products are brought by a move in the chain, the user can make an
inventory adjustment that reduce the quantity available. Thus, we
implement a fallback in case the quantity brought by is not available:
do not reserve more than what's really available. If the user make
available some products with the same characteristics (lot/owner/pack)
in the location, they will be used by a new call to _action_assign.
Indeed, the reserved quants are not discernable. This is not an issue in
reality, as the user cannot discern the products himself if they share
the same characteristics.
2017-10-02 10:11:49 +02:00
Kinjal Mehta f6144fe1f3 [REF] stock: update picking operation and delivery slip report.
Updated report for stock refactoring.
2017-10-02 09:32:35 +02:00
Fabien Pinckaers ae190e8912 [IMP] web: kanban view, no hover on tags as not clickable 2017-10-02 09:04:59 +02:00
Géry Debongnie 962fa7325d [DOC] web: add some doc in control panel mixin
This should make it easier for developers to use the control panel mixin
properly.
2017-10-01 11:35:46 +02:00
qsm-odoo 1d34e269da [FIX] web: update column data when adding a record in a kanban
When a record was added in a kanban thanks to the quick create, column
tooltip and column progressbar were not updating the values they showed.
Now, adding/deleting records updates the whole column as the update
operations.

Thanks to @kig-odoo for the test.

Note: to backport (partially)
2017-09-30 18:39:13 +02:00
qsm-odoo a09462b7fc [FIX] web: allow updating a newly created kanban record
When using quick create to create a kanban record, if this record was
then updated thanks to a field widget, the view crashed. This was
because it tried to update the whole column but the newly created
record was not properly attached to it in the model.

Thanks to @sja-odoo for the test.

Note: to backport (partially)
2017-09-30 18:39:13 +02:00
Aaron Bohy 5164d30c92 [FIX] web: correctly redraw x2m list after onchange
When an onchange is set on an x2many field displayed as an editable
list in a form view, and the user updates one of the subrecords,
the updated subrecord is kept in the DOM and updated, and all other
subrecords in the relation are re-rendered and re-inserted at their
correct place in the list (because the onchange might have changed
them).

Before this rev., the order of the subrecords after the edited one
was reversed.
2017-09-30 17:33:20 +02:00
Simon Lejeune 1cded67619 [FIX] stock: edit done move line
When undoing the original move line, make sure to handle the packages
correctly (in the destination location, undo the result package, not the
source one.
2017-09-30 17:12:20 +02:00
Simon Lejeune 191873f8a5 [FIX] stock: edit done move line
When undoing the original move line, make sure to undo the quantity
according to the UOM of the move line.
2017-09-30 17:12:20 +02:00
Simon Lejeune 6a093d1dec [REF] stock: when editing the initial demand of a receipt, run action assign
We also display the "check availability" button if the move is ready but
one of the move is partially available.
2017-09-30 17:11:48 +02:00
Jeremy Kersten 39454be0e1 [IMP] website_Sale: fix ecommerce layout for mobile + uniformize title 2017-09-30 16:17:47 +02:00
rde 727d461e1d [IMP] website: create special extension page redirect backend + own template
Before this commit:
1. You could create a page with supported extension in the path (eg: myfile.js)
You would then be redirected to the webeditor (myfile.js?enable_editor..)
But in this case, it would just redirect you to a plain text page without odoo
layout because supported extension are rendered with a specific mimetype.
(is it is a .js page, it will just render the page content as a js file)
2. These kind of page would still call t-layout that you should be removed in
backend in order to make it work

Now:
1. You will be automatically redirected to the back end to edit your file
instead of landing on a text-only page.
2. Supported extension now have their own template (eg: .js file now have
<script text=..> tag added automatically in their content)
2017-09-30 16:11:48 +02:00
Nicolas Lempereur f2df388c38 [FIX] web: settings scroll w/o control panel
Have the settings scroll without the mock control panel.

courtesy of @qsm-odoo
2017-09-30 16:11:05 +02:00
Aaron Bohy c8f15742c3 [FIX] web: Kanban: open record when a tag is clicked
Kanban records with 'global click' feature activated should open
the record in a form view when the corresponding card is clicked.
Before this rev., it wasn't working if the user clicked on a tag
of the kanban record, because of an unused click handler defined
on the Many2ManyTags widget (preventing the global click feature
from actually performing the global click).

This rev. removes that handler in the KanbanFieldMany2ManyTags.
2017-09-30 16:02:23 +02:00
Aaron Bohy b53af081cb Revert "[IMP] web: filter when clicking on tags in Kanban"
This reverts commit b6ef149b as it seems that we don't want this
feature ultimately (was confusing for users trying to open the
record, but it filtered instead).

Note that opening the record by clicking on a tag still doesn't
work, but this is fixed by the next commit.
2017-09-30 15:59:24 +02:00
Aaron Bohy 776bac6a06 [FIX] web: don't discard x2many rows coming from default_get
Problem occured in the MRP Production wizard (with a consumed
product tracked by serial number). The opened record is a new
record, and its one2many has 2 default rows that are prefilled.
If the user edited one of the quantities in those rows, and set
an invalid value instead (e.g. a letter), the row was removed
without notice when it was focused out. This was because the
model wasn't aware that a change has been done on the record,
and as the record was flagged as new, it was simply abandonned.
2017-09-30 15:59:24 +02:00
David Monjoie 16eb262c60 [FIX] web: fix one2many default get
The one2many default get code used to meddle with basic_model's res_ids
manually, which ended up desynchronizing the data and res_ids fields
of the list representation of the one2many values.

This commit solves the issue by using the proper mechanisms of the
basic_model, that is creating a proper datapoint for those ids.

Steps to reproduce the original issue:
- Install sale_mamangement, mrp and purchase
- Create a product
- In the Inventory tab, in Routes, uncheck Buy
- Check and then uncheck back any other route than Buy
- Get a traceback because we are looking for a record with a given
  res_id in the list data but since they are desynchronized, data
  is empty at that point even though res_ids is not.
2017-09-30 15:59:24 +02:00
Jeremy Kersten 0997579df4 [FIX] website_sale: partial revert layout change
Remove a part of the PR #19463

Specs for PR undo a previous task.
2017-09-30 15:27:33 +02:00
Siddharth Gajjar 8174d46bf0 [IMP] website_sale: checkout layout usablity improvement. 2017-09-30 15:20:17 +02:00
jpr-odoo 59b3f676bb [IMP/FIX] website_sale, website_sale_delivery: fixed alignment issue, removed unexpected spaces, update some view for shop/payment 2017-09-30 15:20:17 +02:00
Pierre Masereel e608954506 [FIX] stock: color of move and move lines when picking is done 2017-09-30 15:20:01 +02:00
Fabien Pinckaers 64557f93d3 [IMP] mrp,stock: planned --> scheduled date 2017-09-30 15:18:17 +02:00
fwi-odoo d9ffd5204d [FIX] web: correctly apply onchange on boolean field
When an onchange sets a boolean field to 'true', if this boolean was set to 'false'
previously, the old value was used instead of 'false'.
2017-09-30 15:11:39 +02:00
qdp-odoo 236742cb0e [FIX] sale, account: fix tax group style in quotation/invoice reports 2017-09-30 15:02:17 +02:00
qsm-odoo a3f899c395 [FIX] website(_twitter): properly stop snippet animations
The `stop` method of snippet animations was renamed to `destroy` (as
animations are now extensions of standard `Widget` class).
2017-09-30 14:33:05 +02:00
qdp-odoo c6d2e42a0f [FIX] account: writeoff were not linked to the payment they come from.
Registering a payment on an invoice with a writeoff, was creating the correct accounting entries although when going back on the payment form and clicking on 'journal items', the writeoff line was missing.
2017-09-30 14:31:34 +02:00
Khoi Nguyen 1eeac9f196 [FIX] mrp: Aesthetic change in block view
Apply text-uppercase to block button.
2017-09-30 14:25:43 +02:00
Khoi Nguyen f220ca4c10 [FIX] mrp: Change Work Orders text to make the dependence on quality explicit 2017-09-30 14:25:43 +02:00
Khoi Nguyen bdeb775219 [FIX] web: focus issues after onchange in x2many with buttons
https://github.com/odoo/odoo/commit/36b4d78a2678806b25aaa5650b64496f9da9d205
fixes most post-onchange focus issues for x2many fields, but does not
account for "button columns" properly. More precisely, the current
widget is computed via a position index taking buttons into account in
an array that ignores them. This caused the index to be out of bounds,
resulting in a traceback. This commit fixes this issue.
2017-09-30 14:25:43 +02:00
Nhomar Hernandez aa12ba2b89 [FIX] stock: Procurement group form view needs a little Icon to comply with
standard usability views.
2017-09-30 14:13:02 +02:00
Pierre Masereel d9a7e40f7e [FIX] stock: only show original document, and not all rules applied 2017-09-30 13:38:34 +02:00
fwi-odoo 0f98d59064 [FIX] web: calendar avoid double event creation
Before this commit, pressing tab then enter was generating a traceback because
the event creation and modal deletion was done twice.
This commit adds a protection to be sure that we are doing only one event
creation.
2017-09-30 13:21:02 +02:00
David Vidal 0e562c8a7d [FIX] website_sale: Avoid map tax for every company
When a product has multiple company taxes and b2c prices is enabled, price is
not computed properly and adds to the base price every company tax present.
This patch filters the company set on the company so taxes are computed just
for that company.

This commit closes #18840

Depend of the previous commit which add right to public user. #18881
2017-09-30 12:21:27 +02:00
David Vidal 42c8da4edc [FIX] Add public user group tax read permissions
- Related to https://github.com/odoo/odoo/pull/18840
- Adds public user tax read permission so methods can be called.

this commit closes #18881
2017-09-30 12:21:27 +02:00
Jeremy Kersten 830fed2601 [FIX] website_sale_wishlist: fix to make wishlist available for public user
Fix/imp about the #19777

Replace cron of garbage_collector by a call from autovaccum. Don't try to find
which session is expired or not to avoid to check each one by one, but use a
stupid heuristic to delete all old session older than 5 weeks by default.
(overridable in autovaccum: model.power_on(**dict(wishlist_week=10)) e.g.)

Use 'display: none' instead of class hidden, to avoid flickering at load and
let jquery work with .show / .hide without removeClass('hidden').
Without it, the animation of the first product that you add in your wishlist
will be wrong because Wishlist menu is not visible while you don't refresh.

Remove all old test that check if we was the public user or not and that make
the PR not working ;)

Courtesy of @yajo for dev, and @rdeodoo for quick review/testing
2017-09-30 12:21:27 +02:00
Jairo Llopis 88b75f150d [IMP] website_sale_wishlist: Allow public users to wishlist
Current behavior before this patch:

- Only authenticated users were able to set items as wishlisted.
- A product template is displayed as wishlisted if the first variant is so.

Desired behavior after this patch:

- All users are able to wishlist items.
- When a user logs in, his dangling wishlists join him.
- A product template is displayed as wishlisted when any of its variants is so.

This commit closes #19777
2017-09-30 12:21:27 +02:00
rde 4bd8e3e2ed [IMP] website: Script injected in DOM: window.onerror empty params
Before this commit, error thrown by scripts injected in DOM won't return a
clean error on window.onerror.
It would open the crash_manager's show_error's dialog that wouldn't display
any informations except "Script Error." and "Traceback:".
This is because of browser's security reason: it will just give you a
'Script error.' as message and nothing else for security issue.

Now, this kind of error will show a clearer message informing that it is
probably originating from a Javascript file served from a different origin.
There is now also the possibility for developers to handle/override the
behavior when this kind of error is catch to prevent the dialog to open for
example.

Might be of use:
https://blog.sentry.io/2016/05/17/what-is-script-error.html
https://stackoverflow.com/a/7778424
https://danlimerick.wordpress.com/2014/01/18/how-to-catch-javascript-errors-with-window-onerror-even-on-chrome-and-firefox/ (Search for Script Error)
2017-09-30 12:21:27 +02:00
rde c837eaca9f [FIX] website: edit menu not showing url & mailto prefix with '/'
Before this commit:
1. you could not edit a menu URL because the input was hidden.
   This was due to radio options being switched (new page is now selected choice)
   when you create a menu.
   But when you edit, there is no choice and the input should be shown.
2. if you set a menu url to an email address, the display link would be prefixed
   by a / and so it would open mysite.com/mailto:XXX instead of just the mailto

Now:
1. Input is now hidden only when you add a new menu, not when editing a menu.
2. mailto link now works as expected: it will open your desktop mail software
2017-09-30 12:21:27 +02:00
Prakash Prajapati 0b6c9c60d4 [FIX] website: remove left & right margins around todo buttons 2017-09-30 12:21:27 +02:00
Suraj Shukla 536bb2f7d9 [FIX] base: bootstrap css load issue fixed for asset mode
When you was in debug=assets and that a less file was malformed, the
error was not displayed correctly.

Now we load a minimal layout (bootstrap style)

This commit closes #19799
2017-09-30 12:21:27 +02:00
Jeremy Kersten 7f56039ddb [FIX] website_sale: resync website_sale.sass and website_sale.css 2017-09-30 12:21:27 +02:00
Jeremy Kersten fa511a4ee2 [FIX] website_sale(*): better management of warning when stock no more available + ...
From now update_json route with display=1 return the cart_qty and not False.
It is usefull withtout extra cost for other modules like wishlist or ... that
previously render all the template just to know the new qty.

Now you cannot arrive on payment page withtout product in your cart and get a
blank page, you are now redirected to the /shop/cart page

When the order are altered due to a change of stock availibilities, we now log
it into the order_line itself or the saloe_order if a line has been deleted.
That permit to display the warning later when the user come back to one of the
page that display the cart resume.  (/shop/cart or /shop/payment at this moment).

Remove useless empty file

Make xpath correctly using wrap feature and don't re-copy all contents

Replace old base.get_context with web_editor.context
2017-09-30 12:21:27 +02:00
Jeremy Kersten 29dec43ce8 [IMP] website_sale: replace signup by 'Sign In' in checkout
+ add link in confirmation page to propose the signup in b2c
2017-09-30 12:21:27 +02:00
rde 4edf03b5d9 [REM] website: remove unused method get_page_key
call to this method got removed on #f015746549e1eb380bfbda8c8f47d1f1e5d0cfbc
2017-09-30 12:06:04 +02:00
qdp-odoo 160f065251 [FIX] account: wrong xml-reference in report.
Module account does not depend on sale module
2017-09-30 11:33:40 +02:00
Kishan Gajjar 2a9605414b [FIX] web_editor: open customize menus to the left/right
Open customize options menus to the left if there is not enough space on
the right.
2017-09-30 11:17:22 +02:00
Kishan Gajjar 1a18eb64f4 [FIX] portal: duplicating links in footer
This solves a bug that should be solved differently when possible. When
automatic footer option is enabled, <ul/> become non editable because of
<xpath/>. So adding a link does not duplicate the <li/> elements but the
<a/> elements.
2017-09-30 11:17:22 +02:00
Kishan Gajjar 19dc6e97ba [FIX] web_editor: link dialog color buttons style was broken in some themes 2017-09-30 11:17:22 +02:00
Kishan Gajjar 5c6379303a [FIX] website: adding a link on a "Features"'s icon broke the layout 2017-09-30 11:17:22 +02:00
Kishan Gajjar 90dbe3c6be [FIX] website: add white background to placeholder image 2017-09-30 11:17:22 +02:00