Commit Graph
114772 Commits
Author SHA1 Message Date
Martin Geubelle 36d07bfc0f [FIX] web: properly handles ESC in editable lists
This is a small correction of odoo/odoo@3aad756 ; a traceback occured when ESC
was pressed in a list view with modifiers.

The `confirmChange` was done on the parent datapoint (of type list) which has no
attribute `evalModifiers`.

`confirmChange` is now called on the record datapoint. Note that for x2m, it
means that all modifiers linked to the parent record won't be re-evaluated (but
this wasn't probably intended as this is a bit overkill).

Closes #22718
2018-02-07 15:25:54 +01:00
Martin Geubelle 4ae44b3bd9 [FIX] web: prevent crash when downloading pivot view
A traceback was occuring when downloading the pivot view without data.

The export function expects the attribute `main_row` set on data, which
is defined in `_prepareData`. The latter wasn't called because of the `return`.

Closes #22728
2018-02-07 15:25:54 +01:00
Rémi Rahir 376415052c [FIX] phone_validation, crm_phone_validation: Phone number parsing
Before this commit, when filing a phone number field on a model form (typically on website_form),
the module phonenumbers would try to parse the number against the country of the model.

However, this call fails when the number starts with 00 instead of + and that the model
doesn't have a country_id field or if said field is not set.

For this specific case, we chose to skip the number parsing altogether as providing a default
country to the parser can lead to a wrong parsing. i.e, phonenumbers.parse(+32477111111, 'US') will
find the number as US-based when it is a belgian number.

solves issue #22513

Also corrected a faulty behaviour where the option to have a number parsed in its international format
field `phone_international_format` on `res.company` was never properly assessed when the field comany_id of a
model was not present in the model's form view. Added company_id field on opportunity's form view for a proper fix.

Also fixed a syntax error in a logger.
2018-02-07 14:22:46 +01:00
Martin Trigaux 2c6bad6b75 [FIX] calendar: wrong label on field
Was not meaning anything, or implying a number while the fields is a boolean

Courtesy of e2f translators
2018-02-07 17:54:10 +05:30
Florent de Labarre ee7e9198f2 [FIX] stock: don't update a move line with qty=1 with serial product
Use case to reproduce:
- create a product A with serial number
- add 2 product A in stock
- create a delivery order with this 4 product
- Check Availability
- add 2 more product A in stock
- Check Availability
- in the first line the quantity is now 3

It happens because _update_reserved_quantity on stock move
try to add the quantity reserved on simililar move lines.
Howevever in serial case we don't want to have a move line
with a reserved quantity greater than 1.
2018-02-06 17:10:20 +01:00
Nicolas Lempereur c123049805 [FIX] mail: notif display form view not kanban
In mail change about activities in 07f1e902 when opening the record of a
notification, kanban view was in the action views but there doesn't seem
to be a reason and this caused an issue on enterprise mobile (since
kanban view if available has priority).

opw-804529
closes #22848
2018-02-06 15:53:25 +01:00
Florent de LabarreandNicolas Martinelli 71d5425c83 [FIX] purchase: update PO line in procurement
Allow inheritance for PO update as it is already the case for PO
creation.

Closes #22224
opw-806807

Co-authored-by: Nicolas Martinelli <nim@odoo.com>
2018-02-06 13:38:12 +01:00
Pierre Rousseau 3c2d407dd6 [IMP] sms: show characters count 2018-02-06 12:57:50 +01:00
Nikunj Ladava 7895862584 [IMP] sale_payment: hide payment acquirer form when order total is 0 2018-02-06 10:35:39 +01:00
Nikunj Ladava 359769aa8b [FIX] sale_payment: able to pay sale order from portal
Revision on https://github.com/odoo/odoo/commit/eefe879a37aba221bda84adfd880fb7876955920
Changes in the portal payment are wrong, it stops user to pay sale order from portal.
2018-02-06 10:35:39 +01:00
Swapnesh Shah a04a97cec5 [Fix] hr_maintenance: typo
`auto-install` key in manifest instead of `auto_install`
2018-02-06 10:19:38 +01:00
Joren Van Onder 4b74cea413 [FIX] l10n_co: only validate VAT for RUT document types
In Colombia customers can legally identify themselves with various
codes, one of which is the RUT. This is the traditional TIN and
adheres to the rules implement by base_vat. The other types however
don't and so shouldn't be checked by base_vat.

