Commit Graph
117156 Commits
Author SHA1 Message Date
Martin Trigaux 9b4dfd9978 [IMP] base: do not load local file resources
The generation of the manifest should not be platform dependent, its content
should be the same whatever local files are present on the filesystem
2018-07-28 11:25:24 +02:00
Nicolas Lempereur cb2a3afa7e [FIX] base: use -U+FEFF instead of U+2011 in -num
In af64780a2 an improvement was done so a numerical fields like '-500'
was not breaked up over two lines after the hyphen.

But it seems in a very particular case of printing PDF in a given
combination of condition:

- printing over wkhtmltopdf which itself uses an old version of webkit
- particular font (issue happen with Arial but not "Segoe UI")
- particular version of windows (windows server 2012, not on windows 10)

the - character at the front of a monetary, float or integer field would
be displayed as | erroneously.

The problem is probably that the font system in the old webkit with
given windows will not find the code point in the given font, and
doesn't fallback correctly.

This commit replace using the "NON-BREAKING HYPHEN (U+2011)" by using
the "ZERO WIDTH NO-BREAK SPACE (U+FEFF)" which is an invisible character
with no width that prevent splitting at its location.

As a note, an alternative to this character is "WORD JOINER (U+2060)"
that may be preferred, but it presents exactly the same issue (with
-|500 instead of -{WORD JOINER}500) in the same environment.

mentioned in https://www.odoo.com/forum/1/question/118653
opw-1867842
fixes #17093
fixes #25840
closes #26019
2018-07-27 17:07:38 +02:00
Denis Ledoux 3096d94d9b [FIX] service: --dev=reload, exclude temporary python files
Do not reload when a temporary Python file is
added/updated/reloaded.

This is to be able to use editors using isolation when saving file.
On save, they create a temporary file which is then moved on the target file.
The temporary file exists for milliseconds only,
and when the change was detected by watchdog and the server was reloaded,
the file already no longer existed on load.
It leaded to `No such file or directory` after the reload.
2018-07-27 11:40:01 +02:00
Olivier Dony 92a224ee3a [FIX] event: prefer registration email over partner email
As of rev. ca989b6548, the default
recipients of a model record are used to filter out blacklisted and
duplicate emails during a mass-mailing. This can match both either
partner_ids or emails, as returned by
`message_get_default_recipients()`.

The problem with even registration is that a single partner, sometime
anonymous (Public User) can be used to register several participants.
We therefore need to override `message_get_default_recipients()` to that
intent, similarly to what is done in crm.lead since
ca989b6548.

Without this, mass-mailings sent to free event attendees would never be
sent, as they would all appear to be duplicates of each other.
2018-07-26 23:52:18 +02:00
Olivier Dony fb31330451 [FIX] auth_signup: correct leftover from 6d16915d39
The /web/signup controller was also supposed to get the special frame
header, like all sign-in/up pages.
2018-07-26 23:48:58 +02:00
Lucas Perais (lpe) f05b10ce49 [FIX] website_payment: display acquirer's messages in case of wire transfer
Connect as portal, go to my account > invoices and click pay now
select wire transfer as the acquirer and then pay now

Before this commit, the messages displayed to the user was misleading and wrong

After this commit, we take the relevant acquirer's message

OPW 1867670
closes #17508
closes #25946
2018-07-26 14:17:32 +02:00
Christophe Simonis ee09d11738 [MERGE] forward port branch saas-14 up to b8ab55319b 2018-07-26 12:38:55 +02:00
Christophe Simonis b8ab55319b [FIX] web: avoid traceback in case of failed login 2018-07-26 12:21:44 +02:00
Christophe Simonis e80a0d4aa9 [MERGE] forward port branch saas-14 up to ea53be492e 2018-07-25 16:09:06 +02:00
Christophe Simonis ea53be492e [MERGE] forward port branch 10.0 up to f1ee633f26 2018-07-25 15:29:29 +02:00
Nicolas Lempereur f1ee633f26 [FIX] website_hr_recruitment: frontend creation ok
When creating a job position from the frontend, and we:

- are on the same language that the default website language,
- have the permission to write on ir.ui.view,

we have all conditions to adding branding used to edit a page.

But when creating a position by the frontend, we create a job that will
render this template:

 website_hr_recruitment.default_website_description

When we are in the above said condition, we will create a job position
that erroneously has the branding that should only be displayed on
website and removed when saving an edition.

This caused a lot of problem with the editor that would most often not
be able to edit the content.

In this commit, we use the "rendering_bundle" context key to prevent
branding.

