Commit Graph
103218 Commits
Author SHA1 Message Date
rmu-odoo d474dce528 [IMP] l10n_hu: Created tags and Assign to Taxes 2016-03-04 17:52:13 +01:00
Martin Trigaux c811ebb337 [FIX] doc: reference to Launchpad for translations 2016-03-04 17:31:47 +01:00
Denis Ledoux af174897ab [FIX] website_sale, website_sale_options: currencies
Adaptations following rev. 1684ae4:
    The website pricelist is now dynamic, according
    to the pricelist chosen by the customer on the website.
    It's no longer a static pricelist, it's no longer
    the public user pricelist.

    Therefore, when computing the variants prices,
    the prices should no longer be converted
    from the public user pricelist to the current (context)
    pricelist, but from the product currency to the
    current pricelist chosen by the customer on the website

    In addition, when getting the unit price,
    `/shop/get_unit_price`,
    the website current pricelist should always be used,
    it should never fall back on the partner pricelist,
    as, it's the user who choose his pricelist from the website
    now (if he has specific set on his partner
    form, it's that one which is loaded by default, and which
    is returned by the website.pricelist_id)

    In addition, the displayed currency on the ecommerce
    must always be the current website pricelist currency

Adaptations following rev. 3622c0d:
    A product can have no company set (not required).
    Therefore, when attempting to set the `from_currency`
    to the product company currency, this could return
    `None`, if no company was set on the product.
    `product.currency_id` ensures to always return a currency
    for the product. It's the company currency
    if the product has a company set, otherwise it take it from
    the main company (`base.main_company`).

    In addition, when editing the product price from the website,
    the price must be displayed within the product currency,
    as, if changed by the user, it changes the product sales
    price directly on the product form, without any currency
    conversion applied or whatever.

opw-670898
opw-671100
2016-03-04 16:34:17 +01:00
Joren Van Onder f0257a9c72 [FIX] point_of_sale: maintain stable viewport on iOS
The POS frontend has an unchangeable viewport which should be 1024 px
wide. On iOS 9.2.1 however, the viewport width sometimes changes to a
much smaller value (154 px on an iPad Air 2) after fading out the
loading screen. This makes the POS pretty much unuseable, especially
considering that this viewport is not user-scalable, which means you
can't zoom out.

This is due to a recent change to WebKit2 for iOS [1] which makes the
viewport resize when setting the overflow property on
document.body. This particular change has been recently reverted [2],
but this does not seem to have made it to the latest stable WebKit build
for iOS as of the time of this commit.

Because of this we will remove the call to set_content_fullscreen
entirely. It only does two things:

1. set overflow-y to hidden on the document.body
   This is reduntant because we already have 'overflow: hidden' on the
   .pos div, which contains the entire application
2. adds .oe_content_full_screen to the .oe_webclient div
   This is also not particularly useful because the stylesheet rules for
   this class are contained in addons/web/static/src/css/base.sass which
   isn't loaded in the POS

[1] https://trac.webkit.org/changeset/186786
[2] https://trac.webkit.org/changeset/194667

note: for forward-porting to >saas-6, setting the application fullscreen
is instead done by triggering 'set_full_screen' through core.bus, so
those core.bus.trigger() calls should be removed instead.
2016-03-04 16:09:08 +01:00
Damien Bouvy 161e85a1dc [FIX] website_quote: do not force send the quotation in case of payment error
Mirror code, mirror fix: 84573fe
2016-03-04 15:37:39 +01:00
Nicolas Lempereur 4706a0c9a2 [FIX] base: shield embedded view from action 'create'
With `92a3178` if a window action has `'create': False` in its context,
creating a record by one of the action view is disabled.

But this is also applied to eventual embedded views which is not wanted.

With this commit, a `'create': False` in the context is only applied on
root view model and not on embedded ones.

closes #11207
opw-660607
2016-03-04 15:32:54 +01:00
Nicolas Lempereur 3e48ee634f [FIX] base: fix ir.actions.todo after module install
When installing or upgrating a module via the apps managing view, the
module updates are applied in a new cursor. So when getting the action
to do after updating the module, we need to have a transaction current
with commited transaction.

closes #11216
opw-660269
2016-03-04 15:20:07 +01:00
Christophe Simonis e46f65ab26 [MERGE] forward port of branch saas-6 up to 62fc257 2016-03-04 15:03:39 +01:00
Christophe Simonis 62fc2571c0 [MERGE] forward port of branch 8.0 up to 40fdb84 2016-03-04 14:33:37 +01:00
Nicolas Martinelli 501e09ba94 [FIX] product: name in formula
When the user selects a pricelist based on a formula, the name in the
formula is the same if "Public Price" or "Cost" is selected.

