Commit Graph
126133 Commits
Author SHA1 Message Date
Romain Derie 6f380eaf8f [FIX] website_sale_coupon: do not show generated coupon code if expired
Before this commit, an `expired` generated coupon would be shown to the user.
Now we hide these `expired` coupons.

Note: An `expired` generated coupon might typically come from a SO that does
      not meet a 'on_next_order' program anymore. So the generated coupon that
      was set to `reserved` got canceled and set to `expired`.

Step to reproduce:
  - Create a program oferring a product B on next order if you buy 2 product A
  - Add 2 product A to cart, you then see the message that you got a coupon for
    your next order
  - Remove on product A, you still see the message even if the generated coupon
    is now expired and not valid anymore.

Closes #3062
2018-11-15 15:56:29 +01:00
Romain Derie e8efcb1bc3 [FIX] sale_coupon: do not deduce reward quantity on current_order
Before this commit:
1. We were checking if the rewards were in the SO even if it was 'next_order'
   program.
2. We were deducing the rewards quantity for 'next_order' program when checking
   if we had enough products to meet the program requirements.

Now:
1. We don't verify if the reward is on the SO if the program is 'next_order'
2. We don't deduce reward quantity when checking if enough products to meet the
   program requirements if the program is 'next_order'

opw-1907211
Closes #3062
2018-11-15 15:56:25 +01:00
Romain Derie 7b99c0db92 [FIX] sale_coupon: generate only one coupon per program per SO
Before this commit:
Everytime the SO met a 'on_next_order' program requirements, a coupon would be
generated on that SO. Even if there was already a coupon for that program set to
'expired', for instance when the SO did not met the requirements anymore.

Now:
When the requirements are met, it checks that an `expired` coupon does not
already exist.
It it does, it will set that coupon back to `reserved` state.

Step to reproduce:
  - Create a program on `next_order` with requirements, eg $300 amount
  - Create a SO and add $300 worth of products
  - Update promotion, a coupon is created and set to `reserved`
  - Now update the SO to go below $300
  - Update promotion, the coupon is set to `expired` as it should
  - Update again the SO to meet the $300 requirements again
  - Update promotion, a new `reserved` coupon is generated instead of updating
    the state of the previous one from `expired` to `reserved`

Closes #3062
2018-11-15 15:56:19 +01:00
Adrian Torres 51c7afff48 [FIX] sale_coupon: restore SO processing time
This optimizes the confirmation of a sale_order in the ecommerce by ~73%,
for a cart with 160 unique items, the processing time goes from
7m46s to 39s, which is roughly the same amount of processing time if the
module `sale_coupon` is not installed.

This optimization is achieved in two steps:

1. By validating promotional/discounted products in batch instead of
validating each product one at a time.

2. By performing an unlink() on invalid reward lines instead of sending
a delete command by writing to the one2many, as delete commands are not
(yet) performed in batch, which means record recomputation after every
delete.

opw-1893277
2018-11-15 15:56:14 +01:00
Goffin Simon 0cd13d67ba [FIX] website_sale: modifying the shipping area text in the shop
Thanks to this commit: https://github.com/odoo/odoo/commit/e011b465316fe2b6d45e31f99829d26edc01f74e

Now it's possible to edit the shipping area text in the shop.

opw:1908308

closes odoo/odoo#28732
2018-11-15 14:43:27 +00:00
Robot Odoo 11282ced17 [FIX] web: fix performance issue with read_progress_bar
This PR fixes some miscellaneous issues:
- performance issue in read_progress_bar
- performance issue in activity view
- crash in ungrouped kanban view with progress bar

closes odoo/odoo#28715
2018-11-15 17:25:30 +01:00
Géry Debongnie 990dce6e2a [FIX] web: prevent crash in ungrouped kanban views with progressbar
The progressbar widget is not supposed to be displayed in non grouped
mode.  Before this commit, this situation resulted in a traceback. For
example, if the user has an activity on the subscription model, and
tries to open it, it will open an ungrouped kanban view.

With this commit, we check first that the kanban view is in grouped
mode, before loading the progress bar data.
2018-11-15 15:26:49 +00:00
Géry Debongnie 1bb15e0559 [FIX] mail: fix performance issue for activity view
Fun fact: for the subscription model in odoo production database, the
get_activity_data rpc takes 36s, and transfer 420mb (non gzipped) of
data (when looking at all subscriptions).