opw-1868879
closes #25963
2018-07-25 12:01:05 +02:00
Christophe Simonis a34789c837 [MERGE] forward port branch 9.0 up to 2c5ec48f92 2018-07-25 11:09:30 +02:00
Christophe Simonis 2c5ec48f92 [FIX] http: only del existing attributes
Closes #25652
2018-07-25 11:01:07 +02:00
Lucas Perais (lpe) aa4ccef418 [FIX] account: fix planner extra features 2018-07-25 09:21:26 +02:00
Wolfgang Taferner 62770ae9b8 [FIX] stock: test should actually fail, but did not for months
Commit dc1681b1 did change the name of the inventory creation from
direct qty update, but test still tries to compare the product.name

closes odoo/odoo#25948
2018-07-24 14:17:38 +00:00
qsm-odoo 24a8bce542 [IMP] website: add BS3/snippets showcase demo data
(should not be forward-ported)

- Backport of https://github.com/odoo/odoo/commit/9f2750d9ebda20758345724cd2a0934ab08d1f00
- Backport of https://github.com/odoo/odoo/commit/925fdbc683c546e096d1ae99aa22606480f78a0e

closes odoo/odoo#27187
2018-09-24 10:44:09 +00:00
Nicolas Lempereur 07cdd24f30 [FIX] product: is_product_variant true if variant
In 11.0 7e724f96c5 is_product_variant has been introduced back (it was
removed in 10.0 b747b05fa). But related of _inherits are computed on the
related model so is_product_variant would always be false.

Without fix, added test fails with:

 AssertionError:
  Items in the first set but not the second: True, Items in the second
  set but not the first: False, Product variants are variants

fixes #26961
related to opw-1814973
closes #27163
2018-09-24 09:45:52 +00:00
Yenthe V.GandReinaldo Ramos ecea8c4df3 [FIX] sale_timesheet: set value on correct key
The view timesheet.plan expects a to_invoice key

Fixes #27160

Co-authored-by: Reinaldo Ramos <reinaldo.ramos@arxi.pt>

closes odoo/odoo#27166
2018-09-24 08:10:44 +00:00
Jeremy Kersten ef0f9556f8 [FIX] base: action - fix on_change on new record
Before this commit, if you create an automated action with trigger 'on_change'
it was not called because the run() function don't have active_id.

Now if we have onchange_self in the context but not active id, we call the
function nevertheless. (withtout active_id in context!)

closes odoo/odoo#27167
2018-09-22 21:02:30 +00:00
Nicolas Martinelli ee96c84a60 [FIX] stock: quant domain in valorisation
- Create a Customer location (CL) and set a Company on it
- Configure Product A in FIFO / Perpetual
- Receive 2 Unit(s) of A in Stock
- Create an Internal Transfer
  1 Unit(s) of Product A
  Source location: Stock
  Destination Location: CL
- Validate

The Inventory Valuation report incorrectly retrieves a quantity of 2 in
stock instead of 1.

The error is first due to a misconfiguration: the CL should not have a
Company set. However, we should not take into account any quantity in a
customer location, even if there is a Company set.

opw-1884675
opw-1884835

closes odoo/odoo#27145
2018-09-21 11:50:55 +00:00
Nicolas Martinelli 461871e7f8 [FIX] stock: no company on customer and supplier
Make sure that the company is not set on the customer and supplier
locations of the demo data. Otherwise, any quant in these locations will
be set a `company_id`, which is incorrect (e.g. valuation report will be
incorrect).

opw-1884835

closes odoo/odoo#27144
2018-09-21 08:47:14 +00:00
Christophe Simonis 199eb8dde3 [MERGE] forward port branch saas-15 up to d23601cc67
closes odoo/odoo#27156
2018-09-21 13:09:12 +00:00
Nicolas Lempereur b3a3ad8099 [FIX] document: updateEnv->redraw on not form view
In ac1e187ee some unecessary code and RPC were removed by ignoring
attachments in the sidebar when they would never be shown.

But there was an regression since `updateEnv` function would not
longer call redraw (which is also called in _super function).

report: https://github.com/odoo/odoo/commit/ac1e187eea3#r30569171

related to opw-1865736
closes #27146
2018-09-21 11:08:11 +00:00
Nicolas Martinelli a1501c3e58 [FIX] google_drive: current record
- Open a partner view, click on Action > Partner Review
- Switch to another partner
- Click again on Action > Partner Review

The Google Doc file of the second partner is the same than the first
partner.

This is due to `_onGoogleDocItemClicked` which is always called with the
same `resID`, i.e. the `resID` used at `start`.

We retrieve the active ID at each click instead.

opw-1882068

closes odoo/odoo#27132
2018-09-20 11:37:50 +00:00
Lucas Perais (lpe) f38afe68ca [FIX] l10n_in: right group on invoice lines table
Activate the group in the sale module: Sections on sale orders

Print an invoice

Before this commit, there were twice the same table filled with the invoice lines

After this commit, only one table and the right one is printed

OPW 1885549