opw-781247
2018-02-05 16:19:48 -08:00
Joren Van Onder b44f559fe7 [FIX] l10n_co: no longer use l10n_co_verification_code
The l10n_co_verification_code field shouldn't have been added in
l10n_co. Instead users should simply append the verification code to
the VAT. This way the vatnumber module used by base_vat will handle
validation correctly.

Removing this is necessary because otherwise we give the impression
that the verification code doesn't have to be included in the VAT
number which makes base_vat complain.

The l10n_co_verification_code will be removed in master.

opw-781247
2018-02-05 16:19:48 -08:00
Joren Van Onder 50f6b19660 [IMP] l10n_co: set some default accounts on taxes
opw-781247
2018-02-05 16:19:48 -08:00
Joren Van Onder a7ca77ce7f [FIX] l10n_co: IVA Compra tax increased to 19% in 2017
opw-781247
2018-02-05 16:19:48 -08:00
Joren Van Onder 4dcb0c83d3 [IMP] l10n_co: set the correct default sale and purchase tax
The default sale and purchase tax are determined by the default_get
method of wizard.multi.charts.accounts. It will pick the sale and
purchase tax with the lowest sequence.

This adds a sequence field in account.tax.template.csv so the default
ones can be given a lower sequence.

opw-781247
2018-02-05 16:19:48 -08:00
Joren Van Onder 986a7550a5 [IMP] l10n_co: add some useful accounts
- Certain income accounts
- Accounts related to taxes
- Accounts related to the Rte Fuente Certificate Report

opw-781247
2018-02-05 16:19:48 -08:00
qsm-odoo d130f22432 [FIX] web_editor: resolved failed forward-port
Forward-port https://github.com/odoo/odoo/commit/f5e7b866860436782ade53308da1ff725be1f124
failed for commit https://github.com/odoo/odoo/commit/78a556601e6b1e72c6d1ac776e31588dd2ffa28f
2018-02-05 15:30:18 +01:00
Arnold Moyaux aed8f45346 [FIX] delivery: compatibility with batch_picking.
Use case to reproduce:
- Install delivery/batch picking
- Process 2 pickings in a batch.
-> Traceback due to ensure_one.

It happens because the action_done method in delivery is
not multi and batch_picking launch action_done on multiple
picking.

This commit makes action_done in delivery multi.
2018-02-05 14:03:54 +01:00
Christophe Simonis 2dbc1edef9 [MERGE] forward port branch saas-16 up to b503e79722 2018-02-05 13:42:10 +01:00
Christophe Simonis b503e79722 [MERGE] forward port branch saas-15 up to 81003c82e0 2018-02-05 13:08:32 +01:00
Christophe Simonis 81003c82e0 [MERGE] forward port branch saas-14 up to f22cf5f711 2018-02-05 12:36:48 +01:00
Christophe Simonis f22cf5f711 [MERGE] forward port branch 10.0 up to e5f2e6d390 2018-02-05 12:02:02 +01:00
Florent de Labarre 3d18214637 [FIX] stock: unpack wrong implementation of api.multi
The filtered on move_line_ids should be applied on move_line_ids of
package and not self.
2018-02-05 11:48:37 +01:00
Andrea Stirpe 9cba40fa89 [FIX] website_rating: typo
typo in the manifest of website_rating: auto_installable instead of auto_install
2018-02-05 11:32:08 +01:00
Christophe Simonis e5f2e6d390 [MERGE] forward port branch 9.0 up to b08185fc66 2018-02-05 11:30:42 +01:00
Adrian Torres 985c224e2f [FIX] sale_management,account_invoicing: proper uninstall
Previous to this commit, installing sale_managmenet/account_invoicing
would add some menu items for the `sale/account` module
(which contains all the logic for the sale/accounting flow)
and it would also install sale/account since it's a dependency, however,
horror would strike if one were to go and uninstall
sale_management/account_invoicing: nothing happens!

