Commit Graph
91500 Commits
Author SHA1 Message Date
Olivier Dony 8241c46f0f [FIX] hr_payroll: make internal method private
Only methods that are meant to be accessed by the client-side directly
(or via RPC) should be public. All others should be private by default.
2017-09-28 14:15:00 +02:00
Christophe Simonis 89df681b45 [MERGE] forward port branch saas-15 up to da15615c45 2017-09-28 11:56:23 +02:00
Christophe Simonis da15615c45 [MERGE] forward port branch saas-14 up to aca401c500 2017-09-28 10:53:37 +02:00
Joren Van Onder 8cbd29f696 [FIX] mrp: display attachment image in mrp.document kanban view
Before this the mrp.document id was used to construct the /web/image/
link which lead to the wrong attachment being previewed and
downloaded. Introduced by the refactoring that happened in
d193350c6f.
2017-09-27 17:14:43 -07:00
Goffin Simon 5c308d2bee [FIX] stock: Error when creating a stock.location
When creating and setting a parent location a stock.location,
a traceback was raised because a name was required in function name_get

opw:77441
2017-09-27 17:46:18 +02:00
Christophe Simonis af117236de [MERGE] forward port branch 10.0 up to 8165018058 2017-09-27 17:07:23 +02:00
Christophe Simonis 6836828a3e [MERGE] forward port branch 9.0 up to 1970761554 2017-09-27 13:20:29 +02:00
Aaron Bohy ca258b8691 [FIX] web: style of required fields in x2many lists
In community, the input/textarea of required fields should have a
blue background. Before this rev., this wasn't the case inside
lists.

Closes #19689
2017-09-27 12:13:58 +02:00
Aaron Bohy 2d3e5711f1 [FIX] web: escape pressed in editable list in dialog
should discard the edited row, but not close the dialog. Before
this rev., it was closing the dialog.
2017-09-27 12:13:58 +02:00
Martin Geubelle df04910d2a [FIX] *: correctly use session
Widget has no attribute `session` since the new views.

One should either use `getSession()` or require `web.session` (both
cases are correct).
2017-09-27 11:04:08 +02:00
Martin Trigaux 88edeeca6a [FIX] preventing context.get('lang')
The lang in the context can be None or False
To avoid similar error as revealed at ede29e6d, correctly retrieve the context
2017-09-26 16:58:59 +02:00
David Monjoie a3828dfed3 [FIX] web: fix o_row mechanism with phone field
The o_row class mechanism is supposed to be used to put another
element next to a field, like a button for example. However,
in the case of phone and email field, the o_text_overflow hack
gets in the way.

The problem that o_text_overflow is trying to solve is when you
have a long email, the table used to display the form view fields
tends to use very long cells (td) so it can display the whole email
address. This behavior completely breaks the form view, even though
the email address is clearly set to wrap in css. The o_text_overflow
class is a hack that forces the table to think that the email is
small, then defaulting to the width 50% css rules. If the email is
too long, it is correctly wrapped inside the cell, without breaking
the form view layout.

However, when we need to add a button next to those fields, this
hack gets in the way of the o_row class css rules, completely
wrecking it. We looked for a fix with qsm-odoo for hours but were
unable to find one that did not require a complete rewrite of the
form view css rules. In the end, we decided to remove the hack from
the phone field and keep it on the email field, as we think it is
less common to have a very long phone number than to have a very
long email.
2017-09-26 16:21:51 +02:00
Axay Javiya ede29e6d31 [FIX] l10n_be_hr_payroll_fleet: fallback for no language
If the context is lang=None, it crashed as called babel with a None locale.