opw-670563
2016-03-04 12:04:33 +01:00
Nicolas Martinelli 8528651d22 [FIX] product: unnecessary default pricelist
Commit cf62fdb4 introduces a default pricelist item for any new
pricelist. Therefore, this default data is not necessary anymore, and
leads to two identical pricelist items created by default for the
"Public Pricelist".
2016-03-04 12:04:33 +01:00
Denis Ledoux b5c3598eb1 [FIX] membership: membership dialog form in partner form
The dialog form opened when clicking on a membership line,
in the "Membership" tab of the partner form,
was just unbearable.

This revision improves the readability of
this dialog form.

opw-671144
2016-03-04 11:48:26 +01:00
Joren Van Onder 7ec5db206e [FIX] point_of_sale: prevent crashes on older iOS devices
On older iOS devices (like the iPad 2) webkit would crash when clicking
on the closing button. Newer devices like the iPad Air 2 and iPad Mini 3
do not exhibit this behavior. This occurs on iOS 9.2.1 but I expect iOS
in general is affected by this. This affects both Safari and Chrome as
on iOS they both use the same rendering engine.

When the POS closes it searches the xml_id containing the action ID,
which seems to trigger the webkit crash. So instead we will use the
xml_id directly in the URL, that's simpler anyway and it avoids an
unnecessary RPC call. Functionally this means you won't get the 'Your
internet connection is probably down' message anymore, but it's useless
anyway, as after closing the popup the webpage is blocked anyway.

A log of the crash can sometimes be seen in the iOS diagnostics logs
which indicates com.apple.WebKit.WebContent crashing due to
EXC_BAD_ACCESS (SIGSEGV). This log is not always present, but that's not
unusual for out of memory issues on iOS [1]. Presumably the segmentation
fault is caused by iOS forcefully freeing memory being used by the
browser.

iOS manages memory in an unusual way. Plenty of developer reports are
available online which indicate this [2], but no official documentation
from Apple exists that specifies exact memory limit amounts.

[1] http://stackoverflow.com/questions/16400431/ios-app-crashes-with-no-error-and-no-crash-report
[2] http://stackoverflow.com/questions/16319486/ios-ipad-has-1gb-ram-why-is-my-app-killed-after-using-30mb

opw-668268
2016-03-04 09:41:51 +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
Simon Lejeune 14fdabb4bc [REF] tests: inline the full docstring in the logs
meaningless entries like
` Checks that the bundle's cache is working, i.e. that a bundle creates only enough
become
` Checks that the bundle's cache is working, i.e. that a bundle creates only enough ir.attachment records when rendered multiple times

see https://docs.python.org/2/library/unittest.html#unittest.TestCase.shortDescription
2016-03-03 17:45:19 +01:00
Simon Lejeune 9631a30228 [FIX] ir_qweb: don't use a stylesheet cached by another bundle.
An issue could arise if a preprocessed stylesheet asset is present
in multiple bundles: the first bundle will cache a version of this
file (identified by its url) and the second one will cache another
one. The next time the first bundle is rendered in debug mode, it
will use the last created record of the asset.

This could lead to design issues as, for instance, a less asset
could change according to another less asset included in the bundle.

We fix this issue by adding the xmlid of the bundle in the url's
asset. This fix another inconsistency as the compiled version of
an asset is reachable with an url that is not dependent of its
bundle, so if the asset is present in multiple bundle it could
return different values.

Note: this only concern the debug mode
2016-03-03 17:38:20 +01:00
Denis Ledoux 0806506c9c [FIX] sale: sales stats button on product with multiple variants
`default_search_product_id` with several ids simply can't work.

The only way to do it is using a domain in the action.
Anyway, this is unlikely that the user would like
to remove the domain (which is the main interest
of using a filter, the possibility to remove it), as
this will display all sales orders lines, whatever the products,
all mixed up. This is not super-useful.

opw-671022
2016-03-03 17:36:37 +01:00
Raphael Collet a4ea258176 [FIX] fields: company-dependent (property) fields should not be stored or copied 2016-03-03 16:47:05 +01:00
Christophe Matthieu bc4561b26b [FIX] web_editor: can't use mako/jija if remove space to prettify html
Addapt html method to prettify the html code and keep mako structures.

