Commit Graph
103141 Commits
Author SHA1 Message Date
Nicolas Martinelli 8f39ad2be6 [FIX] point_of_sale: action_assign before force_assign
This allows the reservation in sub-locations before forcing the
availability.

opw-726060
2017-04-05 11:09:26 +02:00
Nicolas Lempereur 0b2fd60041 [FIX] web: editable list view regression bc031379 (9.0)
In 9.0 in some particular instances with embedded views, if:

- an x2many list view is editable,
- we go from a form view of an existing record to creating a record,
- the timings of deferred resolving are in a certain order

the x2many list view could be tought as loaded whilst in reality it is
the 'editable list view' row editing 'form view' that has been loaded.

This could cause sometimes issues after bc031379 because the onchange
computation would happen before the list view is really loaded.

This is probably an issue with the deferred system in one of the views,
but it would be rather hard and dangerous to change it.

So this fix introduce an additional test which ignore relational views
if there is an embedded view.

opw-726701
opw-726768

note: only needed for 9.0, the relational views have been changed as of
saas-11 and this issue is not present.
2017-04-04 17:29:53 +02:00
Thibault Delavallée 4d3fc120e7 [FIX] event: correctly compute 'done' state of mail scheduler
Currently line was incorrect as the purpose is to ensure all lines of
the scheduler are sent. Currently not send lines are filetered and therefore
not taken into account. This commits fixes it.
2017-04-04 10:43:22 +02:00
Pedro M. Baeza 659103718f [FIX] account: determinist view swticher order
Both tree and form view have the same sequence, which haas, at best no effect,
at worst, shows the form before the tree view.
In the second case, making that clicking on the bank journal name drives you to
a new bank statement instead of the list of existing ones.

Closes #16187
2017-04-03 10:30:12 +02:00
Jeremy Kersten 7db14bbe69 [FIX] res_users: show the computed base.user_groups_view view in dev mode
Before this commit, in dev mode, the view was read from xml with the dummy
template. Set arch_fs to False will force to use the view in database and so
the automatically computed view.

This commit closes #16179
2017-04-03 09:34:26 +02:00
Odoo Translation Bot 963c9ffa4a [I18N] Update translation terms from Transifex 2017-04-02 00:32:12 +02:00
Cedric Snauwaert 8221310e4d [ADD] l10n_in_schedule6: required coa for india that was lost during migration to v9 2017-03-31 12:10:22 +02:00
Nicolas Lempereur 4cfd03d056 [FIX] calendar: no add Contact when no useContacts
On a form view the attribute `use_contacts` will:

- when set to True: enable us to add contacts which will be available on
  any time in the calendar,

- when unset: the list of contact is only the contact currently beeing
  seen directly in the calendar.

The feature for adding contact is thus not necessary when
`use_contacts` is unset. But it still appeared without having any effect
(which is unexpected).

This commit remove the contact adding feature when it has no necessity.

opw-715932
2017-03-31 09:24:51 +02:00
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