closes odoo/odoo#27137
2018-09-20 12:34:51 +00:00
rocketgithub fdc9ea054f [FIX] base: currency and vat label for Guatemala
The VAT label for Guatemala should be NIT:
https://aprende.guatemala.com/tramites/documentos-mercantiles/que-es-nit-guatemala/

Closes #27075

closes odoo/odoo#27085
2018-09-19 07:57:11 +00:00
Goffin Simon 0a823342d5 [FIX] purchase: Error in test
Steps to reproduce the bug:

On a new db, just launch:

./odoo-bin --addons-path=../enterprise,./addons --test-enable -d s11 -i l10n_be,account_accountant,stock,sale_management,purchase

An error occured in test_02_check_mto_chain due to the supplier taxes set on the product.

opw:1878341

closes odoo/odoo#27069
2018-09-18 15:27:59 +00:00
Nicolas Martinelli 0b81117295 [FIX] stock: package content
We clarify the `stock.quant.package` view to highlight the difference
between the case where the content is retrieved from the move lines or
the quants.

Otherwise, this is confusing for a user who sees the same record with
the same view, but not the same content.

opw-1883714

closes odoo/odoo#27098
2018-09-19 13:38:28 +00:00
SimoRubi c5c9627da4 [FIX] stock: incorrect domain
The field `parent_id` has been removed in
https://github.com/odoo/odoo/commit/809605bb8f16cf1398ff5070ec0d5bd568aef343#diff-807e5ce512b0669468b040be7a9c470fL236

Therefore, `child_of` cannot be used anymore.

Closes #26850
opw-1883655

closes odoo/odoo#27083
2018-09-19 07:03:42 +00:00
Goffin Simon 00d286012a [FIX] base: address_format for Mexico
The address_format of Mexico must follow the format explained
in https://en.wikipedia.org/wiki/Address_(geography)

opw:1883174

closes odoo/odoo#27062
2018-09-18 13:32:22 +00:00
dreambits 190841ba41 [CLA] Dreambits Technologies. Pvt. Ltd. signs Odoo's CCLA
Closes #27071
2018-09-19 08:53:34 +00:00
Lucas Perais (lpe) 6ce265b815 [FIX] sale_stock: translate product name
Use case: have a partner in fr_FR while operating with a user in en_US
Create a SO for that partner
add a product which name is translated in french

Before this commit, the description of the sale order line takes the
*untranslated* name of the product

After this commit, it takes the *translated* name of the product

The issue was due to a limitation of sudoing within an onchange for related fields
(typically the case of product.product.name)
In this case, values that are missing in the cache are retrieved from another one

In our case:
First, _onchange_product_id_check_availability triggers the evaluation
of product.name as sudo (later in the stack), without lang in context

Second, the function that actually uses the product.name (product_id_change)
retrieves the value found before from the 'wrong' cache

OPW 1863305, 1884106
closes #27031
2018-09-19 09:12:51 +02:00
Nicolas Martinelli 7640575a24 [FIX] stock: extra move in return
- Create a PO with 5 units of A and 10 units of B
- Receive the products
- Return the picking, but return 12 units of A and 10 units of B

The first picking (done state) will contain:
- 7 units of A, 0 qty done => it is an extra move
- 10 units of B, 10 qty done

But another picking (not done) is created, with
- 5 units of A, 12 qty done

The core of the issue is that the `origin_returned_move_id` is not
copied on the extra move. Therefore, it is not merged by `_merge_moves`
since the latter field is in the list of
`_prepare_merge_moves_distinct_fields`.

opw-1882959
2018-09-19 08:06:13 +02:00
Nicolas Martinelli 2aa5c81248 [FIX] stock_landed_costs: do not prorate
- Set the product A in FIFO, real-time valuation
- Receive 5 units @ 2000 each
- Create a landed cost of 1000, apply on the picking
  => the cost of A is 2200
- Sell one unit
- Create another landed cost of 1000, apply on the same picking

The cost of A is 2360, while one expects 2400.

The value of the move after the second landed cost is computed as:
value = previous value + prorata of landed cost 2
      = 11000 + (1000 * 4/5)
      = 11800

This is not correct. The whole value of the second landed cost should be
taken into account for the `value` field. The prorata is only useful for
the field `remaining_value`.

opw-1878229
2018-09-19 08:04:43 +02:00
len-odoo 0b9d4643ec [FIX] point_of_sale: make test work with localisation modules
When localisation modules such as l10n_no are installed, the test
TestAngloSaxonCommon broke.
We isolate the test more by setting the right accounts on the products to make
the test pass.
This is useful for odoo.sh clients that install localisation modules and see the
tests break.

