Commit Graph
102844 Commits
Author SHA1 Message Date
qsm-odoo 28ac3a369f [FIX] web_editor: secure the paddings of btn in the editor
Prevent the padding of editor .btn's to change when a theme modifies
them (by mistake or not).

Once again, this is a problem of css isolation between the editor and
the website customization. A theme cannot safely, at this time, do
"#wrapwrap .btn" to isolate its rules because it may override some
bootstrap rules like ".btn-group .btn" which would became less
important. It cannot changes the bootstrap variables either as it is
still used by the odoo ui in some places.
There is no safe good solution to "share" bootstrap theming between
odoo ui and website ui. The safest solution is to force the design
of odoo ui elements that may be overridden by themes (in the end,
it's the same as progressively removing bootstrap from odoo ui).
2016-07-25 17:00:24 +02:00
qsm-odoo 3fe3f55cf5 [FIX] web_editor: allow adding options on predefined bg classes
The editor allows using background image options on snippets which
use a background-image. For this to work, the oe_img_bg css class
has to be on this snippet. The problem is that the class is absent
when using some themes as the select_class method removes it to place
its own value.

Now, the oe_img_bg class is (re)added when a select_class method is
used within the background image option.
2016-07-25 17:00:24 +02:00
Goffin Simon 19e3757ffb [FIX] product_visible_discount, sale: compute the right unit price
When the module product_visible_discount is installed, the field
'discount_policy' allows to display the discount in the sale order or
allows to consider the discount as include in the price_unit.

The field price on product.product always compute the price according to
the pricelist then it always includes the discount in the price.

The field lst_price on product.product never compute the price according to
the pricelist then it always gives the sale price.

According to the discount_policy, the price or the lst_price must be taken.

opw:683771
2016-07-25 15:57:34 +02:00
Christophe Simonis fc0f023053 [MERGE] forward port branch 9.0 up to 1089dcf 2016-07-25 15:07:47 +02:00
Christophe Simonis 1089dcf15c [MERGE] forward port branch saas-6 up to 7df4ea5 2016-07-25 14:33:15 +02:00
Martin Trigaux 880df4e8b6 [IMP] doc: clarify web client terminology
To avoid confusion such as in #12884
2016-07-25 14:30:20 +02:00
Nicolas Martinelli 150bf7dba6 [FIX] point_of_sale: missing tax in accounting entry
The accounting item generated from a PoS order does not contain the
related taxes. Although the accounting entry is globally correct since
the tax line is created manually, the tax should still be written on the
accounting item for reporting purpose.

Note that this is already the behavior when the accounting entry is
generated directly from an invoice.

Fixes #10855
2016-07-25 14:08:19 +02:00
Christophe Simonis 7df4ea5b57 [MERGE] forward port branch 8.0 up to 43cff22 2016-07-25 14:07:50 +02:00
Martin Trigaux b85ef7ff1b [FIX] doc: indendation
Otherwise the text is considered as a quote
2016-07-25 13:56:33 +02:00
Olivier Dony 43cff22950 [FIX] base: fix broken URLs when redirecting
Similarly to werkzeug.urls.url_fix(), attempt to
correct some leftover special characters that
should have been URL-encoded.

We cannot actually use `werkzeug.urls.url_fix` or
`werkzeug.urls.url_quote`, as they expect more/most
characters to be un-encoded.
We have many existing cases where the redirect URL is
already fully encoded or mostly encoded, and those
functions would cause double-encoding, breaking the
final URL.
2016-07-25 13:06:31 +02:00
Olivier Dony 8596a4ccaa [FIX] portal: avoid users sharing non-portal groups 2016-07-25 13:06:31 +02:00
Olivier Dony 01acb8a497 [FIX] base: fix broken URLs when redirecting
Similarly to werkzeug.urls.url_fix(), attempt to
correct some leftover special characters that
should have been URL-encoded.

We cannot actually use `werkzeug.urls.url_fix` or
`werkzeug.urls.url_quote`, as they expect more/most
characters to be un-encoded.
We have many existing cases where the redirect URL is
already fully encoded or mostly encoded, and those
functions would cause double-encoding, breaking the
final URL.
2016-07-25 13:05:01 +02:00
Olivier Dony 3ff242ec0c [FIX] portal: avoid users sharing non-portal groups 2016-07-25 13:05:01 +02:00
Olivier Dony 4c9a0682b3 [FIX] pos_cache: fix rare deserialization problems
Fixes opw-683800
2016-07-25 13:05:01 +02:00
Olivier Dony bb1c6bd5ae [FIX] mail,delivery: fix incorrect imports 2016-07-25 13:05:01 +02:00
Olivier Dony 0e104a1f21 [FIX] payment: restrict field visibility to users who need it 2016-07-25 13:05:01 +02:00
Pedro M. Baeza 7e162e8993 [FIX] account: total_invoiced field should be only for customer
"total_invoiced" must only take customer invoices into account because
when you click on the button "invoiced" in the partner view form
you just see the customer invoices.

Adaptation for 8.0 of 9.0 fix made at 37569695

Closes #12044
2016-07-25 11:29:05 +02:00
Nicolas Martinelli aa1c3946da [FIX] product: rounding in pricelist report
The pricelist report might show price incorrectly rounded. For example,
a calculated price of 20.625 will be displayed as 20.62 in the report
since `formatLang` does not apply a rounding but simply truncate the
value.

Fixes #12875
2016-07-25 10:56:06 +02:00
Christophe Simonis eff0a3b049 [MERGE] forward port branch 8.0 up to 84f9cdd 2016-07-25 10:24:33 +02:00
Richard deMeester 5e7650204b [FIX] l10n_nz: Tax template name conflict (AU/NZ)
Rectify name conflict in tax templates between NZ and AU chart of
accounts. Otherwise, it's impossible to install both charts of accounts
at the same time.

Fixes #12600
Closes #12758
2016-07-25 09:31:49 +02:00
Goffin Simon d014940d1c [FIX] account: Fiscal position - mapping tax
The fiscal position is only mapping the first line,
if you need to replace one tax with 2, it doesn't work.

opw:683372
2016-07-25 09:19:03 +02:00
Odoo Translation Bot 84f9cdd1d9 [I18N] Update translation terms from Transifex 2016-07-24 02:59:48 +02:00
Odoo Translation Bot 6dcaffa3e0 [I18N] Update translation terms from Transifex 2016-07-24 00:30:28 +02:00
Adrien Peiffer (ACSONE) 611eae7959 [FIX] account: remove duplicated field in view
The account_analytic_id field was present twice.

Closes #12882
2016-07-22 16:39:31 +02:00
Martin Trigaux d1cdb4f4b8 [I18N] mail: outdated source terms 2016-07-22 15:11:31 +02:00
rgeleta 794459ade6 [FIX] doc: correct spelling mistake in reference
Closes #12865
2016-07-22 14:11:27 +02:00
Flavio Corpa 43c181926e [CLA] Signature for kutyel
Closes #12866
2016-07-22 14:10:17 +02:00
Martin Trigaux 1094c221fa [I18N] portal_sale: outdated translation sources 2016-07-22 13:26:26 +02:00
Stéphane Bidoul (ACSONE) 862e4c42ba [CLA] Add Thomas Binsfeld in ACSONE CCLA
Closes #12810
2016-07-22 10:51:55 +02:00
Pedro M. Baeza c3b1a0eca7 [FIX] purchase: retrieve product full name in dropshipping
The name field is the name of the product.template while the display_name will
contains the variant description and product code to allow to identitfy which
product.product is moved.

Closes #11311
2016-07-22 10:37:57 +02:00
Martin Trigaux 8b83119fad [FIX] project: add misssing decorator on onchange method
The onchange should have the signature with `ids` instead of `id` for a proper
guess.
Without this, the method can not be overriden with an api.multi (the return
result is a list of dictionnary which is not understood by the ORM as a proper
return format).

Fixes #12856
2016-07-20 17:20:18 +02:00
qsm-odoo f0620a9648 [FIX] web_editor,website: allow creating pages from edit menu
The code for page creation from menu edition dialog was there but
invisible to the user because of a wrong qweb template inheritance.
Indeed, the edit menu dialog relies on an extension of the link dialog
template. But this one is extended in-place in another location and
that extension is not considered when the second extension is made
because a t-extend always use the base template. The only solution to
achieve the same result is to copy the edit menu dialog qweb extension
in Javascript.

Note: the feature was still available from the link dialog in page
edition though because this was not concerned by the wrong qweb
extension.

However, adding a page by this way would create multiple pages because
one was created each time a page name was entered (and not only on
save !). So typing "test", then changing its mind and typing "hello",
then rechanging to "test", then hitting the save button created the
"test, "test-1", "test-2" and "hello" pages.
This fix takes advantage of an already present parameter which can
determine if a new page should be created or not. However, a code
refactoring should be done in master for these classes.
2016-07-20 15:59:53 +02:00
qdp-odoo 7c33417e89 [FIX] account: fix manual reconciliation use case as defined in OPW 682683.
The error was only appearing in case 'writeoff_currency' != 'company_currency' which, here was achieved by having a secondary currency on the reconciled account. As the manual reconciliation wizard is doing a two-step reconciliation to make sure to balance all the secondary currencies, we must check the context to detect its special key and avoid giving an amount_currency that would interfer.
2016-07-19 18:08:49 +02:00
qsm-odoo 7aa9f23955 [FIX] *: use html_translate for non-sanitized html fields
Commit c21568e14f deactivated the sanitization of frontend html fields so
that their modification through the editor worked again. However,
this broke the possibility to display their traduction and to modify
them.

The problem is that the translate option of html fields should not
equal "True" but instead be the html_translate function defined in
openerp.tool.translate. The translate=True option is automatically
change in html_translate though but there is a condition: the field
should be sanitized, which is why this broke since the sanitization
is disabled.

This commit sets the translate option of non-sanitized html fields
to html_translate. Maybe we should investigate for this to be automatic
for non-sanitized html fields as well.

Thanks to @rco-odoo.
2016-07-19 17:02:02 +02:00
Damien Bouvy 0f34eb26db [FIX] crm,project,website,website_sale: replace support e-mail with support form link 2016-07-19 16:13:45 +02:00
qdp-odoo ceef7e3847 [FIX] account: allow import of field 'move_name' in account.invoice
Since users cannot set it manually to readonly=False in the settings or in the view, thatt's the only way to allow them to import invoices and their corresponding accounting entries.
2016-07-19 16:08:41 +02:00
Goffin Simon d7f1270050 [FIX] product: default name in copy on product.product
When duplicating a variant, it's not necessary to append (copy) to
the name of the variant as it changes the name of the template too.

opw:683522
2016-07-19 15:48:49 +02:00
Goffin Simon 978b8f64ec [FIX] sale: onchange on 'note' in a sale order
When website_quote is installed, the Terms and Conditions of the quote
template should replace the Terms and Conditions of the company.
But if T&C of the company is not filled, it will keep the note written.

opw:683543
2016-07-19 14:36:50 +02:00
Nicolas Martinelli 2c19e9be96 [FIX] base: cherry-pick 55fa0912 to 8.0
Backported to 8.0 following report at #12648

[FIX] base: use datetime instead of date

The variable `date` is compared to the field `name` in the selection
query. `name` is filled in with datetime data. In particular, in the
module currency_rate_live, datetime.now() is used in the name. It is
necessary to make an appropriate comparison to make sure we select the
updated rate right away.

Fixes #12648
2016-07-19 12:58:13 +02:00
Odoo Translation Bot c3dd308913 [I18N] Update translation terms from Transifex 2016-07-19 12:10:41 +02:00
qsm-odoo 946b9415cd [FIX] website: correct mobile preview design
* Remove double scrollbar which appeared on chrome
* Remove strange whitespace on top of the preview due to the removal
of the odoo navbar (the code was wrongly adapted)
2016-07-19 11:46:25 +02:00
Stefan Rijnhart 2757ec3d0c [FIX] web: prevent kwargs position confusion
The fith arguemnt of the search method in count in new API.
Passing all arguments as positional arguments will make the context passed for
the value of the `count` argument.

bbc67ec is a similar fix in 9.0

Closes #12830
2016-07-19 11:19:46 +02:00
Tanguy Charlier 22090d3648 [FIX] sale_timesheet: don't count expenses as timesheets
On sale orders, the timesheets stat button should display the number of related timesheets.
0b55f2ee6d changed the computation system to have the number of timesheets
instead of the total time for several reasons, but used a domain which also includes expenses.

This commit changes the domain to make sure that the stat button only displays the number of timesheets,
and that the action leads to a list view of timesheets only.
2016-07-19 10:32:07 +02:00
Goffin Simon 02d686f9e1 [FIX] account_set: ensure_one in compute_depreciation_board
An error was raised when trying to call compute_depreciation_board with
a recordset containing more than one record.

opw:683341
2016-07-19 09:09:57 +02:00
Wolfgang Taferner 05645343c3 [FIX] account: fix typo introduced by forward-port
Broken by forward-port 3cdcc670fc

Fixed by using correct model and method name.

Closes #12818
2016-07-18 19:46:56 +02:00
Olivier Dony 36e875e796 [FIX] ir.http: make browsers trust our mime types
We determine the mime types of the files we server
automatically + manually, and browsers should not
try to second-guess it.

Browser mime-guessing is there for the myriads of
badly configured web servers out there.
2016-07-18 19:44:37 +02:00
Olivier Dony 82142475f7 [FIX] mail,base: import XML attachments as text 2016-07-18 19:44:37 +02:00
Olivier Dony 399e2bcf6d [FIX] ir.attachment: simplify xhtml-like mimetypes matching
Simplify/complements revision f6090e69e6,
forcing text/plain for xml-like files.

Ignore forced `mimetype` when downloading attachments, if the model
has its own mimetype or if we can guess it.
`default_mimetype` still available as a fallback.

See also the list of mimetypes supported by common browsers, e.g.:

 - Firefox: CParserContext::SetMimeType in:
    https://hg.mozilla.org/firefox/file/default/parser/htmlparser/CParserContext.cpp

 - Chrome:  kSupportedNonImageTypes constant:
    https://cs.chromium.org/chromium/src/components/mime_util/mime_util.cc?sq=package:chromium&rcl=1467904650&l=89
2016-07-18 19:44:37 +02:00
Goffin Simon 44ca4317a9 [FIX] website_sale: the field lst_price appears twice
opw:683343
2016-07-18 14:22:07 +02:00
Goffin Simon 6cf275cc6b [FIX] account: Computation of a fixed amount tax
When an order with a fixed amount tax was returned the sign of the tax
was wrong because amount_base was negative and quantity was negative too,
then the tax was positive due to math.copysign(self.amount, base_amount) * abs(quantity)

The sign of the base amount already takes into account the the sign
of the quantity.

opw:682407
2016-07-18 12:51:16 +02:00