opw-668409
2016-03-03 15:41:02 +01:00
Christophe Matthieu 1320ad8cfe [FIX] mail: button_access is undefined in mail template preview
opw-668409
2016-03-03 15:41:02 +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
Martin Trigaux 7952a57b45 [FIX] l10n_multilang: create translations in master lang
When creating the account translations using the account template translations
read it without the environment language.

Otherwise, when the translation is created, the content of `element.name` (the
source term to translate) might be in a different language and already
translated.

This was introduce during the migration at the new API where previous code did
not propagate the context (probably by accident).
2016-03-03 13:56:06 +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
Martin Trigaux 5be9619738 [FIX] l10n_multilang: translate accounts after the installation of a CoA
Before this commit, the only way to translate a chart of account was to install
the language (if present in 'spoken_language' field on the chart of account
configuration) **before** the installation of the chart of account.

This commit loads the translations of the chart of account at the installation
of the language too.

To avoid recreating translations at each update of a language, skip if the
language is already installed.
This means than, to benefit from the fix, already deployed instances should
remove (after de-activating it) the language and reinstall it to translate
existing chart of account.

opw-670327

Closes #11091
2016-03-03 13:50:09 +01:00
Nicolas Martinelli 88e7122020 [FIX] mail: mail_server_id
When a specific SMTP server is set on a mail template, it is never used
when the mail is sent. There are two reasons:
- `mail_server_id` is a read-only field set by an onchange. However, a
  read-only field is not sent to the server, so the information is lost.
- The information is stored in the context of the object `Mail`, but it
  is never used. Moreover, when the method `message_post` is called, the
  `Mail` object is not used to post the message, so the information is
  lost again.

The fix includes two parts:
- the `mail_server_id` field is not read-only anymore. Actually, there
  is no reason to make it read-only.
- the information is stored directly in the mail values and used at the
  appropriate moment.

Fixes #6554 (from v9.0)
opw-669958
2016-03-03 13:24:41 +01:00
Nicolas Martinelli fad4788272 [FIX] web_editor: image size
Make sure to create an image of a size larger than zero. A size of zero
will generate a traceback.
2016-03-03 13:24:40 +01:00
Denis Ledoux db95dcd8bc [FIX] models: translate fields label, even for en_US
In Odoo 7.0 & 8.0, this was possible to translate
a field label, from `en_US` to `en_US`. It was
used as an easy way to change the fields label,
instead of creating an inherited view changing
the string attribute of the field everywhere it was needed.

This was no longer the case in 9.0,
following the revision 9593a29.

The translated terms for `en_US` have been
excluded, for performance reasons
as it was considered not possible to have
translated terms for the `en_US` language.

The fact is, this is very possible: Nothing
prevents to add a translated term
in `en_US` for a translate-able field,
as this is the case for the fields label,
as mentioned above. This field is then
used as the display value instead of the source
term when being in the `en_US` language.

Besides, the above revision was mainly to
give the possibility to sort a model records
on a translated field, using a join on the translations
table. It was then considered that the join could
be avoided, in the case where the user language was `en_US`,
for performance reasons, but, as this is possible
to give another value to the field value trough
the translations, it should actually be done, even
for the records sorting.

opw-670814
2016-03-03 13:21:56 +01:00
Nicolas Lempereur 17e79711e4 [FIX] web: save initially grouped editable tree view
Test to bind save and discard buttons of an editable tree view are done
only once when initializing it.

But if the view is by default grouped at the beginning, it will be then
"not editable" but only removing the groupby will change this.

So this commit add a case so if the view is grouped when initialized,
the buttons are always bound.

closes #11198
opw-666794
2016-03-03 13:07:22 +01:00
Philipp Hug 8c635a3a4a [I18N] l10n_ch: German translation
Closes #11192
2016-03-03 11:46:34 +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 5d07ad5e2f [FIX] point_of_sale: make receipt screen touch scrollable
In the POS we use a touchmove event listener to stop undesired
rubberbanding (in Chrome.disable_rubberbanding()). Elements which should
be scrollable by touch should have the touch-scrollable class. The
receipt screen is obviously one of those, because otherwise you won't be
able to scroll down if you have a long receipt.

