Commit Graph
117156 Commits
Author SHA1 Message Date
Joren Van Onder 6e931e4e3c [IMP] stock: simplify stock.picking states
Remove 'partially_available'. This particular state is now also
represented by the 'assigned' state.
2017-09-20 15:08:30 +02:00
qsm-odoo bada5a7300 [FIX] web: statusbar margins in in-dialog form views
Form views with a chatter in a dialog on a large screen are styled by
the side chatter feature. This is not a problem as it is made to be
automatically adapted whether a chatter is displayed or hidden, but
in-dialog only rules had to be adapted.
2017-09-20 15:03:56 +02:00
qsm-odoo 63425459b6 [FIX] web: better project kanban_status inactive color
- Use a lighter color so that the red and green ones are more visible
- Use the same color for the column progressbar's inactive state
2017-09-20 15:03:56 +02:00
qsm-odoo 9e051adbf7 [FIX] mail: properly style suggested partner checkboxes in chatter 2017-09-20 15:03:56 +02:00
qsm-odoo 7b965a9673 [FIX] mail, web: chat window and emojis
- Fix several contexts where the emoji popover was hidden by a webclient
  element (control panel / ...). To solve this bug, the design has been
  improved to not use popover but instead use custom design (better
  integrated with new chatter design)

- Chat window is now still usable when a modal is opened

- Simplify chatter LESS
2017-09-20 15:03:56 +02:00
qsm-odoo 26e079f246 [FIX] mail: make clicking on chat window's emoji button properly work
Before this commit, clicking on the button opened the emoji popover
then closed it immediately. This was because of a handler which said
that clicking on any part of the composer should focus the input
element. This is indeed required when the UI is blocked (thanks to
the `blockUI` function). Solution is to not force this focus when
clicking on any composer's button element.