This is because these "facade" modules don't actually install anything, and
uninstalling an app does not force the uninstallation of its
dependencies, thus the `sale/account` module would stay installed, along with
the views introduced by the "facade" module.

To fix this, we create an uninstall_hook which forces the removal of
the ir.ui.menus that the "facade" modules introduce, so that the
functionality remains (for modules that depend on it) but it's not
user-accessible (because it should only be accessible to users if the
facade module is installed).
2018-02-05 09:25:08 +01:00
Nicolas Martinelli 352be6b6df [FIX] mail: date format
Use a date format in order to display the due date of an activity since
it is a date filed, not a datetime.

Closes #22614
opw-813736
2018-02-05 09:07:38 +01:00
Grzegorz Krukar 5a6123c699 [FIX] hr: don't use restricted field in domain
is_address_home_a_company has a groups on the field (introduced at c6b2fa47,
forward port of 2d777d5ade)

Fixes #22687
Closes #22686
2018-02-05 12:29:31 +05:30
Odoo Translation Bot 348ba041d7 [I18N] Update translation terms from Transifex 2018-02-04 04:27:20 +01:00
Odoo Translation Bot df1accbf53 [I18N] Update translation terms from Transifex 2018-02-04 00:48:03 +01:00
xmo-odoo 43617bbcb6 [FIX] type error when exporting to tarfiles
When exporting to a tarfile, we first export each module's translations
to a file on the FS, then create a tarball from all of them.

With the P3 bytes/string split, translation export was defined to export
to a bytes IO object in order to work correctly with CSV (which work on
bytes IO for better cross-version compatibility). However the tgz file
export was left opening module's files in `w` mode, which in P3 means
text, which blows up as POFile expects to ultimately write to a bytes IO
object: it uses text, and a StreamReaderWriter is used to translate that
into an underlying bytes IO.

Fix by explicitly opening the files in binary mode.

Fixes #22700
2018-02-02 19:39:51 +01:00
Nicolas Lempereur b08185fc66 [FIX] product: can't search attribute value
A name_search on attribute line would possibly ends up with a domain like:

 ['|', ('attribute_id', '=', 'm'), ('value_ids', '=', 'm'),
  ('attribute_id', '=', 'm')]

which would just search the attribute.

This is caused by calling the default name_search. This commit forgo
the default name_search when we are in this attribute line special case.

courtesy-of: @fmdl

opw-813505
closes #22619
closes #22760
2018-02-02 17:13:14 +01:00
Swapnesh Shah 2c6cb479d3 [FIX] calendar: added missing float_time widget in calendar tree view
This commit closes #22546
2018-02-02 16:35:54 +01:00
Lucas Perais (lpe) 63c39c7460 [FIX] hr: soft-prevent read of employees forbidden field
Before this commit, when having a simple employee (group employee) accessing the form view
of hr.employee, there was traceback because the field is_address_home_a_company was not in the view

This is because of commit 2d777d5
which restricted this field to the group_hr_user (Officer) in Python

When the view itself is not group-restricted
The JS loads everything from the view but puts invisible=1 on sections that have a group

The field, in our case, is forbidden before that and is not loaded, whereas the domain in which it is used is loaded

After this commit, the view loads correctly, while avoiding leaks as intended

OPW 813721
2018-02-02 16:08:00 +01:00
Martin Trigaux 3e91cbf47d [FIX] web: wrong translation
Was making the web client crash in Chinese

Fixes #22748
2018-02-02 15:39:42 +01:00
jem-odoo bff85097ce [FIX] project_timesheet_holidays: fix tests
The data in tests use 'datetime.today()'. This can
add second and milli seconds: if those are not zero,
a 4th day of work will be count (hence the '+1').
The test craches with "3 != 4" when the test was executed
on a 'zero second' time.

