Commit Graph

94907 Commits

Author SHA1 Message Date
Denis Ledoux 037257b887 [FIX] payment_adyen: back-port of 3dafb19
opw-672504
2016-03-21 13:02:26 +01:00
Goffin Simon cc335879a7 [FIX] sale_stock: _check_routing in drop shipping
When checking the route of a product, if the product is set with route drop shipping
then the product is available.

Inspired from 14fd46c0d59dbb0365019a21bf1263b17ab99dbb

opw:672392
2016-03-21 10:44:00 +01:00
Joren Van Onder 9df2921743 [IMP] hw_blackbox_be: implement support for registered POSBoxes
POSBoxes will be registered with the government. If a POSBox is not
registered it won't load the blackbox driver, preventing communication
with the Fiscal Data Module.
2016-03-21 09:10:34 +01:00
Odoo Translation Bot f5cc04caa7 [I18N] Update translation terms from Transifex 2016-03-20 02:58:59 +01:00
Goffin Simon af61494667 [FIX] account_asset: compute depreciation button
It is not allowed to recompute the depreciations when the asset
is confirmed.

opw:672203
2016-03-17 14:38:42 +01:00
Goffin Simon 21beef4b19 [FIX] account_asset: period_id field
The field period_id didn't exist in model "account.asset.asset"

Closes: #11262

opw:671494
2016-03-17 09:41:47 +01:00
Nicolas Martinelli 7b7f3fa76a [FIX] account: filter out special periods
When computing the balance, debit and/or credit, the opening period must
be filtered out. Otherwise, the invoices which are still opened at the
time of the period closing will be counted twice.

opw-670584
2016-03-16 09:59:13 +01:00
Goffin Simon f66fcf97b2 [FIX] stock: Transfering the pack
When transfering the pack, the priority to the moves in state "assigned"
or partially_available(=true) must be given.

Used case (steps):

-set warehouse with three steps to delivery
-create one product A with qty on hand 10
-create sale order with first line product A by qty 2 and the second line with product A with qty 10
-confirm sale order
-check availability
-transfer pick by qty 10
-transfer pack by qty 10

The pack couldn't be transered

Now the pack is transfered.

Closes: #10764

opw:668682
2016-03-15 16:15:18 +01:00
xmo-odoo c824e50b3f [FIX] scaffold: correctly decode utf8 templates
As its documentation notes[0], Jinja2 only processes unicode template
data (or pure ASCII, which will implicitly decode to unicode).

The scaffolding system would read raw scaffolding data in memory (both
templates and passthrough non-templates), but fail to decode templates
before handing them to Jinja, blowing rendering up if templates
contained non-ascii.

Fix #11331 by always decoding templates from UTF8 before handing them
to jinja. This is backwards-compatible, ascii templates work as they
used to, non-ascii UTF8 templates now work correctly, non-ascii
non-UTF8 templates what are you doing?

[0] http://jinja.pocoo.org/docs/dev/api/#unicode
2016-03-15 11:25:16 +01:00
Nicolas Martinelli d377ffd5bf Revert "[FIX] stock_landed_costs: stock input account"
This reverts commit b955bac100.
The previous behavior was the correct one. However, accounting entries
are missing.

opw-671311
2016-03-14 14:52:23 +01:00
Denis Ledoux a7a71bcaa3 [FIX] purchase: report currency conversion
This is equivalent to revisions
- 000ce6a66d116b397768fd44cb348fdfa933cce1
- 48ccb19937
2016-03-14 12:42:33 +01:00
Jairo Llopis 3c5e760e9d [8.0][FIX] Fix broken layout on xs Firefox.
Before patch (screenshot from runbot):

