Commit Graph
103133 Commits
Author SHA1 Message Date
Nicolas Martinelli bbb3bd876a [FIX] account_extra_reports: Partner Ledger report
- Activate multi-currency
- Create an invoice in a currency different from the company currency
- Go to Accounting > Reporting > Management > Partner Ledger
- Activate the option "With Currency"

The report printed doesn't contain the amount currency.

opw-726440
2017-03-30 15:50:45 +02:00
Nicolas Martinelli cc6a5110ee [FIX] mrp_repair: description language
The description should be in the partner's language, as in a SO.

opw-725060
2017-03-30 14:46:32 +02:00
Goffin Simon 50591ac0b2 [FIX] stock: Customer address in deliveryslip
When there is no move line linked to the picking, the customer address must
be the address of the partner linked to the stock.pick
Backport of this commit: 79d8849

opw:725721
2017-03-29 22:59:11 +02:00
Nicolas Lempereur 105243afa6 [FIX] web_editor: fix select and modify video
There was an issue when selecting a video tag:

- a tag inside the video tag would be selected instead of the video tag
  so video could not be removed or modified (modifying it would add a
  video or image inside the video itself and so on).

- the selection was not conveyed to the editor so it would be lost
  consequently due to some code who restored it to what was saved on
  the editor.

This fix solves this by changing how the video tag was selected and
saving the selected range on the editor.

opw-724701
2017-03-29 16:35:39 +02:00
Martin Trigaux 1b5dcf29f5 [FIX] report: remove duplicated dict key
Bad forward port, added at 2c90fad and fe7b3c66
Replaces and closes #16130
2017-03-29 15:39:14 +02:00
Nicolas Martinelli 14989806a6 [FIX] event: email schedule
- In "Events > Configuration", set "Email Scheduling" to "No automated
  emails"
- Create an event
- Register an attendee

An email is sent.

opw-724787
2017-03-29 13:46:24 +02:00
Nicolas Martinelli 989d7068e9 [FIX] account_asset: multi-currency depreciation
- Create an asset category with a journal of type "Purchase" or
  "Miscellaneous".
- Create an asset in a currency different from the company currency
- Validate and post the first entry.

The error "The amount expressed in the secondary currency must be
positive..." is raised.

The sign is determined by the journal type. However, in case of an asset
depreciation or a deferred revenue, the amount is always positive. The
amount is negative in case of an asset created from a refund invoice
(see commit c844534f8a).

There is actually no need of a `sign` variable. In case amount is
positive:
- first move is a credit, therefore `amount_currency` is negative
- second move is a debit, therefore `amount_currency` is positive

In case amoutn is negative:
- first move is a debit, therefore `amount_currency` is positive
- second move is a credit, therefore `amount_currency` is negative

opw-725358
2017-03-29 12:57:52 +02:00
Nicolas Martinelli a4bc731f04 [FIX] mrp_repair: repair order
- Have a contact in language A
- Be connected in language B
- Go to repair and create a repair order for contact with language A

When printing repair order report (quotation), it is printed in language
B.

opw-725060
2017-03-28 16:34:24 +02:00
Christophe Simonis e876becada [MERGE] forward port branch saas-6 up to 7bcfa2b52a 2017-03-28 16:01:05 +02:00
Christophe Simonis 7bcfa2b52a [MERGE] forward port branch 8.0 up to 5fc3979262 2017-03-28 15:22:58 +02:00
Jairo Llopis 5fc3979262 [FIX] web: Avoid double-fetching many2many tags in list views
Before this patch, #15920 was happening. The problem was that calling `render_cell` produced a call to [`record.set(column.id + '__display', value)`][1], which triggers the `change` event, which called `render_record` the first time, which called again `render_cell` and produced the 2nd data fetch.

After this patch, `render_record` is only called if there is some place where to put the result, which does not happen in those situations.

There is still the problem that there is one call to name_get for each many2many widget found in a list view (instead of one per full view rendering), but at least they are not two calls!

[1]: https://github.com/odoo/odoo/blob/5d17749ff47c02294d5ff2ae56bbcef9d082562e/addons/web/static/src/js/view_list.js#L1125
2017-03-28 15:12:56 +02:00
Wolfgang Taferner 8e7f34c323 [FIX] web: domains might be undefined, so we check
Introduced recently in b2d66d0c14

opw-726354
Closes #16068
2017-03-28 15:02:47 +02:00
Nicolas Martinelli 59a6397867 [FIX] stock: sort moves to do
- Activate the MTO route on SO lines
- Activate the route "Buy" on a Product A without quantity on hand, add
  a supplier
- Create a SO with 2 lines. First line is Product A, second line is
  Product A with route MTO
- Confirm the SO, run the procurement if necessary
- Confirm the PO, receive the products
- On the picking generated from the SO, you should have one line
  "Waiting Availability" (the line not MTO) and one line "Available"
  (the line MTO).
- Click "Recheck Availability". One reserved quant from line 2 is moved
  to line 1.

A trick is to assign first the move with ancestors, so we don't "steal"
the reservation on the other move.

Fixes #15950
opw-725373
2017-03-28 13:30:29 +02:00
Christophe Simonis 30dda3faee [MERGE] forward port branch saas-6 up to 8fd0f8664b 2017-03-28 13:16:16 +02:00
Martin Trigaux e25dad4fed [I18N] point_of_sale: missing source terms reference 2017-03-28 12:49:01 +02:00
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