Commit Graph
110111 Commits
Author SHA1 Message Date
Martin Geubelle 46751de506 [FIX] web: correctly style o_status class
The `o_status` style has been moved in a previous rev. in `fields.less` which
is only for `o_field_widget` nodes.

This class however is used in other context than a field (e.g. on a label in
the project.task.type form view) so its style needs to be placed at an upper
level.
2017-06-15 10:59:35 +02:00
Aaron Bohy f6525c6b6c [FIX] web: BasicModel: onchanges: send all values
Since commit ebd17217c4, values of readonly fields inside x2many
fields weren't sent for onchanges, whereas they should. This was
for example an issue on the stock.picking form view (which is in
state 'draft' by default). If the user added a stock.move, the
state field on the move wasn't sent for the onchange, and thus the
state field on the picking was set to false.
2017-06-15 08:39:50 +02:00
Joren Van Onder 86cf4f41b7 [FIX] point_of_sale: don't race order destruction in customer display
By the time the product images are downloaded the current order object
may have already been destroyed. This can happen when e.g. clicking on
the 'Next order' button.
2017-06-14 15:28:24 -07:00
Darshan Kalola 7b4748835c [FIX] project: merge tasks should be filled automatically.
With the new views, the merge task feature did not properly precomplete the selected tasks.  This is because they do not support the command 4 when creating a new record.  This will be fixed at some point, but meanwhile, we can just simply return the selected ids in the default_get.  This makes the code slightly simpler.

