Commit Graph
103218 Commits
Author SHA1 Message Date
qdp-odoo e2a239f4a4 [FIX] account: fix test.
This was broken since commit 925440b7a0 that was specifically restricting the closing of a FY if any unposted move was left in the system.
2017-03-28 11:59:00 +02:00
qdp-odoo 925440b7a0 [FIX] account: restrict fiscalyear closing if there are still unposted entries 2017-03-28 10:49:32 +02:00
Pierre Masereel 8fd0f8664b [FIX] theme_default: full width in mobile
When a theme is customized to be 'boxed', the website is not full width
in mobile, and there is an horizontal scrolling.

To fix this issue, we removed only set the width of the "wrapwrap" div
to 85% when the screen is bigger than a phone.
2017-03-27 14:22:00 +02:00
Goffin Simon a3b70c5f70 [FIX] account_check_printing: Print Checks
When clicking on button "Print Checks" on "account.payment", if the
check is not printed, the state of the "account.payment" doesn't have
to be change in state "Sent". Now the state is changed in function
do_print_checks which is overwritten in repository enterprise.

opw:725626
2017-03-27 14:20:08 +02:00
Olivier Colson 4cd39776c0 [FIX] account : use default company in demo data
With multiple companies defined, ensure consistency in demo data in case a localization reusing the ones defined in account module is installed. Before that, the demo data used several hardcoded values to reference the company, but some models relied on the default company, which lead to crash when the active company was not the one hardcoded in demo data and such a new localization got installed.
2017-03-27 10:00:31 +02:00
Odoo Translation Bot 7aea6c9ad4 [I18N] Update translation terms from Transifex 2017-03-26 03:09:57 +02:00
Odoo Translation Bot 1e476e59fe [I18N] Update translation terms from Transifex 2017-03-26 00:31:50 +01:00
Christophe Simonis 8376f538b5 [MERGE] forward port branch saas-6 up to 9d04d14669 2017-03-24 17:11:48 +01:00
Christophe Simonis 9d04d14669 [MERGE] forward port branch 8.0 up to 08213e831e 2017-03-24 17:07:03 +01:00
Christophe Simonis 08213e831e [REM] useless empty sql file wrongly commited by 0b529cf3af 2017-03-24 17:03:11 +01:00
Damien Bouvy 52b3b1f1bf [FIX] purchase: don't raise if standard route is deleted
New api regression: xmlid_to_res_id() had the flag to raise set to
false by default while ref() does the opposite. Since the intent
here was clearly to allow not finding the record (given the if
condition under the ref call), avoid crashing for a simple default.
2017-03-24 15:39:25 +01:00
Christophe Simonis 8caac6bc44 [MERGE] forward port branch 8.0 up to 5847de4aaf 2017-03-24 15:23:16 +01:00
Christophe Simonis 5847de4aaf [FIX] web_calendar: remove attendee icons from event title 2017-03-24 15:12:39 +01:00
qsm-odoo b2d66d0c14 [FIX] web: properly combine domains with "OR" in CompoundDomain
The CompoundDomain class allows to regroup several domains with an
implicit "AND"; these domains can be either a string, an array or
another CompoundDomain. A CompoundDomain can then be converted to
an array thanks to pyeval.js.
For example, if a CompoundDomain is initialized with `[A, B]` and
`[C]`, the array conversion gave `[A, B, C]` (which is expected).

However, a hackish method was used with CompoundDomain. If one of the
domain of a CompoundDomain is equal to `["|"]` (an array with the
OR operator in it), the two next subdomains were supposed to be joined
by a OR operator. Indeed, for the case of a CompoundDomain initialized
with `["|"]`, `[A]` and `[B]`, the array conversion gave `["|", A, B]`
(which is expected). However, if initialized with `["|"]`, `[A, B]` and
`[C]`, the array conversion gave `["|", A, B, C]` which is very wrong
as what was expected is `["|", "&", A, B, C]`. The problem is that the
given `[A, B]` contains implicit "&" operators.

This commit fixes the problem by normalizing only if the CompoundDomain
starts with a ["|"] or ["!"] array which is the standard odoo case.
This allows to limit breaking custom code (e.g we want a simple "AND"
of `[A]` and `[B]` to stay `[A, B]`, not become `["&", A, B]`).