opw 1881014
2018-09-18 16:04:33 +02:00
len-odoo 598fafb3aa [FIX] website_sale: fallback on partner sales team if undefined on website
When a sale is done on the website, a corresponding sale order is created in the
backend. By default the salesperson and sales team associated to the sale are as
defined on the website.
When we prepare values, we fallback on the partner sales team in a way that is
coherent with the way it falls back on the partner for the salesperson.

opw 1882640
2018-09-18 12:38:02 +02:00
Lucas Perais (lpe) bd4b50f75a [FIX] account*, sale*, website_event, portal: public user not necessarily in right company
Have the main company (A) with the public user
Have an invoice in company B

Make a brand new browser access the invoice with the token

Before this commit: the token link ended up asking the customer to login,
eventhough it wouldn't if the invoice were in company A

After this commit: the whole payment with access token flow works as expected.

OPW 1879999
closes #26744
2018-09-18 11:02:58 +02:00
Christophe Simonis f2b8caff07 [MERGE] forward port branch saas-15 up to 03b83abb7f 2018-09-17 17:02:40 +02:00
Joseph Caburnay 5da419a4fe [FIX] point_of_sale: toggle the checkbox correctly.
Clicking the config labels don't toggle the checkboxes, instead show
dropbox menus (at the upper left screen) for the hidden field when
the checkbox is inactive. This modification toggles checkboxes correctly.

OPW 1884452
2018-09-17 16:14:49 +02:00
Gert Pellin - GPE 5dba2b6e09 [FIX] point_of_sale: deactivate price change on switch from admin on price control (#26994)
Usecase:
* Activate price control on point of sale.
* In pos session, as administrator, activate pricechange modus.
* switch to normal user.

Before fix normal user can change the price.
After fix the modus will automatically switch to quantity.
2018-09-17 14:07:22 +02:00
Martin Trigaux 2c7db14261 [FIX] sale_timesheet: translate correctly labels
Introduced at 7081a55cb4

opw-1884812
2018-09-17 12:00:21 +02:00
Goffin Simon a9670cfce5 [FIX] account: Reconcile a statement with move line from partner
Steps to reproduce the bug:

- Create a journal "Temporary" with default account
(don't care about the names) with Fixed asset type and reconcile = True
- Create a vendor bill
- Create a payment from this vendor bill in the temporary journal
- Create a bank statement and with a line where you specify the vendor
- Try to reconcile the temporary account with the bank account

Bug:

Impossible because the temporary account item was not displayed

opw:1884376
2018-09-17 09:53:25 +02:00
Odoo Translation Bot 2bf3c29b0c [I18N] Update translation terms from Transifex 2018-09-16 04:10:49 +02:00
Turkesh Patel f5070048d6 [FIX] l10n_in_hr_payroll: use correct parameter
bank_id field of hr.payroll.advice expects a res.bank record
not a res.partner.bank

Fixes #26690
Closes #26692
2018-09-14 16:42:55 +02:00
Turkesh Patel 5825f8b666 [CLA] signature for tpa-odoo
Done at #26692
2018-09-14 16:42:55 +02:00
RomainLibert 5eae8f7110 [FIX] crm,sale_crm: split action_mark_won
Since https://github.com/odoo/odoo/commit/4330ea02676a4afd88707bb463a007e7de3c8686, action_mark_won was
not api.multi anymore, which made it impossible to mark leads as won in
batch.
The problem is that we do exactly this in the demo data.

As we need to keep the rainbowman in the interface the decision has been
taken to split the method in two parts, one for the interface which
returns the rainbowman (and uses ensure_one) and the second which is a
true api.multi method.

Thanks to @tde-banana-odoo for his advice on the matter
2018-09-14 16:16:46 +02:00
Martin Trigaux 14a9b988f4 [FIX] web: graph_renderer: check graph data before rendering
cherry pick of 634de21b76
Before this commit, we had two different errors when data was
unavailable:
The first one is generated by Odoo: "No data to display, try to[...]"
The second one is generated by nvd3: "No Data Available".

We always want the same message.
So now, we always make some checks before rendering
the graph by calling _render.

opw-1874349
2018-09-14 16:15:43 +02:00
MOENS Alexandre b83db27135 [FIX] web: JournalDashboardGraph widget crash Mk.II
Hardening of commit:995610c065bf0242cb5023cfad2940234395739e

The JournalDashboardGraph requires nv, which is lazyloaded.
However it requires nvd3.js which is loaded after nv.d3.js.
A function called in destroy is defined by nv.d3.js,
which can make the crashhappen with the right (wrong) timing.

opw 1873749
2018-09-14 16:13:35 +02:00
Raphael Collet 70ed882088 [FIX] base: optimize the reading of many2one property fields 2018-09-14 14:25:00 +02:00
Raphael Collet d39d583b21 [FIX] product: partner property_pricelist load in batch for pos
Reimplement the compute method of the field to make it work in batch.
2018-09-14 14:25:00 +02:00