opw-670899
2016-03-03 10:02:48 +01:00
Philipp Hug 575e162b6b [CLA] signature for philhug
Closes #11191
2016-03-03 09:44:12 +01:00
qdp-odoo da10eded8c [ADD] l10n_fr_fec: FEC export for the french accounting. Courtesy of Alexis de Lattre (Akretion) 2016-03-03 09:07:17 +01:00
Denis Ledoux 66c1d18579 [FIX] account: Dasbhoard, balance of bank account in foreign currency
When a bank account is set within another currency
than the company currency
(the currency of the journal is set and is different
than the company currency),
the balance displayed was the amount within the company
currency, instead of the amount within the bank account
currency (despite the fact the currency displayed
was the one of the journal).

opw-670815
2016-03-02 17:53:53 +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
Denis Ledoux 204f9d3605 [FIX] account: taxes configuration, default filter instead of domain
Convert the domain to display only the sale / purchase
taxes in the taxes list to a default filter doing the same thing,
but which give the possibility to remove the filter
and see taxes with the scope `None`.

opw-670737
2016-03-02 16:27:02 +01:00
Nicolas Martinelli b21af52ed8 [FIX] account: payment sequence
The payment sequence should depend on the company, which is not possible
with the harcoded reference to the sequence ids.

opw-670491
2016-03-02 14:05:45 +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
Denis Ledoux 33a7c02b55 [FIX] mrp: product variant name in BOM structure report
When printing a BOM structure using a variant,
the specifications of the variant were not
displayed in the BOM Structure lines,
making it different than what can be found
in the BOM structure form, and therefore
making it impossible to know which variant
has to be used for this BOM structure
from the report.

opw-670448
2016-03-02 13:21:20 +01:00
Denis Ledoux 68d03cef65 [FIX] mrp: Product variant name in production order report
When printing the production order, the name
of the product did not include the variant
specifications, making it different then what
is displayed on the production order form,
and preventing to know which variant was produced
for this production order.

opw-670448
2016-03-02 13:21:20 +01:00
Aaron Bohy 50aeecff84 [FIX] mail: chatter: hide basic composer when opening full composer
opw 670388
2016-03-02 10:24:37 +01:00
Martin Trigaux b705576e93 [FIX] account_full_reconcile: untranslatable module
publish the translations on Transifex
2016-03-02 08:49:01 +01:00
Martin Trigaux b3a3454a2f [FIX] stock: duplicated term in .pot 2016-03-02 08:10:00 +01:00
Nicolas Martinelli f5b37a8a07 [FIX] crm_project_issue: move attachments
The attachments are not moved to the issue created. They should.

opw-670259
2016-03-01 17:49:40 +01:00
Nicolas Martinelli 4ef7faeffa [FIX] crm_project_issue: archive instead of delete
When the user converts the lead into an issue, an error occurs: "Form
view couldn't be loaded". This is because the web layer tries to refresh
the data related to a deleted record.

Instead of deleting the lead, we archive it.

opw-670259
2016-03-01 17:49:40 +01:00
Nicolas Martinelli d3ea95db51 [FIX] crm: convert lead to opportunity
When a lead is converted into an opportunity, the probability should match
the new stage.

opw-669960
2016-03-01 17:39:14 +01:00
Nicolas Martinelli bdd60a75af [FIX] crm: default stage
When a lead/opportunity is created, the probability must match the
probability associated to the stage, as introduced in commit b2733391.
However, the call to `_get_default_stage_id` looses the context, which is
an issue since the method `stage_find` will inspect it in order to find
default values to build the search domain. The result is that the manual
call to `_get_default_stage_id` might return a different result than the
automatic call from `get_default`, and therefore the probability does not
match the stage

opw-669960
2016-03-01 17:39:14 +01:00
Christophe Matthieu a46a3f9958 [FIX] web: can't save if a o2m line have a modifier and try to read db
When the user click on save, 'is_valid' is called on each field.
The o2m test all sub-field (apply modifier and check value).
But, if a modifier change the read-only attribute, the field is reinitialized and call 'render_value' without check 'no_rerender' value.
The relational fields call the db in render_value, and the x2m is invalid because a request is pending.
(change X2ManyListView to keep the 'no_rerender' initial value)

opw-653120
2016-03-01 15:17:05 +01:00
Jeremy Kersten 20ab363a14 [FIX] sale: fix display in form view of sale order line
Div had not impact in quotation view, so I decide to remove it.
But it create an offset in the sale order form view.

Previous commit #2d1db7d fix the form view of quotation lines
but break the form view of sale order line.
https://cloud.githubusercontent.com/assets/10741187/13401517/51989574-df04-11e5-89f0-b3e625d05a7c.png

Related to #11081
2016-03-01 11:30:02 +01:00