The commit also modifies a test so that it checks that the problem is
properly solved.
2017-03-24 15:03:54 +01:00
Nicolas Lempereur 8d948d9235 [FIX] barcodes: fix FieldFloatScannable on firefox
On firefox pressing special keys such as: Left Arrow or Backspace
trigger a keypress event.

This is different from google chrome which only generate a keydown and
keyup event.

There was thus two issue when using a FieldFloatScannable and firefox:

1. Keys such as ArrowLeft: would still be catched by FieldFloatScannable
   and be added programatically to the field but since Odoo didn't fix
   them a ASCII NUL character (0x0) would be added (in firefox it is
   represented by a large space).

2. Keys such as Backspace: would still be catched by FieldFloatScannable
   but were modified and corrected by Odoo so the corresponding ASCII
   character was added (ASCII BS character (0x8) for backspace).

The feature in FieldFloatScannable which add the character is used to
add characters for which the browser had been prevented to display them.

Thus this fix:

- for issue 1 and 2: only use the feature of FieldFloatScannable if the
  event was previously prevented and the current one is a forgery.

- for issue 2: add "Backspace" and "Delete" as specials characters which
  should not be modified or stopped by the scanner heuristic.

opw-706352
2017-03-24 14:07:07 +01:00
Fabien Meghazi a82fb281d1 [FIX] web/mail: many2many_tags_email widget returns erratic values (opw: 693067)
The many2many_tags_email's internal value change logic fails to process
all its values. It is not concurrency proof either.

The internal value change logic is now replaced by a mutex and deferreds
are used for the partner's form view popups in order to allow concurrent
events.
2017-03-24 11:31:00 +01:00
Fabien Meghazi 874c7aa2dd [FIX] web/mail: many2many_tags_email widget returns erratic values (opw: 693067)
The many2many_tags_email's internal value change logic fails to process
all its values. It is not concurrency proof either.

The internal value change logic is now replaced by a mutex and deferreds
are used for the partner's form view popups in order to allow concurrent
events.
2017-03-24 11:28:31 +01:00
Goffin Simon 4269bcfc25 [FIX] project: group by stage_id on project.task
Grouping by stage_id on tree view in "project.task" when group_by_full
is defined on stage_id(to show all the stages in kanban view even if
they are empty), grouped by stage without summing all other the fields
such as remainig_hours.

Reason: The order defined in "project.task.type" was not strict and the
function _read_group_fill_results cannot group if the order defined by the
group_by_full(right_side) and the read_group(left_side) is not the same.

opw:724785
2017-03-23 18:36:50 +01:00
Gustavo Valverde 06c5db50b6 [IMP] l10n_do: update CoA (for IFRS), taxes, fiscal positions and journals.
Courtesy of Gustavo Valverde. PR #13787

Details:
-------
- Easier implementation for most of the people
- Minor customization to be fully compliant with local regulations
- Standardized configuration to help other Odoo consultants and implementers
- Use of the account types defined in account instead of creating new ones

To comply with local and tax regulations:
-The whole Charts of Accounts was changed
-Most of the Journals has been preconfigured to comply with tax regulator
-All the regulatory taxes were added and configured with group taxes

