Commit Graph
108870 Commits
Author SHA1 Message Date
Nicolas Martinelli e414bae770 [FIX] mail: company logo
- Activate multi-company, create companies A and B
- Set 2 companies on a user

When a message is sent (for example, thanks to the chatter), the
notification email always contains the logo of the same company,
whatever the company of the user or the company of the object.

This is a complement of commit 7a03f9ce93, applied to notifications.

Closes #20088
opw-772405
2017-10-20 10:41:24 +02:00
Martin Trigaux e180a03af8 [I18N] base: export source terms
Now that 8f1d889e50 has been forward ported to 10.0
Add missing enterprise module description
2017-10-20 09:20:00 +02:00
Lucas Perais (lpe) e3f05496b1 [FIX] mail: fix template preview wizard view
Before this commit, when on a mail.template form, click on the Preview smart button.
A wizard popped up with two buttons, as the default for form views.
First this made no sense since the wizard doesn't represent a model that can be modified
Second, the button discard was unable to close the wizard.

After this commit, only a discard button is present which does its job.
2017-10-20 09:09:34 +02:00
Lucas Perais (lpe) af6baac9c7 [FIX] account, sale: fix notification templates inline style
Before this commit, Sale order and invoice notification email templates broke when doing any action on them (duplicating, open preview etc...)
This is because the model is saved during those operation, and the css style gets converted to inline style.
The table tag present in those templates, was wrongly associated with the bootstrap rule for tables, collapsing their border, hence the break of the templates.

After this commit, we force the borders not to collapse, and the templates don't break

OPW 774323
2017-10-20 09:09:04 +02:00
Adrian Torres 023b195eef [FIX] website_sale: don't unlink website_description
This is a hotfix/hack for a conflict between website_sale and
website_quote, on the field website_description.
The conflict happens when both modules are installed.

Fixes #20118
Completes rev 333a236
2017-10-20 08:44:49 +02:00
Christophe Simonis 9b4447e9aa [IMP] test_pylint: check for mixed-indentation 2017-10-19 22:33:37 +02:00
Christophe Simonis 4af5e03d80 [ADD] hw_proxy: do not mix indentation with tab & spaces 2017-10-19 22:25:31 +02:00
Christophe Simonis 8ead5f9610 [FIX] sale_stock: do not mix indentation with tab & spaces 2017-10-19 21:03:00 +02:00
qsm-odoo d49983b23d [FIX] web_editor: open link dialog on dblclick on real links
When double-clicking on a link/button, the link dialog is opened. The
problem was that the "btn" class is sometimes used on non-link elements.
While this should not be, the editor can easily be adapted to this.
2017-10-19 17:53:59 +02:00
Dharmang Soni 2c829870f1 [FIX] web: prevent iOS from zooming in on input fields
When a user clicks on an input or a select field
in Safari on IOS, Safari has a behavior of zooming-in
on the field when the keyboard opens.
Even after the user dismisses the keyboard, the screen
still stays zoomed-in. The user has to then zoom out manually.

Now, the user is not allow to zoom-in at all.
This is already the case with the Android application.
We now have the same behavior between the two apps.
2017-10-19 15:09:36 +02:00
Cédric Pigeon (ACSONE) 59b010ac36 [FIX] sale_stock: refactor badly written method causing performances issues (#20193) 2017-10-19 15:00:52 +02:00
Christophe Simonis 03180ecb0c [MERGE] forward port branch 9.0 up to 2deb95b852 2017-10-19 14:42:37 +02:00
Nicolas Lempereur c57fb01a3e [FIX] web: iOS content in modal disappear
As can be seen in https://github.com/scottjehl/Device-Bugs/issues/8 a
combination of "-webkit-overflow-scrolling:touch", "position:relative"
and "overflow:auto" can have unexpected behavior on iOS.

The issue solved here is that writing in a form view inside a modal in
iOS (at least version 10.3) would make the whole form body invisible
until edition is ended.

This commit fixes this by adding a CSS rule which avoid the iOS bug.

opw-774396
closes #20314
2017-10-19 14:33:30 +02:00
Goffin Simon 2deb95b852 [FIX] base_vat, website_sale: Verification of vat number in EU country
We have problems when trying to validate our EU VAT report because some vat number are wrongly encoded in Odoo.
    There are 2 problems:

    1) We use vatnumber library to check the validity of the VAT number entered by the user on website.
       That library removes the following characters '.' and '-' in order to perform the check and
       thus can return True for a number like 123.123.123.13 or -123-3454-34
       And those VAT number are then saved in our database but are rejected by the state
       as VAT number should only contains alphanumeric character
    -> Solution: prevent entering vat number with other characters than alphanumeric for users that are located in EUROPE!

    2) Usually VAT is prefixed by country code, however some people in europe managed to bypass the system
       by prefixing their VAT number with CC instead of their country code, CC is consider valid in odoo
       (it means Country Code) but is not a valid European country code in general, which means that those
       people that should have pay some tax have not. Which is a huge problem.
    -> Solution: prevent the use of CC as country code by the user when entering a vatnumber only if the user country is in EUROPE!

    source: https://en.wikipedia.org/wiki/VAT_identification_number