As Dr Emmett Brown would say : "Time traveling is just
too dangerous !"
2018-02-02 13:53:35 +01:00
Christophe Simonis dc8698132a [IMP] odoo shell: set expected __name__ for scripts read from stdin
Name of scripts piped to `odoo shell` were `__builtin__` (`builtins` in
python3), which is not really obvious (and awful if your script must
handle python2 and python3).

Change it to `__main__`, allowing to use to common pattern
`if __name__ == '__main__':`
2018-02-02 13:36:32 +01:00
Nicolas Martinelli dccdff2539 [FIX] purchase: purchase kit product
The issue solved with 24eee9d7ba was introduced back with
7333f5e9b8.

opw-808056
2018-02-02 13:26:45 +01:00
Lucas Perais (lpe) 03d50e5f2a [FIX] pad: push HTML to the pad server by default
Before this commit, when duplicating a task,
the pad of the original one was updated with plain text
Hence losing all the layout.

This was because, in all likelihood, Odoo's Etherpad server did not support pushing HTML

At the time of the commit, Odoo's pads can receive HTML.
We then push HTML by default, falling back to pushing text as before
if necessary

OPW 806064
2018-02-02 13:24:53 +01:00
qsm-odoo 76665df0cf [FIX] website_forum: allow portal users to post replies to replies
Before this commit, when connected as a portal user, the user was not
able to post replies to existing replies. This is because the textarea
section was marked to be displayed for connected internal users only.
This commit removes the whole group restriction. Indeed, it makes sense
(as a fix), to show the textarea section for public users too. Indeed,
the "Reply" button is already shown to public users but does not do
anything. With this commit, clicking the "Reply" button shows the
textarea section for everybody and, if the user is not connected,
redirects to the login page when posting the message. This of course
needs usability improvements in master.

Note: the problem had originally been fixed for regular answers with
commit https://github.com/odoo/odoo/commit/b81b03c82d282dc94595a9beb94444041509ef25

Note 2: both mentioned problems were originally introduced by commit
https://github.com/odoo/odoo/commit/9069d0127c176317436b67b23ae5677dd9d53de7

Closes https://github.com/odoo/odoo/issues/22648
2018-02-02 11:04:31 +01:00
Martin Trigaux 56a25e5f0c [FIX] base_import: translate column name
The labels of the imported columns were untranslated, displaying the name of
the field in English

opw-813996
Fixes #22703
Closes #22717
2018-02-02 10:16:38 +01:00
Nicolas Martinelli 1b1978eec1 [FIX] account: default taxes
Use `ir.values` for default taxes. Stop using `ir.config_parameter`. The
logic is made in order to be as error-proof as possible.

Backport of a9ede7fdfa

opw-807226
2018-02-02 09:59:59 +01:00
Nicolas Martinelli ad9edfc2dd [FIX] payment_stripe: missing route
In case an invoice is required to be paid thanks to the route
'/my/invoices/', the user is redirected to '/shop/payment/transaction/'.
If website_sale is not installed, this causes a crash.

Complement of 2bd17285ea

opw-813481
2018-02-02 09:17:30 +01:00
Nicolas Martinelli 4df087b24d [FIX] payment_stripe: incorrect route
The route should contain the SO id, not the acquier id.
2018-02-02 09:17:30 +01:00
Nicolas Martinelli ecfcaea080 [FIX] payment_stripe: correctly handle error
If there is an error, we should handle it first. Otherwise, some keys might
not be found in the results (e.g. 'object' or type') and cause a crash.
2018-02-02 09:17:30 +01:00
Christophe Simonis bf9024abcb [FIX] web: correctly forward-port 695bd75a13
Match implementation of original backport
2018-02-01 17:05:28 +01:00
Christophe Simonis f5e7b86686 [MERGE] forward port branch saas-16 up to 920aa6174c 2018-02-01 17:02:19 +01:00
Christophe Simonis 920aa6174c [MERGE] forward port branch saas-15 up to e0422bfd6c 2018-02-01 16:40:13 +01:00
Christophe Simonis e0422bfd6c [MERGE] forward port branch saas-14 up to 7d465aa56c 2018-02-01 15:39:39 +01:00