To standardize the Dominican implementations:
-An IFRS compatible CoA that does not need major changes for most companies
-A well structured CoA with a codification logic.
-Use of the Odoo original flow for creating tax compliant invoice sequences
2017-03-23 16:49:06 +01:00
Raphael Collet 09c7ec59ce [FIX] base_action_rule: prevent double execution only in recursive calls (#15863) 2017-03-23 16:02:55 +01:00
Goffin Simon 0b529cf3af [FIX] http: setup_lang in Safari
Fine tuning of this commit: 5761b9a388

opw:716519
2017-03-22 17:03:23 +01:00
qsm-odoo 1505fee0e3 [FIX] web_editor: properly transcode fa alias icons
When adding a font-awesome icon to a mail template, the icon is
converted to an image once the template is saved. To do that, the
code checks all the `.fa-XXX` definitions in the stylesheets to know
which content the image have to use. The problem is that this was
not considering the font-awesome aliases. Indeed, the `fa-facebook-f`
icon was able to be used while its alias `fa-facebook` was not working.
2017-03-22 13:12:33 +01:00
Goffin Simon 5761b9a388 [FIX] http: setup_lang in Safari
When not logged in the webstie on Safari and clicking on "Have a Question? Chat with us",
it creates a mail.channel from get_mail_channel and it also creates a translation.
But with Safari, the accept_languages is set with the value 'fr-fr', and this value was set
in the context as the lang='fr_fr'. So when the translation was created, a bad insert query was
raised in sql because the lang didn't exist in the res.lang table. When a translation is created,
the function _get_languages checked that the language is in the table.
So it was impossible to use the chatter when the user is not logged.

NB: interseting functions to see:

-setup_lang in odoo/http.py
-_dispatch in addons/website/models/ir_http.py
-get_mail_channel in addons/im_livechat/models/im_livechat_channel.py

opw:716519
2017-03-21 17:02:59 +01:00
Nicolas Martinelli 8ec819418b [FIX] hr_expense: tax on expense
- Create an expense with a tax
- Validate and post entries

3 AML are created, one on the expense account, one on the account
payable, one for the tax. However, the AML of the expense account is not
linked to the tax, and therefore does not appear in the reports.

opw-715488
2017-03-21 13:40:02 +01:00
Jairo Llopis f1bf457803 [FIX] mass_mailing: do not remove image with link
If you followed these steps, Chrome deleted the link and image:

1. Create a new mass mailing, fill the subject.
2. Drag & drop any snippet with pictograms.
3. Change a pictogram for an image.
4. Add a link to the image.
5. Save the record.

This happen in chrome if the image was for example floating in
the link, so this change check if an element is a contained element
is visible before removing it.

This issue doesn't happen with [jQuery 3][1] and may be linked to
[this][2].

[1]: http://api.jquery.com/visible-selector/
[2]: http://stackoverflow.com/a/8337382/1468388

closes #15623
opw-710237

note: this is only needed in 9.0 and saas-11 because this features
doesn't seem present in version 10.0
2017-03-21 12:47:09 +01:00
Lucas Perais 1600216c1d [ADD] hw_screen: implement support for customer facing displays (#15303)
This adds the hw_screen module which is responsible for receiving
rendered HTML from a POS client and sending it to a running Chromium
browser. This is done by sending Remote Debugging Protocol messages over
a WebSocket provided by Chromium. This allows hw_screen to evaluate
arbitrary JS. This is used to seamlessly (without flickering) update the
browser.

This also includes changes to the POSBox. X, Chromium and some
miscellaneous other programs were added. Functionality was added that
automatically displays a fullscreen, UI-less Chromium browser when the
POSBox starts up. This is accomplished through x_application.sh, which
gets executed only when a display is detected. After the browser starts,
it will display a specific screen until it receives the first order update
from a POS client.
Creates a public controller to be able to display the interface on an external
device not connected to the posbox (e.g. tablet)

Courtesy of JOV, LPE, ODO and MAT
2017-03-21 11:50:12 +01:00
Cedric Snauwaert 89581abf14 [FIX] account: field commercial_partner_id should be compute_related=True
OPW: 716163
This is needed to fix the following problem: adding a partner to res_partner.child_ids will mark all element of child_ids as 'todo'
and trigger a write on res_parner.commercial_partner_id for all element of the child_ids and then on the related field
account_invoice.commercial_partner_id. This can cause problem if partner in child_ids belong to different company and have invoices. This will throw a
read access error when doing the _write method of account_invoice. Adding the compute_related=True to account_invoice.commercial_partner_id
ensure that the _write on that field is done in sudo.
2017-03-21 09:45:13 +01:00
Nicolas Lempereur 9dbd6d21e1 [FIX] web_calendar: timezone on event display regression
In fb05d884 event that were not displayed for arabic were fixed but
there could be an error when displaying timezone caused by this change.

As said in https://fullcalendar.io/docs1/event_data/ignoreTimezone/ the
ignoreTimezone parameter is set to `true` by default in FullCalendar 1
(this is not the case in current FullCalendar).

So there is two way to solves this time zone issue:

- keep fb05d884 and have the parameter ignoreTimezone set to `false`
- use momentjs `.toString()` to get a javascript english date string
  which will thereafter be parsed by javascript `new Date()`.

This commit use the second way since it is nearer what was originaly and
hopefully safer.

opw-705752

momentjs doc on toString: http://momentjs.com/docs/#/displaying/as-string/
2017-03-20 17:54:03 +01:00
Mike Mugge 177a25ff10 [FIX] base: correct example spelling in docstring
hdfs is the scheme for hadoop, not hadopp

Closes #15926
2017-03-20 17:00:50 +01:00
Mike Mugge 9cefe9bf2d [CLA] signature for sylnsr
Done at #15926
2017-03-20 17:00:50 +01:00
CGenie 047f361a92 [CLA] signature for CGenie
Done at #15929
2017-03-20 16:54:58 +01:00
Nicolas Lempereur bc0313791c [FIX] fields, web: improve form onchange to x2many
In a form view, when a field onchange lead to a change on a x2many,
there was two different behavior:

- if the x2many had an embedded view (eg. a tree view inside a form
view) the onchange would notify that it expected the x2many field in
this embedded view to be changed and handled the changes correctly.

- if the x2many had a default view, the onchange ORM would not be
aware the x2many could be modified and would not sent the changes
back causing blank or not updated x2m lines and error on save.

---

Two solutions were birthed to solve the second point:

=> PR #10557 = solving everything

With this PR the onchange in the ORM is aware of every fields in the
current view (even field in a x2m in a x2m in a x2m in a form view) and
if any of these are change the javascript gets back the value of the
fields present in the view.

This PR has currently not been merged by fear of changing too much and
anyway could only be done in master.

=> PR #12249 = if no field for x2many, send its form view fields

With this change, if the ORM onchange is not aware of the fields in the
x2many widget to returns, all the field in the x2m default form view are
returned.

This was merged in bbdf960 but introduced a number of other issue:

- in most situation the x2many is represented by a list view, which may
have fields missing of the form view,  so the original is still present.

- the view used may differ from the default form view in other way
(depending on value in context or other possibilities).

- the form view could have fields not present in the form view which
could end up in `write` on fields which should not be written to.

---

This commit reverts bbdf960 and adapts a small part of #10557 so the
x2many with default view works as an embedded x2many. For more than one
level (eg. a x2many in a x2many) this would still not work but it is
only solvable by a PR such as #10557 which could only be targetted for
master.

With this commit:

- the list of fields sent to ORM onchange is computed at the first onchange
- the fields from a x2many field default view is sent for onchange
- the initial onchange on record creation is delayed to when x2many are loaded

closes #12249, closes #15336, closes #15890
fixes #11236, fixes #12249, fixes #15129, #15419
opw-705965 opw-716095 opw-715619 opw-710440

note: already present in 10.0 (with a test) as f65475d68
2017-03-20 13:28:34 +01:00
Odoo Translation Bot a09e4aa7aa [I18N] Update translation terms from Transifex 2017-03-19 02:55:34 +01:00
Odoo Translation Bot 9bbf34231a [I18N] Update translation terms from Transifex 2017-03-19 00:31:31 +01:00
Nicolas Martinelli af64780a2d [FIX] base: no-break hyphen
- Create an invoice with two products
- Each line has a long description (spread on 2 lines)
- The second line has a negative value
- Print the invoice (PDF)

The amount spreads on two lines, split as:
$ -
1,000.00

This is due to the wkhtmltopdf version with patched QT. Unfortunately,
upgrading to the latest version 0.12.4 doesn't solve the problem.

The solution is to replace the '-' by a non-breakable hyphen.

opw-711002
2017-03-17 09:07:15 +01:00
Nicolas Lempereur 508a002e69 [FIX] web_editor: glitch english several times
When using the iframed editor with multilang selector (present if there
is another lang installed than en_US) an "English" language was present
before each translation language.

opw-696891
2017-03-17 08:10:52 +01:00
Nicolas Lempereur fb05d8845d [FIX] web_calendar: events not appearing in arabic
Fullcalendar expect as `start` and `end` property of an event object:

> When specifying Event Objects for events or eventSources, you may
> specify a string in IETF format (ex: "Wed, 18 Oct 2009 13:00:00 EST"),
> a string in ISO8601 format (ex: "2009-11-05T13:15:30Z") or a UNIX
> timestamp.

(as seen in https://fullcalendar.io/docs1/event_data/Event_Object/)

Before this commit we could for example in arabic provide an invalid
date string "٢٠١٧-٠٣-١٦ ١٦:٠٠:٠٦" instead of "2017-03-16 16:00:06".

This commit solves this by always providing fullcalendar an ISO8601 date
string.

opw-705752
2017-03-16 22:07:29 +01:00
Nicolas Lempereur f50ba68be7 [FIX] web_editor: handle margin:initial correctly
The transcoder (which transforms stylesheet rules to inline style) did
some compression of the padding and margin css properties to not always
have margin-top + margin-right + margin-bottom + margin-left.

This could cause an issue when the value of margin or padding contained
an initial or inherit value because browsers (at least firefox and
google chrome) doesn't allow it. Thus the preview could for example have
bigger veritcal spaces arround `<p />` tag than what was seen when
editing.

With this fix instead of invalid:

    margin:initial initial initial initial

we have:

    margin:initial

And instead of invalid:

    margin:initial 5px 6px 7px

we have:

    margin-top: initial; margin-right: 5px; margin-bottom: 6px; margin-left: 7px;

opw-706535
2017-03-16 18:26:32 +01:00
Martin Trigaux 8459860b02 [IMP] hw_escpos: more fault tolerant printer detection
In some cases, the description fails (unknow printer, udev issues,...) and while
the printer works fine, the description fails.

This is a cherry pick of 994d45f4 to 8.0 (as the posbox is built on top of it)
2017-03-16 13:37:20 +01:00
Nicolas Martinelli e542b450a3 [FIX] sale_stock: duplicate qty
- Create a stockable product, create a SO selling 1 unit.
- Confirm the SO, validate the Picking 1 => delivered qty is 1
- Return Picking 1 and validate Picking 2 => delivered qty is 1
- Return Picking 2 and validate Picking 3 => delivered qty is 2

The delivered quantity should remain 1.

opw-715685
2017-03-16 13:15:46 +01:00
Nicolas Martinelli a873890f28 [FIX] mass_mailing: link in kanban
- Go to Mass Mailing > Configuration > Mail Templates
- In the Kanban view, find a template which contains a link (http,
  mailto, whatever)
- Click on the link

You are redirected to the link instead of being redirected to the
record.

opw-706047
2017-03-14 16:19:04 +01:00
Martin Trigaux 4c79aa8d9d [FIX] sale: translate default name at creation
When a sale order is created from the interface, the name field is read-only so
not given in the create call.

However, if the create values are filled with the default value, the string
'New' is translated and the condition is not met in the create method.

This commit makes the create consistent with the default `lambda self: _('New')`

Fixes #15839
2017-03-13 16:03:58 +01:00
Christophe Simonis 73d6f9023a [MERGE] forward port branch saas-6 up to 31474efec2 2017-03-13 13:53:54 +01:00
Christophe Simonis 31474efec2 [MERGE] forward port branch 8.0 up to 7a15e52cea 2017-03-13 13:38:04 +01:00
Christophe Simonis 7a15e52cea [FIX] base: check ir.ui.view recursion 2017-03-13 13:27:53 +01:00
Odoo Translation Bot 70cac4d474 [I18N] Update translation terms from Transifex 2017-03-12 02:54:51 +01:00
Odoo Translation Bot dcd78c2c39 [I18N] Update translation terms from Transifex 2017-03-12 00:30:59 +01:00
Denis Ledoux 4e95474ca1 [FIX] website_event_track: Tracks in the wrong room in the agenda
When setting an event tracks like this:
- Track 1, 10:00 to 10:30 Room A
- Track 2, 10:30 to 11:00 Room B
- Track 3, 11:00 to 11:30 Room A

In the agenda of the event, on the website, the Track 2
was displayed as in the Room A, while it should be in the Room B

opw-715480
2017-03-10 17:09:11 +01:00
Denis Ledoux 466e2b8c9f [FIX] mail: URL regex to make links clickable in chatter messages
The former URL took way too many steps to resolve
`www.odoo.com(odoo-odoo-odoo)`, more than 1 minute
according to the case, and it stucked the web client
(the entire browser actually),
and it ended matching the whole sentence as a link,
included `(odoo-odoo-odoo)`

This new regex is much simpler, resolve the above case,
and does not match `odoo-odoo-odoo` as part of the link

opw-715797
2017-03-10 17:09:11 +01:00
Nicolas Martinelli e6e6a8889f [FIX] account: typo
The context is created as a set, not a dict.

opw-716141
2017-03-10 10:28:23 +01:00