Closes #18403
opw-756026
2017-09-26 16:16:50 +02:00
qsm-odoo e520aabc43 [FIX] website_slides: allow upload of >20MB files (as limit is 25MB)
There is a double-check (on client and on server) to prevent the user to
upload a >25 MB document. The client checks the actual file size while
the server guesses it from the total received payload. This server guess
is wrong as the extra payload is quite huge (5-10MB). Now the server
checks the real file size as it should have from the beginning.
2017-09-26 14:04:55 +02:00
Aaron Bohy 28a2ba00ac [FIX] web: Calendar: update breadcrumbs and buttons
In calendar views, the breadcrumbs should display the period
displayed in the view (e.g. in month mode, something like 'April
2017'). Moreover, the 'Day', 'Week' and 'Month' buttons should be
highlighted when the corresponding mode is used.

This rev. ensures that this is the case.
2017-09-26 14:01:49 +02:00
Axay Javiya 484d33d931 [FIX] point_of_sale: fix traceback on 'Analytic Rules' stat button 2017-09-26 11:17:23 +02:00
Adrian Torres 83024ca3d6 [FIX] calendar: Fix unicode reminders
Before this commit, if a reminder was created and the dates being
formatted contained unicode characters the whole thing would break
because python + unicode is hard.

Example: Japanese with Asia/Tokyo timezone and creating reminders
of 1 day, see support ticket 771674
2017-09-26 09:30:17 +02:00
Goffin Simon de95e6f4a8 [FIX] account_asset: float division by zero
The number of depreciations or the period length of your asset category cannot be null.

opw:773790
2017-09-25 15:35:59 +02:00
Goffin Simon 28755e1f41 [FIX] sale_mrp: Wrong call of _compute_quantity
The signature of the function _compute_quantity is
 _compute_quantity(self, qty, to_unit, round=True, rounding_method='UP')
With courtesy of @PierreFaniel

Closes #19682

opw:774104
2017-09-25 15:20:47 +02:00
qsm-odoo 0b4f190b0f [FIX] website_event_track: allow to edit tracks' info in frontend
Before this commit, the track description and partner biography were
not able to be edited after proposal.
2017-09-25 11:55:17 +02:00
Odoo Translation Bot c8796d45fe [I18N] Update translation terms from Transifex 2017-09-24 07:14:32 +02:00
Odoo Translation Bot 3550a68d96 [I18N] Update translation terms from Transifex 2017-09-24 04:41:28 +02:00
Odoo Translation Bot 740ddf81b0 [I18N] Update translation terms from Transifex 2017-09-24 01:44:27 +02:00
Denis Ledoux 633b5495b7 [ADD] event, event_sale: registration summary methods.
Method which return summary information about the registration,
which can be used by email or QWeb templates to fetch useful
information about the registration.
2017-09-22 22:25:56 +02:00
Goffin Simon 3a6fb27148 [FIX] account: Register a payment with no sequence for account.payment
Fine tuning of this commit: ce2d00f346

opw:767224
2017-09-21 22:17:51 +02:00
Yannick Tivisse 8e2d7c2e3c [FIX] hr_expense: Make expense sheet report multi currency coherent
Purpose
=======

Currently, if we want to print an expense report that has several currencies in its expense lines, the total amount is hidden on the report. Otherwise, it is simply summed.

That could lead to confusing uses cases. Example.
1 expense line of 92 dollars.
1 expense report expressed in euros.

In the report we will have
- 1 line of 92 dollars
- Total amount: 92 euros

Which is obviously wrong.

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

Always display the amount + Compute the amount in the expense report currency, by converting the amount with the rate at the day the expense has been made.
2017-09-21 16:51:13 +02:00
Christophe Simonis 88395bdb8e [MERGE] forward port branch saas-15 up to 3ad3b34df6 2017-09-21 16:00:27 +02:00
Christophe Simonis 3ad3b34df6 [MERGE] forward port branch saas-14 up to 537d1ec0d2 2017-09-21 15:08:34 +02:00
qsm-odoo b51b0d66c2 [FIX] web: open domain selector's datepicker at the right position
Before this commit, and since the combination of new views + datepicker
library update, the datepicker opened at the top left of the window
when using it in a domain selector. It also could not be used at all.

This was because the current scenario occured:
1) Click on the datepicker
2) The datepicker triggers that it has changed on opening
3) The whole domain selector is rerendered
4) The datepicker computes where it should open... on basis of the
   old destroyed domain selector

As the main cause of the problem here was the (2), this commit changes
the datepicker odoo widget to only notifies that it has changed when it
has really changed.
2017-09-21 14:51:12 +02:00
Christophe Simonis 537d1ec0d2 [MERGE] forward port branch 10.0 up to e245135421 2017-09-21 14:01:41 +02:00
Christophe Simonis e245135421 [MERGE] forward port branch 9.0 up to d53a201987 2017-09-21 13:55:52 +02:00
Haresh Shyara 5b216c03c1 [FIX] account: wrong default journal on vendor credit note 2017-09-21 12:01:51 +02:00
Aaron Bohy c3a32fc98c [FIX] web: keep settings form view in edit mode
when coming back using the breadcrumbs.

The settings form view should always be displayed in 'edit' mode.
Before this rev., it was re-rendered in 'readonly' when the user
clicked on a link in a setting view (opening another view stacked
in the breadcrumbs), and then came back to the settings view using
the breadcrumbs. For instance, go to 'General Settings', click on
'Activity Types', come back.
2017-09-21 08:12:15 +02:00
Aaron Bohy 130c47bc0a [FIX] web: several minor issues with editable list
- correctly update the pager when a record is added or removed
- destroy the widgets of the removed row when the user clicks on
  'Cancel' when creating a new record
- ensure that the list always contains 4 rows (before this rev.,
  in list views with less than 4 records,   if the user created a
  new record, then clicked on 'Discard', there were only 3 rows
  left
- properly destroy field widgets when removed from the DOM

Note that the change of parent.parentID to parent.static is not a
bug fix, but it's better to use the key that indicates the type of
list element, instead of implying it from other attributes.
2017-09-20 17:07:04 +02:00
Goffin Simon 776e77b67c [FIX] account, point_of_sale, purchase, sale, website_sale: correctly set included tax in multi-company
A product can have multiple included taxes (i.e. one by company).
When computing the product price with function _fix_tax_included_price,
only the taxes of the company should be considered. Otherwise it could remove
all the included taxes of all companies.

ps: When no company is set on the SO, all the taxes visible from the company of the user
are set for the product of the line. Same behavior as in _compute_tax_id.

Closes #19566

opw:770464
2017-09-20 15:53:14 +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
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
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
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
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
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
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
Hardik Patel 116aa22685 [FIX] web: reset offset to 0 when searching for records
Scenario: Go to any list or kanban view: go to next page and set a
filter that matches less that 'limit' record (e.g. less than 40),
but at least one. No record will be displayed, because the offset
is kept for the search_read.

This rev. ensures to reset the offset to 0 when a search is done
using the searchview.
2017-09-19 10:14:24 +02:00
Darshan Kalola 8ba10a3b9a [FIX] web: FormView: invisible='True' on x2many fields
Before this rev., it crashed if an x2many field had the
attr invisible set to 'True' in a form view.
2017-09-19 10:14:24 +02:00