opw:772621
2017-10-19 14:18:14 +02:00
amoyaux e72fc9a7f3 [FIX] stock: pack operation lots truncate decimal precision
A bug happens when you enter a number with more than 2 decimal
if you unfocus/focus the field it will truncate it.

This commit change the decimal precision and use the same digits
than other fields used in stock.

opw-775791
2017-10-19 13:44:31 +02:00
Denis Vermylen f18f8e401b [FIX] sale: pricelist price base
Fine tuning of 1108c150d9

When setting a pricelist to show the public price discount, it ignored
the pricelist item's base field (if not 'Other Pricelist') and set it
by default on the lst_price instead.

This did not work when you based your discount on the standard_price
(= cost price) with public price discount.

Now it does.

opw:775275
2017-10-19 10:56:25 +02:00
Nicolas Martinelli 4f921d668a [FIX] account_asset: asset on refund
- Create a vendor bill with a line linked to an asset category
- Validate the bill => an asset is created
- Refund the bill

The refund is also linked to an asset category. Therefore, upon
validation, a negative asset will be created.

The refund should not be linked to the asset category in a first place.
The user should cancel/modify the asset manually.

opw-775933
2017-10-19 09:26:44 +02:00
Joao Alfredo Gama Batista 3f3e41e9f5 [CLA] Update Savoir-faire Linux CLA
Add new collaborators, remove old ones