The main reason for that is that the get_activity_data method create a
domain with all the res_ids (so, if you have 20k subscriptions, the
domain will look like (res_id, in, [...20k ids]).  This domain is given
to read group, and the resulting groups (each with a domain key which
includes those res_ids) will be sent back to the web client.

As far as I can tell, the domain key is not used by the web client, so
we send (number of groups)*(number of records) of useless data.

This commit improves the situation in two different ways:
- we only generate the domain if there is a domain at the beginning.
  This should greatly improve the performance when there is no current
  domain
- we do not transfer the data to the web client
2018-11-15 15:26:49 +00:00
jbm-odoo 662657f44b [IMP] hr_holidays: Re-introduce complete tests suite
The tests have been detroyed while merging a refactoring for 12.0.

This commit reintroduces unit tests to checks each business cases from
"The Flow" into python tests.

closes odoo/odoo#28323
2018-11-15 15:24:58 +00:00
Géry Debongnie 92b4e2e866 [FIX] web: fix performance issue with read_progress_bar
The read_progress_bar method is incredibly not efficient.  It is also
wrong in other ways (for example, if 2 groups have same labels, there is
a collision). But let us talk about efficiency: it iterates on each
records on the domain, then, it computes some information. It is really
worse for selection fields: it performs a fields_get for each iteration.

This commit improves the situation by doing the fields_get only once.

Note that this is not the end of the story: this only has a small effect on
the performance of this method. It looks like there is a deeper issue in
some cases (kanban view for subscription, field 'activity_state')
2018-11-15 15:24:27 +00:00
Geoffroy Larue ed86434a19 [IMP] mass_mailing: improve onboarding
Purpose : this commit improve various elements of the mass mailing interface :
- make recipients field in mass mailing form required and add "mass mailing contact" in selection
- new "Archive" button and color picker in dropdown menus of mailing lists and mailings
kanban views.
- various little improvements in labels

closes odoo/odoo#28497
2018-11-15 14:32:26 +00:00
Christophe Monniez 51ee0c3cb5 [FIX] packaging: add qrcode package to docker file
After the Odoo package is built, the package.py script uses a Docker
image to test the package. After that python3-qrcode was added as a
dependency for the package in 2ff49c5f , it revealed some issues.

A missing cli parameter and a forgotten '&&' in the Dockerfile prevented
the installation of the depending packages.

Also, the script shebang was wrong by launching python2.

Finally, the fact that python3-xlwt is missing in Debian stretch was
highlighted. With this commit, the python3-xlwt is explicitly removed
from the dependencies and the documentation is updated accordingly.

closes odoo/odoo#28807
2018-11-19 15:34:13 +00:00
Robot Odoo 7c3d5dc067 [MERGE][REF] *: update js test suite to use helpers
This rev. introduces robust helpers to use in the JS tests suite to
interact with DOM and components, and starts using them (almost)
everywhere.

All the helpers are exposed though testUtils.js.

There are 2 kinds of helpers:

1. Assertions
-------------
 * assert.containsNone, containsN, containsOnce check that the DOM
   (or a specific part of the DOM) contains a `selector`. It
   generates a correct error message automatically.
    ex: assert.notOk(form.$('button').hasClass('btn-primary'));
       -> assert.doesNotHaveClass(form.$('button'), 'btn-primary');
 * assert.isVisible, isNotVisible check that the DOM has an element
   visible or not. They also check that the element is actually in
   the DOM (before most tests didn't verify this).
 * assert.hasClass, doesNotHaveClass, hasAttrVAlue, check specific
   properties of a DOM element, and also validate that it is
   applied on a single existing DOM element (before most tests
   didn't verify this).

2. Utilities
------------
The goal of the utilities is to centralize the definition of many
standard components and interactions, ensuring that when we
refactor the JS framework, we do not need to change all the tests.

Existing mock utilities (addMockEnvironment, intercept, path,
patchDate, unpatch and fieldsViewGet) are moved to
'testUtils.mock.*'.
Existing DOM utilities are moved to 'testUtils.dom.*'.
New dom utilities are created for opendDatePicker, click,
clickFirst and clickLast. Helper `click` verifies that there is
exactly 1 element visible in the DOM you click on, `clickFirst`
and `clickLast` verify that there are more than one element on the
DOM.
 ex: form.$('button').click();
     -> testUtils.dom.click(form.$('button'));

New Form utilities: (testUtils.form.*)
 clickEdit, clickSave, clickCreate, clickDiscard, all clicks on
 the control panel buttons of the form.
 `reload` reloads the form data.

New modal, graph, kanban and pivot utils (testUtils.pivot.*,
testUtils.kanban.*, etc.).

New fields utils: (testUtils.fields.*)
 * editInput, editSelect: allow to change the value of a field,
   using a selector to identify it. They validate that the input
   exists and trigger the change event automatically.
 * editAndTrigger: allow to modify a field and trigger specific
   events after the value change
 * many2one (testUtils.fields.many2one.*)
   clickOpenDropdown, clickHighlightedItem, clickItem,
   searchAndClickItem: use a field name instead of a selector and
   do all the complex mechanism to open, filter and highlight
   many2one fields.

Joint work with aab, dam, ged, mge, svs and vsc.

closes odoo/odoo#28784
2018-11-19 15:38:25 +01:00
jem-odoo 8fc246da31 [MOV] purchase_requisition: split models and views files
This commit simply move code into the right file.
The goal is here to fit the guidelines and prepare
the module for some changes. This will ease the
reading of module code.

Task-1851286

closes odoo/odoo#28795
2018-11-19 12:52:07 +00:00
Géry Debongnie abf32b8b21 [REF] *: update js test suite to use helpers
This rev. introduces robust helpers to use in the JS tests suite to
interact with DOM and components, and starts using them (almost)
everywhere.

All the helpers are exposed though testUtils.js.

There are 2 kinds of helpers:

1. Assertions
-------------
 * assert.containsNone, containsN, containsOnce check that the DOM
   (or a specific part of the DOM) contains a `selector`. It
   generates a correct error message automatically.
    ex: assert.strictEqual(form.$('.o_form_editable'), 1, "msg");
        -> assert.containsOnce(form, '.o_form_editable');
 * assert.isVisible, isNotVisible check that the DOM has an element
   visible or not. They also check that the element is actually in
   the DOM (before most tests didn't verify this).
 * assert.hasClass, doesNotHaveClass, hasAttrVAlue, check specific
   properties of a DOM element, and also validate that it is
   applied on a single existing DOM element (before most tests
   didn't verify this).
    ex: assert.notOk(form.$('button').hasClass('btn-primary'));
       -> assert.doesNotHaveClass(form.$('button'), 'btn-primary');

2. Utilities
------------
The goal of the utilities is to centralize the definition of many
standard components and interactions, ensuring that when we
refactor the JS framework, we do not need to change all the tests.

Existing mock utilities (addMockEnvironment, intercept, path,
patchDate, unpatch and fieldsViewGet) are moved to
'testUtils.mock.*'.
Existing DOM utilities are moved to 'testUtils.dom.*'.
New dom utilities are created for opendDatePicker, click,
clickFirst and clickLast. Helper `click` verifies that there is
exactly 1 element visible in the DOM you click on, `clickFirst`
and `clickLast` verify that there are more than one element on the
DOM.
 ex: form.$('button').click();
     -> testUtils.dom.click(form.$('button'));

New Form utilities: (testUtils.form.*)
 clickEdit, clickSave, clickCreate, clickDiscard, all clicks on
 the control panel buttons of the form.
 `reload` reloads the form data.

New modal, graph, kanban and pivot utils (testUtils.pivot.*,
testUtils.kanban.*, etc.).

New fields utils: (testUtils.fields.*)
 * editInput, editSelect: allow to change the value of a field,
   using a selector to identify it. They validate that the input
   exists and trigger the change event automatically.
 * editAndTrigger: allow to modify a field and trigger specific
   events after the value change
 * many2one (testUtils.fields.many2one.*)
   clickOpenDropdown, clickHighlightedItem, clickItem,
   searchAndClickItem: use a field name instead of a selector and
   do all the complex mechanism to open, filter and highlight
   many2one fields.

Joint work with aab, dam, ged, mge, svs and vsc.
2018-11-19 11:24:28 +00:00
Aaron Bohy bcbb7ee3fe [REF] web: properly name relational fields test files 2018-11-19 11:24:28 +00:00
Aaron Bohy 72f53c43b3 [IMP] web: force mobile screen size for mobile suite
Before this rev., the mobile js tests suite was run on a desktop
like chrome-headless (1366x768). This can be a problem for this
suite which tests mobile behaviors and thus clicks on parts of the
interface that are only visible on small devices (thanks to scss
media queries).

This wasn't really a problem until now, because the test framework
allowed to click on invisible elements. But it's no longer the
case since the introduction of click helpers.
2018-11-19 11:24:28 +00:00
qmo-odoo 6f5748d288 [MOV] slides: Rename and split files according to their underlying models
Purpose of this merge is to polish a bit this module before turning
it into "courses" (see task #1902304 for more details on this)

Contains
 * split python model into separate main files to ease models understanding;
 * split views into separate main files to ease views finding;
 * rename files according to guidelines;
 * merge templates in the same file to have all available at hand;
 * move assets in their own file in order to remove noise from templates;
 * Split javascript widgets into their own separate files

No functional behavior change should occur with this commit. Only move
has been performed.

Note that we might lose part of the history as splitting files creates a new
history for new files.

Task: #1909281
Closes: #28679
2018-11-19 08:28:34 +00:00
Robot Odoo 2b896bcf82 [MERGE][IMP] sale,base,account : improve sales onboarding
Purpose : Ease navigation in default screens of Sales app to better onboard new
users and fix various issues in the views.

- onboarding tour : fix "quotations" filter and tooltip appearance
- config bar :
  -remove "Default incoterm" field in "company info" form and move it in
  "invoicing" settings.
  - improve "document layout" form design, set "paper format" as required
  field and add a "preview" button
  - rename FieldReportLayout "Preview" link and put standard report layout (the default one in odoo) as first image
  - fix small design issue in widget
  - "done" button design

- customer form :
  - improve address type tooltip
  - various changes in "accounting" and "sales & purchases" tabs (stat button, fields reorganizing)

- product form : fix "re-invoice policy" field hazardous hiding behavior and improve field appearance
- customer portal :
  - reorganize fields in "customer details" view
  - minor changes in "quotation" view

- Correct "sales order" model description

This merge is related to task ID 1892500 .

closes odoo/odoo#28254
2018-11-19 11:55:01 +01:00
Christophe Monniez 76d29d15bf [REF] tests: add parameter to choose chrome size
When using the HttpCase browser_js method, the window size is fixed to
1366x768.

With this commit, the default window size is still '1366x768' but a test
class that inherits from HttpCase may change it to test mobile layout
by changing the browser_size class attribute.

The browser is instanciated once per test class, for that reason the
window size cannot be changed in the class methods.

To use different sizes in tests, the tests have to be splitted in
classes.

closes odoo/odoo#28760
2018-11-16 14:35:18 +00:00
Robot Odoo 1c1ae3bef9 [REF] base_geolocalize: support multiple provider
- Make it generic: geo_coder (logic) / geo_provider (list of provider)
- Add support for openstreetmap since google make it more complicated: https://cloud.google.com/maps-platform/user-guide/account-changes

Courtesy of @ecino

closes odoo/odoo#28747
2018-11-17 18:41:18 +01:00
Christophe Simonis 6faad524cf [MERGE] forward port branch 12.0 up to bc744a1da4 2018-11-16 19:30:20 +01:00
Jeremy Kersten 6c67539b92 [REF] base_geolocalize, base_setup: ref + make it configurable in settings
Migrate in v12 and Refactor a part of the code
Allow to configure it in setting
2018-11-16 16:24:49 +00:00
Geoffroy Larue df81f2052f [IMP] sale: onboarding and config bar
Improve various design elements in sales onboarding and config bar :

Onboarding :
- tooltip and done button

Company info:
- Move the incoterm field from company view to account settings.

Document layout:
- layout widget relabelling and reorganizing
- paper format as required
- added a Preview button

Payment methods and sample quotation :
- Style and relabelling
2018-11-16 10:13:41 +00:00
Geoffroy Larue 911a754e01 [IMP] base, sale: contact and product form views
Various ux improvements in the product and contact form views :

Contact :
- hide/reveal fields according to customer/supplier status and
reorganize
- fields moved to stat buttons
- addresses : tooltip and relabelling

Product:
- Fix re-expense policy (dis-)appearance and fields style
2018-11-16 10:03:04 +00:00
Geoffroy Larue e9879e63b4 [IMP] portal: improve design
Small changes to the customer portal : form input reorderings,
relabelling, removal of the draft quotation warning.
2018-11-16 09:33:06 +00:00
Emanuel Cino 0fda77e777 [FIX] base_geolocalize allow to use Openstreetmap instead of Google
- Change API provider to prevent invalid API calls
- Move geo_find methods into base.geocoder object to ease inheritance
- Add system parameter to allow use of another provider

fixes #x26924
fixes #x6929
2018-11-15 18:13:46 +00:00
mao-odoo 8a9569b31e [FIX] auth_signup: Error when sending quotation
Fine tuning of this commit:https://github.com/odoo/odoo/commit/7501691da9a9dae832b7d6e78c6a5f57fc983b5c
Fields signup_token, signup_type, signup_expiration are protected
When sending a quotation (mail template 'Sales Order - Send by Email'):
the token needs to be read (and sometimes written)

opw:1907157
2018-11-15 15:28:48 +01:00
Romain Derie 410c07283b [FIX] website: set inherit_id on child COW for view validation
Before this commit:
1. If a view A is being inherited by a view B and C and the view C is doing an
   xpath on B (but inherit A), then copying the tree to make it specific would
   crash.
   Indeed, when copying C, the view inheritance check (while doing the xml
   check) would break since C would be tested against the generic tree and not
   the new specific tree.
2. If a generic view being written with a website_id in the context had already
   a specific child, we would copy both its specific child and generic child
   for the same key instead of simply copying the specific one.
   This happens if we triggered previously a COW on a child view, then only
   that view had been made specific (and is still in the generic tree).
   Then, when cloning the parent, we need to copy and make specific all the
   hierarchy but ignore the generic elements if they already have a specific
   one.

Now:
1. Fixed with adding the inherit_id on the copy vals
2. Fixed with filtering children_ids with filter_duplicate() before cloning the
   children tree

opw-1908308
Closes #27914

closes odoo/odoo#28405
2018-11-15 14:17:28 +00:00
Robot Odoo 3657dc77c2 [MERGE][MOV] survey: rename and split files according to their underlying models
Purpose of this merge is to polish a bit this old module before working
on it. Contains

 * split python model into separate main files to ease models understanding;
 * split views into separate main files to ease views finding;
 * rename files according to guidelines;
 * move data lost in views to data files (server action notably);
 * merge templates in the same file to have all available at hand;
 * move assets in their own file in order to remove noise from templates;

No functional behavior change should occur with this commit. Only move
has been performed.

Future commits will come that will change and improve the way survey behaves.
Having clean files holding code easier to find will help understanding future
changes.

Note that we might loose part of the history as splitting files creates a new
history for new files. However considering history of survey module that is
untouched since several versions we think the tradeoff is acceptable.

This commit is linked to task ID 1903617 and PR #28166.
2018-11-15 15:00:18 +01:00
Lucas Perais (lpe) 551be27593 [FIX] account: aged report: payment for future
Create an invoice for a day, and register a payment right away
BUT choose a date in the future for that payment

Imagine a French Check. You write it, and tell your partner to cash it in
10 days later

You would enter that transaction as a temporary payment
in your own books

OPW 1893646

Before this commit, the line of the partner did not appear in the aged
report after if the report was for the date just after the invoice date

After this commit, it does

closes odoo/odoo#28728
2018-11-15 13:33:00 +00:00
Toufik Ben Jaa 4dae545bf9 [FIX] mass_mailing_sale: check access on SO & invoice report
- When computing the count of quotations count and the invoiced amount
  on a mass mailing, we do not check if the current user has access to
  the models `sale.order` and `account.invoice.report`.

  This fix first check the access rights on the models, if the current
  user doesn't have read access, then we set the computed value to 0.

closes odoo/odoo#28717
2018-11-15 11:39:05 +00:00
Mohammed ShekhaandTejas Shahu f3f20653d3 [FIX] web: update renderer when _callButtonAction failed
Before this rev., the following scenario didn't work:

Open manufacturing order and click on Produce button (note that
bom product should have Serial number enabled) then add quantity
in Done field in o2m and press Record Production button in wizard,
it will produce UserError and after then if you change Lot number
field in wizard's o2m then the many2one value doesn't get selected.

This occured because the renderer wasn't updated after the RPC fail
and thus still got an outdated version of the state.

The issue raised after commit: 02eef78bbd which was done to remove
useless rpc call, it's OK to remove rpc call but let's keep
updating renderer.

Related to task ID: #1852715

Co-authored-by: Tejas Shahu <tsh@odoo.com>
2018-11-15 09:37:22 +01:00
Goffin Simon 7077f18e3a [FIX] website_event: Impossible to track proposal on website
Programming error introduced by 602807acdf

Steps to reproduce the bug:

- Create an event with category='conference'
- Checked Track Proposals on Website
- Save it

An error was raised saying that the website with the id of the event didn't exist.

Further, with the fix but without a website_id specified, checked Track proposal didn't
add the menu to track proposals on the conference.

opw:1904078

closes odoo/odoo#28688
2018-11-14 15:31:08 +00:00
Alexandre Kühn 2b245ebb43 [FIX] mail: no crash on grouped inbox messages previews
Revision on https://github.com/odoo/odoo/commit/5f8d3c61bee40d027efc5041cdc4bca5e67c42d7

Before this commit, there was a traceback when you had two needaction
notifications related to the same document.

This is caused by a typo in the commit above: the object `similarItem`
has a property `messageIDs`, but the code wrongly access the property
`messagesIDs` (see the extra "s").

Steps to reproduce:

- Set notification management to 'Handle with Odoo' for Admin
- Demo mention Admin twice on a specific project task
- Admin opens messaging menu

Display error `Cannot read property 'concat' of undefined`

Issue reported on this PR comment: https://github.com/odoo/odoo/pull/28462#pullrequestreview-175001349

Task-ID 1909521

closes odoo/odoo#28703
2018-11-14 20:29:29 +00:00
Toufik Ben Jaa 774991946e [FIX] mail: no mail sent to followers
- If the `internal` field/column on the message subtypes (table: `mail_message_subtype`) is set to null instead of false in the
  database, the notifications to the followers are not sent by mail.

closes odoo/odoo#28699
2018-11-14 18:54:12 +00:00
Thibault Delavallée 6da632a68e [MOV] survey: split and move files according to their underlying model
Purpose of this commit is to polish a bit this old module before working
on it. Contains

 * split python model into separate main files to ease models understanding;
 * split views into separate main files to ease views finding;
 * move data lost in views to data files (server action notably);
 * merge templates in the same file to have all available at hand;
 * move assets in their own file in order to remove noise from templates;

No functional behavior change should occur with this commit. Only move
has been performed.

This commit is linked to task ID 1903617 and PR #28166.
2018-11-14 14:57:27 +00:00
Nicolas Martinelli ce616fff6c [FIX] sale: 0.01 discount
A discount of 0.01 should appear as a regular discount.

closes odoo/odoo#28686
2018-11-14 14:51:30 +00:00
Thibault Delavallée 066d677b56 [MOV] survey: rename files according to guidelines
Purpose of this commit is to rename some files before going into some more
work. No split or cleaning is done here, only preparing by doing some pure
renaming.

No functional behavior change should occur with this commit. Only move
has been performed.

This commit is linked to task ID 1903617 and PR #28166.
2018-11-14 14:51:25 +00:00
Géry Debongnie c0c326f5ab [FIX] web: restore/remove skipped tests
Some tests were skipped these last months.  This is a slippery slope.
The best time to reactivate them is the moment they were skipped, the
next best time to reactivate them is now.  So, this is what this commit
does.

Three kinds of tests were skipped:
- 3 password tests
- 2 kanban progress bar tests
- one keyboard navigation test

Password tests
--------------
When the auth_password_policy addon was introduced, two tests in web/
were skipped, because they would fail when the auth_password_policy
addon is installed.

Since then, a commit was done to change the way the password field works
(commit 5bbbd25edf).  With this commit,
the password field is no longer an 'include', but a new field widget.
This means that the skipped tests no longer fails.

Kanban progress bar tests:
--------------------------
In saas 11.2, the 'archive all' feature was removed, but it was readded
in saas 11.4.  The tests had to be slightly adapted to make sure they
use the proper css selectors.

Keyboard navigation test:
-------------------------

It is now a functional decision not to allow moving from one cell to the
next by using left/right arrow, so this test is no longer valid.

closes odoo/odoo#28685
2018-11-14 14:44:48 +00:00
qsm-odoo 931fb8f80c [FIX] website: recompute auto more menu on window full load
The previous code made sure we wait for images to be fully loaded before
initializing the auto more menu. But in some cases, it is not enough, we
also have to wait for fonts or even extra scripts. Those will have no
impact on the feature in most cases though, so we will only update the
auto more menu at that time, not wait for it to initialize the feature.

closes odoo/odoo#28684
2018-11-14 14:00:59 +00:00
qsm-odoo 353748c664 [FIX] web: handle auto margins for auto more menus
The auto more menu feature is used to enforce that all items of a menu
stay on one line by adding the ones that would overflow in a dropdown
menu. The feature first need to compute the maximum width the menu can
have. This computation was not correct as it was not considering auto
margins.

This is particularly important with BS4 where all standard menus have
auto margins.

closes odoo/odoo#28683
2018-11-14 14:36:00 +00:00
Arnold Moyaux 4f080a6605 [FIX] mrp, purchase_stock: wrong company on rules
Usecase to reproduce:
- Install a database with demo date and mrp or purchase

The buy/manufacture rules have a wrong company for warehouses
in company 'My company, Chicago'

It happens because the warehouse is not specify in the create
values. In this case it creates the rules and set the user current
company as default.

This commit specify the company during the create call.

closes odoo/odoo#28682
2018-11-14 13:49:24 +00:00
Lucas Perais (lpe) 50e5f73b4e [FIX] fields, test_new_api: monetary related custom
This commit allows for not copying the currency_field attribute
of a monetary field when the monetary field is related,
and when the currency_field attribute is not explicit

Before this commit, the currency_field attribute on the related monetary
was set as the one on the distant model

After this commit, the currency_field attribute takes the field on the
current model

Though the test may appear like an incoherent use case,
it is on the contrary totally legit, as web_studio allows it

OPW 1903113

closes odoo/odoo#28144
2018-11-14 15:14:36 +00:00
Denis Ledoux c41902a21c [FIX] mail: mail queue is interrupted if a recipient is not ascii valid
This is related to revision
71f188082f

This is nice to have a meaningful explanation
for the user to understand why his mail is not sent,

this is better to not interrupt the mail queue when doing so.

Because of the above revision,
when the mail queue iterated on a mail failing because
of an ASCII encoding issue,
the mail queue was interrupted,
and on the next cron call it failed again and again
on the same mail, therefore leading to the mail queue
to never be processed.

Fixes #27804
2018-11-14 17:18:34 +01:00
Christophe Monniez c2827f6b72 [FIX] l10n_be_invoice_bba: remove warning at install
The malformed manifest is causing a warning when testing all l10n.

closes odoo/odoo#28680
2018-11-14 13:29:44 +00:00
Nicolas Seinlet 37306b85de [FIX] project: project var is not defined
closes odoo/odoo#28678
2018-11-14 13:22:55 +00:00
Goffin Simon 9148d86f35 [FIX] sale_stock: Decreasing ordered quantity on a SO
Steps to reproduce the bug:

- Set decimal precision to 7 for products.

- Order 2.000000 of a product.

- Deliver 2.6791200 of the product.

- Go back to the Sales order and change the ordered quantity to 2.6791200.

Bug:

A UserError was raised: "You cannot decrease the ordered quantity below the delivered quantity."

opw:1904580

closes odoo/odoo#28674
2018-11-14 12:42:56 +00:00
Robot Odoo d1509b2201 [FIX] stock: readonly on show details operations
commit c6b0d36622 introduced a wrong
domain. The readonly should be added if the show_operations is false
OR state is done AND is_locked is true.

close #28595

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

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

closes odoo/odoo#28603
2018-11-15 09:47:22 +01:00
Sebastien LANGE d5a540f3ba [CLA] Subteno IT 2018-11-14 16:37:23 +00:00