(PR #17566, issue 746867)
2017-06-14 16:37:20 +02:00
Aaron Bohy a3bea9a62b [FIX] web: Form: delete the correct record
When the user duplicated a record 'A', and deleted the new record
'A (copy)' directly, the wrong record was deleted: 'A' was deleted
instead of 'A (copy)', because de id of 'A' was bound to the delete
handler, and it wasn't updated after the duplication.

Also correctly updates the record's offset after the deletion, so
that it doesn't produce a warning when deleting the last record of
the dataset.
2017-06-14 10:15:37 +02:00
Aaron Bohy 70624772b2 [FIX] web: Pivot: allow to click on a cell
Before this rev., when the user clicked on a data cell of a pivot
view, it crashed. This was due to several problems, fixed by this
commit.
2017-06-14 10:15:37 +02:00
Jérome Maes bc415bd137 [FIX] sale_timesheet: use float_compare in tests 2017-06-14 08:48:29 +02:00
Christophe Matthieu 83115b2a10 [FIX] web: SelectCreateDialog uses the domain of the view when searching
before this fix: the domain is used when opening the dialog but it is not
used if the user update the filter or the group_by.
2017-06-13 15:47:47 +02:00
Aaron Bohy 708c1c2915 [FIX] web: false id should remain false in evalContext
'id' is a particular field that should not be considered like other
integer fields. For instance, in the evalContext, its value should
not fallback to 0 if it is false. This would break domains in attrs
like ['id', '=', False], which is supposed to be true on new (not
saved yet) records.

This was for example the case in the Product form view: go to Sales
Orders form view, add a line, on the product field choose 'Create
and Edit', try to save the product -> error: field Product Template
is required but not set (actually it is invisible), as its required
modifier says ['id', '!=', False], which was always the case.
2017-06-13 09:26:40 +02:00
Aaron Bohy ebd17217c4 [FIX] web: BasicModel: don't write on readonly fields
Ultimately, it seems that sending the value of readonly fields
when saving is not such a good idea. Suppose that there is a
computed field displayed as readonly in a form view. This field is
computed from other records, e.g. from a one2many field which is
editable in the form view. Finally, the inverse function of the
computed field creates the one2many records. If the user adds some
records to the one2many, then saves, the readonly computed field's
value is sent to the server as well, and thus the inverse function
is executed, which isn't what we want.

This commit essentially reverts 0494d61274, except that we now take
into account the readonly modifier to determine whether or not a
value is sent to the server, and not only the readonly attribute of
the field (which can be seen as a default). Before rev. 0494d61274,
we made a difference between write and create RPCs, for an unclear
reason. We don't do that anymore: readonly fields are never sent to
the server (same behavior as before the new views).
2017-06-13 08:24:59 +02:00
Aaron Bohy 5c4485d182 [FIX] web: Many2one in X2Manys: quick create then save line
A problem occured with a required Many2One inside an X2Many (e.g.
order_line field in sale.order form view). If the user clicked on
'Add an item' to add a row, then typed some text in the Many2One,
then clicked on 'Create ...' to quick create a new product, and
then directly clicked on 'Add an item' to add another row (before
the name_create returned), the first row was discarded.

This was because before the name_create returns, the Many2one still
has no value, and as it is required, the row was considered invalid
and then discarded.

This rev. ensures to wait for the name_create to return before
trying to save the row and to create a new one.
2017-06-13 08:24:59 +02:00
Christophe Simonis 76262f2043 [FIX] web: handle correctly deactivation of duplicate option
This new behavior has been introduced by previous forward-port.
2017-06-12 20:10:11 +02:00
Christophe Simonis 50d8ea1d58 [MERGE] forward port branch saas-15 up to aae12c2bad 2017-06-12 19:37:28 +02:00
Christophe Simonis aae12c2bad [MERGE] forward port branch saas-14 up to 62fec71568 2017-06-12 19:19:42 +02:00
Christophe Simonis 62fec71568 [MERGE] forward port branch 10.0 up to fcc33f3e09 2017-06-12 18:55:24 +02:00
Christophe Simonis fcc33f3e09 [MERGE] forward port branch saas-11 up to 6ceecffcad 2017-06-12 18:52:53 +02:00
Christophe Simonis 6ceecffcad [MERGE] forward port branch 9.0 up to d9d455bea3 2017-06-12 18:18:05 +02:00
Christophe Simonis d9d455bea3 [MERGE] forward port branch saas-6 up to 5ae9205070 2017-06-12 18:12:16 +02:00
Christophe Simonis 5ae9205070 [MERGE] forward port branch 8.0 up to 06141c34a5 2017-06-12 18:08:03 +02:00
Goffin Simon 7bc52a34ba [FIX] sale_margin: margin in company currency in sale.report
The margin must be expressed in the company currency like price_total
or price_subtotal.

opw:746038
2017-06-12 16:54:29 +02:00
Christophe Simonis 222cca2feb [FIX] crm: valid the salesteam when programmatically change the user of a lead
Implement it as a constraint.

Better implementation of fdc8749888
2017-06-12 16:48:08 +02:00
Cédric Pigeon b5a224a583 [FIX] add missing multi-company security rule for stock_location_route
Multi-company rule for stock_location_route

opw:746761
2017-06-12 16:23:21 +02:00
Martin Geubelle a4d9292a12 [FIX] web_kanban: allow column creation on custom model
This is a back-port of the commit https://github.com/odoo/odoo/commit/1a2c05e98bba7694831c82b7be8bb81a9c46535c
that had been applied in saas-16.

As this has been considered as a bug, it should be fixed in previous versions.

No need to forward-port it after saas-15 then.
2017-06-12 16:16:59 +02:00
fwi-odoo 06141c34a5 [FIX] auth_oauth: don't assume that google and facebook providers always exist
Before this commit, it was not possible to reach the general settings when one
of the "default" provider was delete.
After this commit, we don't assume anymore that there are google and facebook
providers.

opw-746907
2017-06-12 15:13:09 +02:00
Thomas Binsfeld 2dc82664ae [FIX] purchase: billed qty
In a SO, the "Invoiced Qty" can decrease if the refund is generated from
the SO. It doesn't decrease if the refund is generated from the Invoice.
However, we don't have this mechanism in a PO since the invoice is not
generated directly from the PO. There is therefore no way to decrease
the "Billed Qty".

We authorize the "Billed Qty" to decrease in the case of PO.

Backport of c6a7e4fbb9

Closes #17564
opw-747038
2017-06-12 14:49:02 +02:00
Nicolas Martinelli 6582781058 [FIX] hr_expense: multi-currency
When an expense sheet contains several expenses with various currencies,
some issues arise:
- the currency is not specified in the form view
- the report mixes the currencies
- the total amount doesn't make any sense

Fixes #17341
opw-745714
2017-06-12 14:43:05 +02:00
xmo-odoo c257daf310 [FIX] account: import does not set partner_type
When creating an account.payment via the form view, an onchange sets the
partner_type based on the payment_type (which has a contextual default)
and the field is view-required.

When importing however if the user does not specify a partner_type
(which they are not specifically told about) the payments will be
created with no partner_type and thus classified as "internal payments"
and will not appear in either the Sales > Payments or the Purchases >
Payments, confusing them and making them think the import has failed
despite having correctly validated and raised no errors.

Add a default_partner_type matching each action's domain (and default_payment_type) such that the imported payments are correctly classified by default.

OPW-746479

fixes #17388

closes #17497
2017-06-12 12:16:16 +02:00
fwi-odoo b6a08dc982 [FIX] web: hide 'duplicate' action for ir.model.fields
It shouldn't be possible to duplicate ir.model.fields. Add attribute
´duplicate´ which can be set to false to hide the duplication option in the
action menu.
2017-06-12 11:14:55 +02:00
Nicolas Lempereur ed61da6793 [FIX] base: duplicate company => duplicate partner
The name of a company is uniq. The name of a company comes from a
partner and is required.

Thus duplicating a company didn't work.

With this change, if no partner is overriding the copy, the current
partner is duplicated and associated to the new duplicated company.

opw-746106
closes #17532
2017-06-12 11:14:06 +02:00
xmo-odoo ed4a899254 [IMP] config: better no interpolate 2017-06-12 11:02:36 +02:00
Nicolas Martinelli 1aff1e3de8 [FIX] point_of_sale: error picking
- Create a stockable and a service product
- In the POS, sell 1 unit of the stockable product and -1 unit of the
  service product
- Validate and pay

2 pickings are created: a picking containing the stockable product which
stays in state 'Draft' and an empty picking in state 'Available'.

The problem comes from the negative quantity on a service product: we
should filter out services when checking the quantities.

opw-745712
2017-06-12 10:41:05 +02:00
Odoo Translation Bot 264c2c64f2 [I18N] Update translation terms from Transifex 2017-06-11 07:07:07 +02:00
Odoo Translation Bot 5952c394e5 [I18N] Update translation terms from Transifex 2017-06-11 04:27:18 +02:00
Odoo Translation Bot 4dbc9b5472 [I18N] Update translation terms from Transifex 2017-06-11 00:27:53 +02:00
Christophe Simonis 78dc8f6871 [FIX] website_crm_partner_assign: correctly check value changes
Since fdc8749888, leads may have a
default team set. Correctly check fields against previous values.
2017-06-09 18:56:07 +02:00
qsm-odoo fc53b91b06 [FIX] web: adapt tests to 3741603495
The datepicker is now forced to be in the <body/>, so the tests had to
search it in there.
2017-06-09 17:55:52 +02:00
xmo-odoo c50745f1a1 [FIX] base_geolocalize: geocode errors out on empty address
It's unclear whether that's a recent change or a long-standing issue,
however currently if geocode is called with an empty address string it
will reply with a 400 Bad Request, which gets raised as an exception and
forwarded to the user. That is not a great experience.

Shortcut the entire thing and just return None (= geolocation failed /
no geolocation) on trying to geolocate an empty address.

OPW-746686

backport of 74a89bcf5c
2017-06-09 16:52:31 +02:00
Christophe Simonis cc38b93ab2 [MERGE] forward port branch saas-15 up to 49f819a7a7 2017-06-09 16:43:27 +02:00
Jérome Maes fb504f3cbd [FIX] sale_timesheet: compute revenue in a determinist order
Since we handle rouding error with the last line as
the difference of total and the other (already computed),
the order of lines to process is important.
Calling 'sorted()' on the lines to process allow
to always have the same last one.

Hope this will fix the random rounding bug, and make
the multi currency test always green !
2017-06-09 16:27:15 +02:00
Jérome Maes c5df9b572c [FIX] sale_timesheet: use same method for delivered and ordered
Respect the same computation about rounding for
delivered and ordered services when computing
timesheet revenue.
2017-06-09 16:26:53 +02:00
Christophe Simonis 49f819a7a7 [MERGE] forward port branch saas-14 up to b6c7d71899 2017-06-09 16:21:15 +02:00
Christophe Simonis b6c7d71899 [MERGE] forward port branch 10.0 up to cd1a8f6252 2017-06-09 13:28:06 +02:00
Jérome Maes 287958b57d [FIX] hr_timesheet,project_issue_sheet: can see timesheet tab
Only timesheet user can see the timesheet tab
on tasks and issues. This will avoid them logging
timesheets and getting access errors.
2017-06-09 13:12:16 +02:00
Jérome Maes 56948bb245 [FIX] hr_timesheet: set correct default value for timesheet
When logging timesheet, no employee is set by
default on the UI. The employee is deduced
from the user_id in the create, but we want to
see it on the list view even if it is not saved
yet.
2017-06-09 13:12:07 +02:00
Christophe Simonis cd1a8f6252 [MERGE] forward port branch saas-11 up to 1d7260cbcb 2017-06-09 13:08:51 +02:00
Christophe Simonis 1d7260cbcb [MERGE] forward port branch 9.0 up to 77be3d8b39 2017-06-09 12:51:31 +02:00
xmo-odoo 74a89bcf5c [FIX] base_geolocalize: geocode errors out on empty address
It's unclear whether that's a recent change or a long-standing issue,
however currently if geocode is called with an empty address string it
will reply with a 400 Bad Request, which gets raised as an exception and
forwarded to the user. That is not a great experience.

Shortcut the entire thing and just return None (= geolocation failed /
no geolocation) on trying to geolocate an empty address.

OPW-746686
2017-06-09 12:26:38 +02:00
Goffin Simon 6edc0f7e6b [FIX] calendar: _get_recurrent_date_by_event
Let's create in google calendar a reccurent event with all day
set and a end date.

When synchronising google calendar with Odoo(by clicking on button
"Sync with Google"). It raised on error because the start date had
a time zone but not the end date(the UNTIL in the rrule).

Fine tuning of 20ed57f

opw:746549
2017-06-09 01:04:21 +02:00
qdp-odoo bd4da1b749 [FIX] sale, sale_expense, stock_landed_costs: fix nightly build.
stock_landed_costs: on nightly, the localization installed may not have stock properties accounts defined. If it's not, we create them on the fly with a random account

 sale, sale_expense: fix broken tests due to mismatch currency:
    On 10.0-nightly, the currency of the company is not the same that the product.list0
    that leads to assertion errors.
2017-06-08 17:40:21 +02:00
Nicolas Martinelli f66fb9061d [FIX] website_forum: karma link
The karma link is an hardcoded page from odoo.com. The information might
therefore not be correct depending on the configuration of the user.

We change to redirect to the FAQ, which also contains Karma information.

opw-746383
2017-06-08 17:01:17 +02:00