Closes #20258
2017-10-19 09:24:53 +02:00
François Honoré (Acsone) 2295cffb70 [CLA] Add acsonefho into Acsone CCLA
Closes #20291
2017-10-19 09:12:30 +02:00
Thibault Delavallée 388bf45853 [FIX] mail: indentation issue when forward-porting
Commit aab6bdd54a was incorrectly forward-ported to
10.0 at abb726d4df . Indeed share users could land
to a wrong backend or frontend page depending on the target app due to an
indentation issue.
2017-10-18 15:21:44 +02:00
Raphael Collet 2d46dbcbfd [FIX] ir_http: use meaningful ETag for images (#20283)
After setting the image on a product variant, the controller for `/web/image`
incorrectly returns the code 304 - Not Modified.  This bug occurs because
 1. the response ETag is a hash of the **last modified date** of the record;
 2. the record is actually **not** updated in that case, because
     - the image field is a non-stored computed field, and
     - its inverse method only modifies the variant's template.

Fix the issue by making the response ETag a hash of the **content**, which is
read by the controller anyway.

OPW 769302
2017-10-18 14:53:10 +02:00
Christophe Simonis 2198220947 [MERGE] forward port branch 9.0 up to e0fbe7b5be 2017-10-18 14:05:42 +02:00
qsm-odoo c7f5ad87a4 [FIX] web_editor: odoo-made tables should not be layout: fixed 2017-10-18 13:37:33 +02:00
Goffin Simon 1108c150d9 [FIX]sale: pricelist price base
Fine tuning of c477f0764e

When setting a pricelist to show the public price discount, it ignored
the pricelist item's base field (if not 'Other Pricelist') and set it
by default on the lst_price instead.

This did not work when you based your discount on the standard_price
(= cost price) with public price discount.

Now it does.

opw:775275
2017-10-18 12:16:27 +02:00
Goffin Simon 130dc1b64f [FIX]sale: pricelist price base
Revert of c477f0764e

In some case product[pricelist_item.base] can be a product.product

opw:775275
2017-10-18 11:28:44 +02:00
Adrian Torres 333a2360d8 [FIX] website_quote: don't unlink website_description
This is a hotfix/hack for a conflict between website_quote and
website_sale, on the field website_description.
The conflict happens when both modules are installed.

Fixes #20118
2017-10-18 11:27:07 +02:00
Goffin Simon 0012eb4c97 [FIX] website_sale: included taxes considered as discount in the shop
Steps to reproduce the bug:

- In Sales settings, set "Tax display" as "Show line subtotals without taxes"
- Create an article A with a customer tax set as price-inclusive.
- associate on an other article B the  pricelist P with a discount_policy
  set as "without_discount"
- Ensure that the pricelist P is used in the shop.
-Go to the shop

Bug: The article A is considered as discounted but the price is full.
The prices with included taxes were considered as discounted because
lst_price - webstie_price were always greater than 0. When the
"Show line subtotals without taxes" is checked  for Tax display,
the field website_price never includes the taxes. That's why the
included taxes are substracted from the website_price.

opw:776526
2017-10-18 10:15:03 +02:00
Goffin Simon f971ed704c [FIX]sale: pricelist price base
Fine tuning of this commit: c477f0764e

opw:775275
2017-10-18 09:49:34 +02:00
rde e0fbe7b5be [FIX] website_sale: disable checkout btn if GTS unchecked at load
opw-774286

*Before this commit:
On checkout, you can enable a step to force user to have the General Terms of
Sale checked to continue the checkout. Checking/Unchecking will correctly
disabled/enabled the button.
The checkbox is already checked at page load (on the template).
BUT, if the template has been modified to set the checkbox as unchecked at load
(eg the user removed 'checked="checked"' from the template), the button will
still be enabled even if the checkbox is unchecked.

*Now:
No matter if it is checked or not on the template, the button will
correctly be enabled/disabled regarding the checkbox state at load.
2017-10-17 17:40:41 +02:00
Laurent Smet 6e46ba7b46 [FIX] point_of_sale: fix taxes rounding in POS
Don't round the base amount at each step during compute_all of taxes.

-opw: 776986
2017-10-17 16:22:20 +02:00
Agathe Mollé 4d56e76d52 [FIX] Fix canadian province state_ca_NL name 2017-10-17 16:18:13 +02:00
alexkuhn a48b5c45aa [FIX] crm: stage auto-probability not taken into account when creating an opportunity from kanban view (#20209)
1. on CRM module -> Select Pipeline -> Create a column (e.g. 'Test')
2. Edit this Stage
3. Toggle on the field 'Change Probability Automatically'
4. Set a stage probability (e.g. 50%)
5. Create an opportunity on this stage, using the quick create widget of the kanban view
=> The probability of the newly created opportunity is not 50%, as it should be expected

It takes the default_probability, using a default_stage_id, which is the 'New' column having initially a probability of 10%. The stage_id is correctly assigned to the newly created opportunity thanks to environment variable 'default_stage_id', but not the probability.

We solved this bug by updating the probability of the opportunity, after creating the object. We cannot do it at the same time, because BaseObject.create parse the missing fields in an order where probability comes before stage_id.

This fix is limited to the quick creation of opportunity by means of its name only. In particular, it doesn't overwrite the input of the user in the form view.

opw-772310
2017-10-17 14:20:30 +02:00
Nicolas Martinelli 539a09a93c [FIX] stock: use method return
In case MRP is used with kits (phantom BOMs), the method
`action_explode` is called through the override of `action_confirm`.
However, `action_explode` modifies the recordset by deleting the move
with the original product since it is not relevant anymore.

We take this use case into account by reusing the return value of
`action_confirm`.

opw-772644
2017-10-17 13:53:00 +02:00
Raphael Collet 9ae78328ec [FIX] fields: writing on a one2many with a domain should not remove all lines
Specifically, the command `(6, 0, ids)` should only unlink/detach the lines
that satisfy to the field's domain.

Test from #18440

opw-756983
Closes #18438
Closes #18440
2017-10-17 13:50:00 +02:00
qsm-odoo b85bd35823 [FIX] web_editor: fixed issue of chrome triple click
Partial backport of 11.0 commit (https://github.com/odoo/odoo/commit/6ad2ae30354a77c0f898cb9cb5a859713061d71a)
to solve issue 774152. Note: it has to be forward-ported as
implementation has been improved to handle mass mailing cases.

When an user triple-clicked on a paragraph and then typed text, the
paragraph was removed instead of its content (so the new text was
added at the beginning of the next paragraph).

See: http://stackoverflow.com/questions/38467334/why-does-google-chrome-always-add-space-after-selected-text
2017-10-17 12:45:52 +02:00
Christophe Simonis cbca27d005 [MERGE] forward port branch 9.0 up to d5c0cae60b 2017-10-17 11:42:05 +02:00
Lucas Perais d5c0cae60b [FIX] mass_mailing: background snippet option outlook compatible (#20137)
Origin of the fix: the snippet background image did not change the background image.
This was due to commit a14f89c which wraps the snippet's content into a table for outlook display compliance

This issue is fixed here, with the modificaion of the background snippet option.

OPW 772442
2017-10-17 09:37:08 +02:00
Cedric Snauwaert 757e9e586c [FIX] account: fix balance = 0 in dashboard
In some case, user set a currency on the journal which is the same as the company currency. In that case, the field taken was amount_currency which should not be the case.

OPW 775123
2017-10-16 17:55:26 +02:00
Jérome Maes 25725eae57 [FIX] hr_timesheet_sheet: set domain on action to see timesheet only
Analytic lines should not be included when
showing the timesheet line of a given
sheet. A domain is thus needed on the action.

opw-772517
2017-10-16 17:27:16 +02:00
Jérome Maes 3d5298aff9 [FIX] hr_timesheet_attendance: only include timesheet in attendance/timesheet report
Report mixed analytic line and timesheet, but
only timesheet should be included.
Since a timesheet is an analytic line with
a project, this fix do the job.

opw-772517
2017-10-16 17:27:16 +02:00
Denis Vermylen c477f0764e [FIX] sale: pricelist price base
When setting a pricelist to show the public price discount, it ignored
the pricelist item's base field (if not 'Other Pricelist') and set it
by default on the lst_price instead.

This did not work when you based your discount on the standard_price
(= cost price) with public price discount.

Now it does.

opw: 775275
2017-10-16 17:26:11 +02:00
Pierre Masereel d301d6391d [FIX] point_of_sale: rounding error when create picking
When a return picking is created from a POS order, the methods check
that the value rounded to the unit of measure is not null.

The problem is that a rounding is passed to the function 'float_is_zero'
in the parameter precision_digits instead of precision rounding.

This bug has been introduced in rev: https://github.com/odoo/odoo/commit/61304087e7f48c677837dabdc8f1f8aeb18fb52e

opw-771282
2017-10-16 17:07:43 +02:00
Raphael Collet 9882c93874 [FIX] website_slides: avoid NULL characters in text field
OPW 772560
2017-10-16 16:38:30 +02:00
Fabien Meghazi c822eb4809 [FIX] crm: mark(lost|won) routes calls removed crm.lead functions (opw: 773907)
crm.lead#case_mark_won and case_mark_lost have been removed in 1414b3e56e
merged in saas-12 but later commit 0b87f76628
reference those function and was merged in saas-11

This fix also improved logging in the controllers in order to log
unexpected exception.
2017-10-16 16:32:24 +02:00
qsm-odoo df8590e562 [FIX] web_editor: properly save multi-edited elements
When an element is placed multiple times in a page, it is saved only
once. Unfortunately, when a view was divided in multiple editable
parts (XML branding), only one of those parts were saved.
2017-10-16 16:02:00 +02:00
qsm-odoo eda976e63d [FIX] web_editor: do not break labels' texts into <p/>
When editing the content of a <label/> which has XML branding (first
DOM element which is editable in its hierarchy), a <p/> element was
added inside. This behavior is there to automatically add <p/> elements
in empty editable <div/> / <section/> elements on edition. This should
however not apply on <label/> elements.
2017-10-16 16:02:00 +02:00
qsm-odoo 296498fb58 [FIX] web_editor: do not break <p/> when pasting a <p/> element
This fixes a bug when pasting text in a paragraph, it was always
creating a new paragraph for no reason.
2017-10-16 14:14:47 +02:00
amoyaux 671c20555e [FIX] mrp: Unbuild multi serial number components
Use case to reproduce:
- Create a product with a BOM that use at least
twice the same component tracked by SN
- Build this product with SN 'A' and SN 'B'
- Unbuild it
-> Constraint error on duplicate SN

It happens because the unbuild order will create only
one stock.move.lots for SN A with a quantity of 2.

This commit create a stock.move.lots by quant used,
for example if the MO used 2 quants with a qty of 1
and one with lot 'A' and the other with lot 'B'. It will
create 2 stock.move.lots with lots 'A' and 'B'.

Still a know issue: If the user try to unbuild twice
the same MO it will reuse the same unbuilded componenets
than the first unbuild order.
2017-10-16 13:14:46 +02:00
amoyaux 0aefcdbad7 [FIX] stock: procurement generated by scheduler truncate datetime
When purchase order are created from a scheduler they always
have the same hours even if they were created at different
time. Also the procurement order that generate the purchase
order line have the same problem.

It happens because the transformation from datetime to string
use a date format and thus truncate the DEFAULT_SERVER_TIME_FORMAT

This commit use a datetime format instead the dateformat.

opw-775833
2017-10-16 13:14:21 +02:00
amoyaux fea667a243 [FIX] account_invoice: Wrong default uom
The UOM by default should be the purchase UOM

opw-775105
2017-10-16 13:14:02 +02:00