![](https://cloud.githubusercontent.com/assets/973709/13699411/6fc781b2-e77a-11e5-92fe-1e181f9e6b7f.png)

After patch:

![](https://cloud.githubusercontent.com/assets/973709/13699410/6fc774a6-e77a-11e5-83ab-dd31ccb1c4df.png)
2016-03-14 10:47:00 +01:00
Odoo Translation Bot 345c83a9d0 [I18N] Update translation terms from Transifex 2016-03-13 02:59:06 +01:00
Tanguy Charlier 323af2c259 [FIX] Doc: Invalid example in compute doc 2016-03-11 16:49:23 +01:00
Martin Trigaux 2346a51ed0 [IMP] website_payment: remove debug code
Remove logging unecessary information. While this info is not persistent or
transmited, there is no reason to log it in developper console.
2016-03-11 15:13:41 +01:00
Martin Trigaux d67772da57 [I18N] stock: export source terms
missing and unnecessary terms
2016-03-11 15:13:41 +01:00
Christophe Simonis a0c5cf68ca [MERGE] forward port of branch 7.0 up to 3bc7ea6 2016-03-11 13:30:23 +01:00
Denis Ledoux 4fb2e76b43 [FIX] web: `char_domain` rendering on record switch
When using the left/riht arrow to switch of record
in a form view,
the rendering of the `char_domain` widget was done too
early, before all fields are ready / set, and if the
domain of the previous record could not be applied
on the current record, it leaded to a traceback.

This revision introduce a new deffered,
because I coudln't find one that was doing
what I was looking for:
 - `is_initialized` is a defferred which is
 resolved when the form view has finished
 its rendering for the first time
 - `reload_mutex` is a mutex used only when reloading or
 switch to left/right record.

While the one needed in this case is a deferred
which is resolved when the record has finished
being rendered, wether when its when coming
from the list view to the form view (and it's
not the first time the form view is loaded,
e.g. list view -> form view -> list view -> form view, another record),
or on the switch of left/right record.

opw-671594
2016-03-10 14:11:34 +01:00
Martin Trigaux abe5859559 [FIX] gamification: close challenge after expiration
Before this patch, the challenges with an end date in the future were closed at
the first cron run.

opw-669995
2016-03-10 09:26:17 +01:00
Nicolas Martinelli 560e5eec15 [FIX] purchase: duplicate origin in PO
When a "Drop Shipping" route is used on a product, the origin document
is duplicated on the PO created. This is because in this case,
po_rec.origin and procurement.origin are the same.

opw-671039
2016-03-09 15:57:00 +01:00
Goffin Simon 13c33264e6 [FIX] purchase: _get_po_line_values_from_proc-sig
Introduced by eefc76f
Only the supplier taxes of the company set in the procurement
must be set in the PO.

Backport from f5989bc3d8f10a0354a7d085576276d4e1778fbd

opw:671449
2016-03-09 13:16:14 +01:00
Goffin Simon f6a62fa6e1 [FIX] mrp: a member of group_mrp_manager can create Work center
When creating work center, a resource.resource record is created.
Then a member of group_mrp_manager is allowed to create resource.resource record.

opw:671218
2016-03-09 09:15:34 +01:00
Joren Van Onder 591d74becf [FIX] point_of_sale: do not select payment input when hidden
Edge >=12 throws an error (code 800a025e) when calling the select()
method on an input element that is not currently part of document and
has a non-empty value.

When adding a paymentline a "change:selected_paymentline" event gets
triggered which in turn triggers the focus_selected_line function before
the actual paymentline gets rendered.

opw-671426
2016-03-09 09:13:44 +01:00
Jairo Llopis 906bf16a76 [8.0][FIX] Make on_change in address_format divs work
To reproduce the bug:

- Create a partner.
- Set it state "Alaska".
- Country becomes "United States".
- Set a country for YourCompany, such as Spain.
- Create a partner.
- Set it state "Alaska".
- Country remains blank.

Also, `node.xpath("//field")` was running over every `<field>` in the
view, not just those inside the `<div class="address_format">`. Now it
only traverses the right nodes, which renders every affected view
faster.
2016-03-08 13:40:40 +01:00
Nicolas Martinelli b955bac100 [FIX] stock_landed_costs: stock input account
When assigning landed costs to products that have already left the
stock, the expense account is used instead of the stock input account.

opw-671311
2016-03-07 17:02:19 +01:00
Goffin Simon 7cf20afb0b [FIX] account_check_writing: wrong duplicate period
When duplicating an account voucher, the period was duplicated even if
the Bill Date didn't match with it.

opw:669850
2016-03-07 15:32:29 +01:00
Nicolas Lempereur 4309bd311f [FIX] base: don't unlink base.open_menu but reset it
The ir.actions.todo record base.open_menu is used to redirect the user
to a menu after installing a module.

To do so, a new module override the record changing its action (toward a
menu) and setting its state to "open".

But with f7fe753 when one such changed action is removed after
uninstalling a module (or removing the action by any other way) the
base.open_menu would also be removed. Thus thereafter the open_menu will
not work anymore (since type "automatic" is lost).

With this commit, when whenever base.open_menu is removed, instead its
action will be replaced by base.action_client_base_menu which is the
original action.

closes #11224
related to: #11216, opw-660269
2016-03-07 14:03:28 +01:00
Odoo Translation Bot aca8a8bebc [I18N] Update translation terms from Transifex 2016-03-06 02:59:52 +01:00
Olivier Dony 9804c54634 [FIX] product_expiry: performance issues due to extra write() call
When creating thousands of production lots in batch, the
extra call to write() cuts performance in 2, and can be
replaced by an appropriate context when calling super(),
as all the default values are computed correctly.

The only case that could possibly fail is when the product_id
is not passed to the create() call but comes instead from
defaut values (ir.values).
This case is very rare and considered a manual exception
where the expiry dates can be input manually.
2016-03-04 19:15:28 +01:00
Olivier Dony 40fdb841ae [FIX] auth_signup: readonly empty login field on signup
Closes #9367
Fixes #11180
2016-03-03 17:52:13 +01:00
eLBati e0555a66e1 [FIX] account: `amount_currency` when grouping invoice lines
when using a journal with 'Group Invoice Lines'
and issuing an invoice with foreign currency with more than 1 line
(of the same product, or no product),
the amount currency in the journal item
associated to the merged invoice lines was wrong.

It took into account the `amount_currency` of the first line only,
ignoring the `amount_currency` of the remaining merged lines.

opw-670972
Closes #10375
2016-03-03 15:07:10 +01:00
Denis Ledoux 14282f1659 [FIX] report, website_report: barcode widget
Up to this revision, barcodes set in reports are generated
using the controller `/report/barcode`,
using a `img` HTML tag, e.g. (from `report_location_barcode`)
```
<img t-if="not o.loc_barcode"
     t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s'
     % ('Code128', o.name, 600, 100)" style="width:300px;height:50px"/>
``

This `/report/barcode` route is set as `auth='user'`, meaning
the route can only be accessed by signed in users.

When wkhtmltopdf prints a report containing such a barcode,
it calls this `report/barcode` route, making sure to pass
the request session in the cookies, so wkhtmltopdf
uses the same session than the one of the user. This is
needed, as only users can access this `report/barcode/` route.

This session is passed in `report.py`, in the method
`_run_wkhtmltopdf`, thanks to the --cookie wkhtmltopdf
parameter.

Nevertheless, if a report is printed through the website
front-end, as public (without a signed in user), the request
session is not associated to a signed in user, and therefore
the route `/report/barcode` refuses the access / redirects
to the login, making it impossible to print a report
containing a barcode without being signed in. This even
if the report is printed as `sudo` through a controller
(as this is the session of the not signed in user which is passed,
not a session associated to `sudo).

Fixes #10621
opw-667797
2016-03-03 13:51:44 +01:00
Denis Ledoux 13f1426bf5 [FIX] report: UPC-A barcodes drawing
It looks like reportlab doesn't handle well
UPC-A barcodes.

As UPC-A barcodes became EAN13 barcodes when
adding a `0` to the beginning of the barcode,
and the render is the same, we ask reportlab
a EAN13 barcode type when a UPC-A barcode is asked,
making sure to add the `0` automatically first.

From Wikipedia:
```
The EAN was developed as a superset of UPC,
adding an extra digit to the beginning of every UPC number.
[...]
the original rules for UPC are treated as a '0'
if read as EAN-13.
A UPC barcode XXXXXXXXXXXX therefore is the EAN-13 barcode 0XXXXXXXXXXXX.
It is possible to prefix a UPC barcode with a 0;
they become EAN-13 rather than UPC-A.
This does not change the check digit.
All point-of-sale systems can now understand both equally.
```
opw-670560
2016-03-03 11:08:36 +01:00
Joren Van Onder c23eb23267 [FIX] hw_scale: use a larger timeout during initial probe
I'm not sure why the serial timeout is so aggressive, but I assume there
is a reason for it. During probing however, we shouldn't use such an
aggressive timeout because if we miss the device during initial startup
we'll never find it since we only probe devices once.
2016-03-02 16:48:41 +01:00
Joren Van Onder 290eb4ea2e [FIX] hw_blackbox_be, hw_scale: don't rely on serial ID to be unique
After plugging in multiple identical serial to USB interfaces, only the
last one will be available under /dev/serial/by-id/ because they'll have
identical IDs. Instead use /dev/serial/by-path/ which does not have this
issue.
2016-03-02 13:51:40 +01:00
Joren Van Onder acf027ac98 [IMP] hw_scale: allow third party USB to serial interfaces
We support the Mettler Toledo scales which have their own built-in USB
to serial interface. Due to continuing issues with that built-in
interface we will also support the scale configured in raw RS-232 mode
which seems to be more reliable.

This means that in order to connect the scale you'll need a third party
USB to serial interface (unless you have built-in serial interfaces, but
the POSBox doesn't).

The main difficulty this poses is that using this approach we cannot use
the name of the interface to find the device. When using the built-in
interface of the scale the interface would identify with an ID
containing 'mettler' and 'toledo'. When using a third party interface
the ID will instead contain information about the third party
interface. To fix this we use a probe-based approach, probing every
available serial interface until we find one that returns a response to
our probe. This approach will work with both third party interfaces and
the built-in interface of the scale.

Contrary to probe-based approach used in hw_blackbox_be this one is
slightly more complicated because hw_scale is written in such a way that
it is 'plug and play', which means that as long as the module is running
it will continually try to find a scale. This is fine, but we don't want
to keep sending probes to eg. Fiscal Data Modules, which could lead to
issues. Therefore we will only probe every device once. When we lose an
existing, confirmed connection to a scale we will however keep retrying
to connect to that particular device.
2016-03-02 13:51:40 +01:00
Martin Trigaux b3a3454a2f [FIX] stock: duplicated term in .pot 2016-03-02 08:10:00 +01:00
Denis Ledoux 2ba7fa3c9d [FIX] website: alternate languages translated URL
The alternate languages links set in the page `<head>`
were not translated in each language, but within the language
the user is browsing the website.

This leaded to SEO referencing issues, as these links leaded
to (30x) redirections if followed, to translate the URL slug
within the new current language.
e.g.
`/fr_FR/shop/product/bose-mini-bluetooth-speaker-7`
automatically redirected to
`/fr_FR/shop/product/mini-haut-parleur-bluetooth-bose-7`

And it was the first link which was displayed as alternate link
when being in another language than French, while it should
be the second (to avoid the useless redirection).

opw-669979
2016-03-01 10:53:44 +01:00
Denis Ledoux 3913667396 [FIX] website: backport of 8d2a3ba12dcec61c7e6afcfd34d00c4167de3baa 2016-03-01 10:53:44 +01:00
Joren Van Onder dda904c133 [FIX] point_of_sale: avoid '.' thousands separator issues
When we render the payment screen the current value of the current
paymentline is rendered to a string using
Paymentline.get_amount_str(). This conversion always rendered numbers
with a decimal separator of '.' because it just used
Number.toFixed(). This used to be fine but
5a10903e9b made the POS adhere to the set
decimal and thousands separator. Because of this, the POS now has to
parse the input with web.parse_value() which takes into account these
separators. When parse_value() parses a float it first deletes the
thousands separators and then replaces the decimal separator with '.'
before it gets cast to a Number.

In German (and other languages), the '.' is used as a thousands
separator which means that it will get deleted by parse_value() so
you'll end up with '12.34' being interpreted as '1234'. Because of this
it is important that we ensure that the default value that appears in
the input uses the correct separators.

The aforementioned issue only occurs when the user changes the default
value in the paymentline. Only then does a conversion take place from
String to Number. So just clicking on a payment method of type 'Bank'
and validating it would work fine, only when the payment amount was
updated would the issue occur.

Fixes #9395
Closes #10952

note: this should not be forward-ported to >8.0 because later versions
use the rewritten payment screen which is completely different from the
one in 8.0.
2016-03-01 09:38:07 +01:00
Denis Ledoux 3bc7ea6bcf [FIX] stock: stock valuation user timezone date
When delivering a delivery order (`stock.picking.out`),
which generates accounting entries
e.g. thanks to the real-time stock valuation,
the date of the move set was the UTC today date, while it must
be the user's today date, using the timezone passed in the
context.

This prevented the delivery of the `stock.picking.out`
when the `Check date in period` boolean was checked
in the stock journal, and the user date is in the previous
month compared to the UTC date, as the date set on the move
entries were not in the selected period for these move entries.
e.g. When the user timezone is UTC -8, and his current time is
2016-02-29 18:00:00, the UTC date is 2016-03-01 02:00:00, the
period chosen is February (correct), but the date on the move
entries were set to 2016-03-01.

opw-670820
2016-02-29 18:33:55 -07:00
Odoo Translation Bot 8c278a4e4a [I18N] Update translation terms from Transifex 2016-03-01 00:29:04 +01:00
Denis Ledoux 479f6ff48e [FIX] point_of_sale: tz fallback
The user timezone fallback in case the user
has no timezone wasn't set at the right place.

This is an oversight of the revision
9f0120d73b

opw-670778
2016-02-29 16:56:29 +01:00
Nicolas Martinelli f994be0e85 [FIX] report_intrastat, l10n_be_intrastat: period
The intrastat report period should match the accounting period of the
invoice. This might not be the case if the user manually chooses an
accounting period which does not match the invoice date.

opw-668827
2016-02-29 11:48:46 +01:00
Jeremy Kersten 63fd73d83d [FIX] base_geolocalize: remove useless dependencies
close #11132
2016-02-29 11:33:21 +01:00
Joren Van Onder feedb0f1f4 [FIX] point_of_sale: get the correct logo when using multiple databases
In an environment where multiple database are available the company_logo
controller in the web module will return a placeholder logo (the Odoo
logo) if it can't figure out what db the request belongs to. This logo
is used on the ESC/POS receipts.

Because we load the logo with an anonymous CORS request there is no
authentication on the request. This is necessary because the POS tends
to not be served over HTTPS whereas the rest of Odoo is. Without this
crossOrigin attribute we could potentially end up in a situation where
the canvas is considered tainted by the browser which would prevent us
from extracting the canvas' data with toDataURL(). So removing the
crossOrigin attribute is not an option, specifying the db is the next
best thing.

opw-670471

note: in >=9.0 session is a variable defined in the js module instead of
a property on PosModel, so 'self.session.db' should become 'session.db'.
2016-02-29 09:57:39 +01:00
Odoo Translation Bot 9f073102ef [I18N] Update translation terms from Transifex 2016-02-28 03:00:41 +01:00
Christophe Simonis c3a05d0516 [MERGE] forward port of branch 7.0 up to 9f0120d 2016-02-26 16:22:38 +01:00
Josse Colpaert 45d4bd04cb [FIX] purchase: the stock should be valued without the taxes included from the purchase order line
From issue 660592. (already fixed in v9)  When products are received from a purchase line
with taxes included, the cost for the stock valuation (on the stock move) on reception
should be without these taxes included.
2016-02-26 11:45:22 +01:00
Anton Chepurov 1d269d20f2 [FIX] website: sitemap scalability
Checking url_list for duplicates is O(n).
Use url_set instead of url_list to improve to O(1).

Otherwise sitemap generation even for a million products will never finish.

Close #11106
2016-02-26 09:48:12 +01:00