To prevent breaking those two behaviors (blockUI focus and emoji), two
tests were implemented.
2017-09-20 15:03:56 +02:00
Raphael Collet f776f9f3dc [FIX] ir_http: routing map crashes after having run unittests
If the server was launched with ``--test-enable``, `routing_map` tries to load
the routing map of module `None`, which is the current module being tested...
2017-09-20 14:52:43 +02:00
Laurent Smet 85a0399d4f [FIX] web/report: fix header/footer css style in pdf reports (#19579)
After the refactoring of the wkhtmltopdf engine, the headers/footers are managed in a very different way to be able to call wkhtmltopdf only once. The subst JS function must select the right header/footer corresponding to the current page company. However, a <div> was suppressed during the process and then, some external customization might be ignored (see github issue for more details).

-issue: https://github.com/odoo/odoo/issues/19544
2017-09-20 14:38:35 +02:00
Nicolas Lempereur a0fddebe64 [FIX] base: prevent bin_size/binary visual defect
Changing the address type of a contact in the "Contact & Addresses" tab
could in some instance lead to a dead image (just visually, saving it
would not change it) because the image is set to something like
"data:image/png;base64,5.23 Kb" because of a combination of kanba/form
x2many view, onchange, the differences of field present.

In 9.0 this did not happen because the image was not a field in the form
view corresponding to a contact of the kanban contacts view.

In saa-15 thanks to bf26445 the image_small is different than image in
the kanban view and this got us out of the issue.

In saas-16 it is solved even further because new views only load missing
fields.

This commit just get out of the issue by preventing an update of the
records field (with bin_size which caused the issue of the image) when
opening the modal form view of a contact's contact.

Ideally we should solve this more deeply but this is dangerous code to
change (eg. removing the bin_size would solve it but this was done for a
reason and could affect performances) and the effect is just visual in a
very particular set of factors (if we save the form after the image is
dead, the previous image reappeared).

opw-765952
closes #19491
2017-09-20 13:36:51 +02:00
Raphael Collet 69161ed69c [FIX] mail: performance, replace filter() by condition in domain 2017-09-20 13:30:56 +02:00
Raphael Collet 8ffe241bee [FIX] *: incorrect many2many commands
Those cases worked by chance until the former commit.
2017-09-20 13:30:56 +02:00
Raphael Collet 49f6a1b544 [FIX] fields: improve performance of many2many fields
An update by a list of commands is now guaranteed to have at most three SQL
queries to update the relation, whatever the number of commands and records.
2017-09-20 13:30:56 +02:00
Raphael Collet 87970ea344 [FIX] mail: add cached method to retrieve message subtypes
This saves queries to retrieve message subtypes for a given model.
2017-09-20 13:30:56 +02:00
Raphael Collet 38193456d4 [FIX] test_performance: log when number of queries is less than expected 2017-09-20 13:30:56 +02:00
qsm-odoo 09c35696a3 [FIX] *: dashboards automatic colors
* account, hr, hr_recruitment, maintenance, mrp, sales_team, stock

Adaptation of https://github.com/odoo/odoo/commit/a79d83e436e5e965d59663d4a06a0f8a62d8f694 for saas-18 new colors.

Also change back all color defaults to 0 instead of 1 (see
mentioned commit: they were changed from 0 to 1 as in saas-16
the color was applied to kanban headers which had to be gray
(the old color 1) by default).

Also add default violet color for 'Customer Invoices' and 'Vendor Bills'
dashboards.
2017-09-20 12:32:48 +02:00
qsm-odoo d7bc8877bd [FIX] account: allow to click on dashboard header's "done" buttons
A design commit thought that "done" buttons should not be able to be
clicked anymore and forced this with LESS code.
(see https://github.com/odoo/odoo/commit/38a1a452cfd59ad8e7f7359f43ee779e8a3f8329)
2017-09-20 12:32:48 +02:00
qsm-odoo c798f0f744 [FIX] web: style only one kanban hovered link at a time
Hovering a link in a kanban record was adding an hover effect on all the
links which were in the same <div/> parent.
2017-09-20 12:32:48 +02:00
Géry Debongnie a5ca63c83b [FIX] sale: add force_save to make sure SO is correct
Before the new views (SAAS15 and before), the 'readonly' modifier was
kind of weird: a field which was in a readonly state was not saved (the
field was not present in the RPC), UNLESS it is a subfield (for a
x2many).

With the new views, we changed the semantics, to make it more consistent:
fields in readonly state are never sent to the server. This is a much simpler
semantic, but it may introduce some problems, when we actually want to
save the record.  This is solved with a new attribute 'force_save',
where we explicitely have to declare which fields should be save, even
if they are in readonly mode.

In this commit, we simply add the missing force_save attribute to the
order line form view.  This allow the user to create a new SO, add an
order line with some invoice line, and save the result (without this,
the server complains about a missing product_id field)
2017-09-20 12:19:40 +02:00
Christophe Simonis 30b1b89496 [FIX] odoo shell: P3 compatibility when reading script from stdin 2017-09-20 11:31:21 +02:00
Martin Trigaux 27ca297e64 [FIX] tools: python3 compatibility for export terms
Avoid error in babel getting the wrong source file
TypeError: startswith first arg must be str or a tuple of str, not bytes
2017-09-20 11:15:20 +02:00
Martin Trigaux 3dad91aa19 [FIX] pad: avoid changing dictionnary size during iteration
In python3, items() and keys() returns iterators.
Modifying a dictionnary while iterating on it may trigger an error:
    dictionary changed size during iteration
2017-09-20 11:15:20 +02:00
Deep Patel 9b9fcfe628 [FIX] web,base: document template widget in settings
Go to General Settings, click on 'Change Document Template', and
in the opened dialog, click on a template.

Before this rev., it automatically closed the dialog, which was
not really convenient.

This rev. introduces a new field widget (image_selection) for
this use case, and ensures that the dialog doesn't close when
a template is selected.

Test written by @mba-odoo
2017-09-20 10:56:57 +02:00
Mahendra barad fb3ee11649 [FIX] web: smaller rainbow man on mobile
to prevent it from overflowing the view port
2017-09-20 10:54:58 +02:00
Olivier Dony 24f238e97c [FIX] P3: account: fix leftover P2 comparison
str/bool can't be compared anymore in P3, we need a default
comparison value for char/text/date/... fields that aren't
required

Fixes #19558
2017-09-20 10:24:48 +02:00
Nicolas Martinelli dfe96ff38e [FIX] stock: UoM on return lot
- Create a product with:
  Product UoM: kg
  Purchase UoM: lb(s)
  Tracking: By lot(s)
- Purchase 100 lb(s), validate and receive picking (set lot 001)
- Return the picking
- Set the lot

The quantity to do is 45.36 instead of 100.

We make sure to convert the quant UoM (=Product UoM) into the
appropriate UoM.

opw-771930
2017-09-20 10:15:23 +02:00
Géry Debongnie 48b8be29fa [FIX] web: update x2manys when onchange add new line
In this commit, we make sure that if an onchange in a x2many modifies
another line, then the new data is properly shown.  This is quite
tricky, because the field x2many ignores the full extent of the changes.
Also, we obviously want to preserve the editing state (focused field,
...)

So, what we actually do is to rerender the full x2many (minus the new
line) to make sure that we preserve the correct row order.

Note: thanks to MGE for the test and some preliminary work.
2017-09-20 10:05:13 +02:00
Martin Geubelle 3136fc1643 [FIX] web: reuse datapoint with onchange one one2many
Since the rev. https://github.com/odoo/odoo/commit/2728fe1ec1ac7e99819d0f30f29a1814b00c82a4 the onchange create
command (0) send the virtual id as second argument. This argument is sent
back from the server and can then be used by the client.

As the client knows the virtual id, it can easily reuse the datapoint created
for this record and thus avoid creating a new one.

Creating a new datapoint can potentially lead to problems if the record has
for example specialData, that won't be kept.
2017-09-20 10:05:13 +02:00
Deep Patel 9f8efb9d16 [FIX] web: editable list: don't sort rows in edition
This commit disables the sort feature when a row is being edited,
like it was in saas-15, because it didn't work correctly anyway.
2017-09-20 08:20:01 +02:00
Nicolas Lempereur 6252c21000 [FIX] web: modifiers computed when x2many ready
Modifiers (eg. required, readonly, ... on a field) are computed after a
record has been changed. When loading a record they could be computed
based on x2many in a inconsistent state.

eg. on res.partner form, by defaut the email is required depending on:
        [('user_ids','!=', [])]
    but when switching from one record to another this was computed
    wrongly based on the difference between the two records.

This change make the x2many when loading a record ready to be used as
soon as it is set to solve this issue.

forward-port: not needed after saas-15 thanks to framework views rewrite

fix #18239
opw-749483
closes #18815
2017-09-19 17:49:43 +02:00
Laurent Mignon (ACSONE) e34f6aaa26 [FIX] stock: procurements must be confirmed with the right company
The method _procure_orderpoint_confirm in stock/procurement is calld in sudo() by run_scheduler.
Even if this method receives the company as parameter, the company is not enforced for all
the processes trigerred into the method. i.e. If a PO is generated by the run of the procurements
the sequence used is the one of the admin's company and not the one for the given company.
To enforce the company to use, we force the company into the context if it's not the same as
the user's company.

opw:771851
2017-09-19 17:25:27 +02:00
Raphael Collet 3069734d4f [FIX] models: in method onchange, filter out pseudo-fields 2017-09-19 17:06:04 +02:00
Jairo Llopis 35441cfd62 [IMP] doc: add test classes documentation
Closes #13902
2017-09-19 17:00:59 +02:00
Fabien Meghazi f234376034 [FIX] bus: compatibility with Odoo's PAAS external long polling handler
Add a `peek` option in the bus event dispatcher polling in order to let
an external event dispatcher fetch the notifications and their
corresponding channels.

Cherry-pick of rev. f2f99dc091
2017-09-19 16:57:00 +02:00
Fabien Meghazi 4e9b5e8f23 [FIX] bus: compatibility with Odoo's PAAS external long polling handler
Only start the bus events dispatcher when needed (lazy starting).
On Odoo PAAS it's never started because the platform has its own event
dispatcher.

Cherry-pick of rev. a2ed3d3d5b
2017-09-19 16:57:00 +02:00
Cedric Snauwaert 73bec3d60f [FIX] account: reconciliation, error when changing partner
Traceback by pressing enter when changing partner which should not occur as keyUp event is
in place for other M2O fields and not for the partner.

In some case, if the line is balanced (marked as reconciled) and we change the user for one that does
not have any move lines, we removed the selected proposition but we did not changed the line balance, resulting
in a widget that is marked as inactive and no way to do something with it.
2017-09-19 16:25:28 +02:00
dip-odoo 527452e5f7 [FIX] web: fix typo in error message 2017-09-19 16:04:55 +02:00
amoyaux d547f63cb7 [REF] stock: merge quants
In a situation where one transaction is updating a quant via
`_update_available_quantity`and another concurrent one calls
this function with the same argument, we’ll create a new quant
in order for these transactions to not rollback.

This commit adds a method to deduplicate these quants.
2017-09-19 15:55:53 +02:00
Yannick Tivisse 8514df36e9 [IMP] sale_timesheet: Remove commented pdb 2017-09-19 15:48:20 +02:00
Yannick Tivisse a99a0c827a [FIX] sale: Compute correctly is a quote is expired in portal
Purpose
=======

We shouldn't compare the validity date with the begin date of the pager to determine whether a quoation is expired or not
Furthermore we shouldn't let the template compute these kind of things.

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

Add a computed field is_expired. Use it in the template.
2017-09-19 15:46:06 +02:00
Deep Patel 90a253bb72 [FIX] web: Form view: make 'Edit' button bounce in readonly
... when the form is clicked.

This commit restores the behavior of saas-15, before the new views.
2017-09-19 15:04:56 +02:00
Prakash Prajapati 5423efe0a3 [FIX] base: preview invoice pdf template
Go to Settings > General Settings, click on 'Change Document
Template', in the dialog, click on the preview: 'Error: Failed
to load PDF document'.
2017-09-19 13:20:55 +02:00
qsm-odoo a79d83e436 [FIX] mrp, stock: picking type automatic colors
/!\ Should not be forward-ported in saas-18

Fix bug introduced by https://github.com/odoo/odoo/commit/e59c1b49c2d9729e5f7576e1c205701a340f9396:
When creating picking types, a color is automatically assigned. This
color is chosen to be the first available one, or by default 1 (since
mentioned commit, as '1' would be the default gray used in kanban
headers). Unfortunately, this was expressed as `color = first or 1`...
which will always be 1 since the very first available color is always 0.
2017-09-19 12:30:15 +02:00
Christophe Simonis d15a31ae6d [MERGE] forward port branch saas-17 up to 2a343d7c9c 2017-09-19 11:58:01 +02:00
Kirti Choudhary 63ebdd0869 [FIX] web: Display 'Favorites' filters list with a scrollbar when too long 2017-09-19 11:37:01 +02:00
Christophe Simonis 2a343d7c9c [MERGE] forward port branch saas-16 up to c3a48da767 2017-09-19 11:06:46 +02:00
Yannick Tivisse 70ea155a96 [FIX] stock: Define correctly the filter 2017-09-19 11:04:57 +02:00
Prakash Prajapati 4afdc57c88 [FIX] mail: Open simple partner form when email is requested on actions
Purpose
=======

When you want to send an email to a contact without an email address set, you get a wizard to enter the contact email.

In master, you get the full contact form

You should get the simplified form view (like in 10.0)
2017-09-19 10:50:51 +02:00
Nicolas Martinelli 3678cffcf9 [FIX] account: due date
On an invoice:
- Select a partner with payment term defined => due date D1 is set
- Change to a partner withour payment term defined

The due date D1 is kept.

opw-772063
2017-09-19 10:17:38 +02:00
Hardik Patel c3a48da767 [FIX] web: FormView button box: position of More dropdown
Before this rev., the dropdown was positioned in the bottom left
corner of the form view.
2017-09-19 10:14:24 +02:00
Pratima Gupta de48daf53a [FIX] web: FieldDomain: don't open record from selection
The FieldDomain allows to open a list in a dialog to display the
records matching the current domain. In this dialog, clicking on
a record should do nothing (this was the behavior before the new
views).

Before this rev., it actually tried to open the record and it
produced a crash.
2017-09-19 10:14:24 +02:00