Commit Graph
126298 Commits
Author SHA1 Message Date
Habib Ayob 587bf71cec [ADD] l10n_za: add chart of accounts for South Africa
- generic CoA
- Sars VAT report

Thanks to Paradigm Digital

opw-1893580

closes odoo/odoo#33397

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-05-15 12:25:47 +00:00
Meghna Jaswani 2192270914 [FIX] base : fixed traceback when print and then save document layout in SaleOrder.
In Sales > Order > SaleOrder > Print > Choose Document Layout > Save: when data is saved there is comes a traceback as write method is called directly on Save button.
(sale_management)

Hence write method should not be called and args passed returns an empty list.
- we defined dummy method to be called on save

Similarly, in TimeOff > Reporting > Report by Department > Print > Choose Document Layout > Save and Print : write_company_and_print_report method is called on Save and Print button
(hr_holidays)

-write method which is called inside write_company_and_print_report is removed as empty args list is passed.
reference is taken from- https://github.com/odoo/odoo/commit/1ced3bfca457ac50845637bcd42a8e53bd7f088d

opw:1973947

closes odoo/odoo#33454

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-05-22 07:30:43 +00:00
qsm-odoo 370acf653f [FIX] web: restore pointer cursor for all buttons
Since the update to Bootstrap 4.3.1 made with commit
https://github.com/odoo/odoo/commit/4697d7448010376397f7150b84c207978ab3010e,
the pointer cursor is not automatically added on elements with the 'btn'
class but only on <button> elements. This is a strange undocumented
decision as the 'btn' class can be used anywhere, especially on <label>
elements for their checkbox and radio button components as documented:
https://getbootstrap.com/docs/4.3/components/buttons/#checkbox-and-radio-buttons

This commit reenables the pointer cursor for all non disabled elements
with the 'btn' class.

closes odoo/odoo#33505

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-20 13:54:07 +00:00
Olivier Colson cb5eea5914 [FIX] l10n_be: apply correct sign on refund repartition for grid 62
closes odoo/odoo#33525

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-05-21 11:06:53 +00:00
Jigar Vaghela a3f923f39e [ADD] l10n_mn: Add Mongolia Accounting
Basic Chart of Accounts and taxes for the Mongolian
accounting.  Tags for a lot of reports in Enterprise.

A lot of different taxes are created to be able
to represent them in the vat report. Mongolians
are used to taxes included even for B2B.

Some fiscal positions are added e.g. to automatically
apply 0% for export.

We got a lot of input from our Mongolian partner
Baskhuu Lodoikhuu and colleagues from BumanIT LLC

opw-1946238
Adapted to taxes in 12.3

closes odoo/odoo#33399

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-05-21 08:53:02 +00:00
Adrien Dieudonne 8cc034d9f1 [FIX] web: date_picker: avoid duplicate function declaration
Due to forward port, _onKeydown was declared twice.

This commit should fix an issue in mobile with Android 4.4 where
it's not allowed to have two functions with the same name.

Original Commit: a3d98dae68

closes odoo/odoo#33495

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-05-20 09:28:58 +00:00
Ravi Gohil 70658d035e [IMP] l10n_it: adapting addition of new taxes to V13 tax configuration
Tax of 5% added

opw-1915454
Closes #33401

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-05-15 13:27:02 +00:00
Olivier Colson 57feafd4d9 [FIX] account, hr_expense, point_of_sale: 'affect subsequent taxes' base" taxes
Consider the following use case:
- Two taxes:
-A: price included, affect base of subsequent taxes, 10%
-B: 15%, regular
- Create an invoice with a line applying A, then B, for 110€. Post it
- The following move lines are generated:
- base: 100€
- tax A: 10€
- tax B: 16.5€

Before this fix, line "tax A" only had the tax tags of tax A. It should also receive the base tags from tax B, in order to affect its grid total correctly in the tax report.

Also, tax_base_amount field used to be computed, but its computation was too simple, and most of the time wrong when doing advanced use of taxes like the one we defined above. It is now not computed anymore, and directly takes its value from the compute_all's result.

closes odoo/odoo#33420

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-05-16 08:55:12 +00:00
Prakash Prajapati 69d708c07c [FIX] web: Alignment for total in List view
The goal of this commit is the alignment of the total in List view.

before this commit, it shows the left side so that it looks weird.

After this commit total show below the related column.

Task: 1981893

closes odoo/odoo#33210

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-05-14 08:43:58 +00:00
William Henrotin a981196c8f [FIX] mrp: unlink workorder lines in post_inventory()
Posting intermediate inventory in a manufacturing order using workorder
need to delete all the remaining workorder lines.
The post_inventory method create new raw moves for the remaining quantities
then reserve those quantities. The reservation will create new workorder lines

If the old workorder lines are not purged, the workorder will be asked to produced
too much.

closes odoo/odoo#32948

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-25 09:53:01 +00:00
William Henrotin 18171b1e52 [FIX] mrp: wrong use of self
The method _workorder_line_ids() is defined on mrp.workorder while `self`
is an instance of change_production_qty wizard in this case. Without this
commit, changing the quantity to produce of a manufactoring order with workorders
already planned raised a traceback.
2019-04-24 14:03:06 +00:00
Christophe Simonis 60e71302a3 [MERGE] forward port branch saas-12.2 up to 243a4ae5cb 2019-05-13 11:02:27 +02:00
Christophe Simonis 243a4ae5cb [MERGE] forward port branch saas-12.1 up to 330b99f60c 2019-05-10 15:20:01 +02:00
Olivier Colson 3936d655c4 [IMP] account, l10n_*: v13 taxes
- Add repartition lines on taxes

- Link account tags directly to account.move.line; remove the tag_ids field from account.tag

- Add a new report engine dedicated to tax reports, directly generating account tags. It is called as an alternate mode of generic tax report, with a dedicated "Use tax grids" toggle.

>> The biggest change lies in the way the new tax report computes its values.
Everything is now aggregated directly using the tags set on the account move lines. Thanks to that,
modifying the configuration of a tax today will not impact the report for the previous periods anymore.
This is a big improvement, as it means the report will keep on reflecting the values that were submitted
to the state before, whatever the configuration change.

- Add an audit char field to account.move.line telling with tax grids are impacted by the line, with the corresponding amount

- Modify the behavior of cash basis taxes: the cash basis account is now used as the transition account, while the regular account given in tax declaration is used to store the final entry (it was the opposite before)

- Modify every l10n_* module in order to keep them consistent with these changes

closes odoo/odoo#32833

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-05-10 11:52:58 +00:00
Prakash PrajapatiandMartin Geubelle 330b99f60c [FIX] stock: location and warehouse filter on product
Purpose: filter product by location of warehouse failed due to the
control panel refactoring (odoo#29106). This commit fix the way the
product quantities are computed when location/warehouse into filter
context.

Task:1941639

Co-Authored-By: Martin Geubelle <mge@odoo.com>

closes odoo/odoo#31316

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-10 08:07:01 +00:00
Christophe Simonis cc3a2c1bf3 [MERGE] forward port branch 12.0 up to e11bacfe51 2019-05-09 21:07:44 +02:00
Johan Demaret Rivarola e11bacfe51 [FIX] sale_stock: tour dependency on sale_management
Creating a new database with only sale_stock installed will lead the
boot_tests.js test to fail.

That's because commit 033608eb11
introduces an implicit dependency on a sale_management tour. This seems
to be a mistake since sale_stock does not depend on sale_management.

The tour only makes sense if both sale_stock and sale_management are
installed though. That's why the additional steps will be run
conditionally.

After this commit, the extra steps will only be run when sale_management
is installed.

Technically, this is done by checking whether odoo._modules contains
sale_management.

opw-1964469
closes #33275

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-05-09 15:47:20 +00:00
Martin Trigaux de3a4c2947 [FIX] transifex: correctly escape links
This commit corrects two issues:
- new lines characters are ignored by transifex when searching (searching on
'\n' finds no match)
- quotes are ignored by transifex (it used to be escaped with \\)
- the text:'...' does not need to be escaped, it is the searched string that
must be escaped.

For instance, searching on "\n\nThis addon is already installed"
used to give:
https://www.transifex.com/odoo/odoo-12/translate/#fr/base/42?q=text%3A%27%0A%0AThis+addon+is+already+installed+on+your+system%27

and it now returns:
https://www.transifex.com/odoo/odoo-12/translate/#fr/base/42?q=text:'This+addon+is+already+installed+on+your+system'

Searching on
'%s' does not seem to be a number
used to give:
https://www.transifex.com/odoo/odoo-12/translate/#fr/base/42?q=text:'%5C%27%25s%5C%27+does+not+seem+to+be+a+number+for+field+%5C%27%25%25%28fi'

and it now returns:
https://www.transifex.com/odoo/odoo-12/translate/#fr/base/42?q=text:'%25s+does+not+seem+to+be+a+number+for+field+%25%25%28fi'

closes odoo/odoo#33279

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-09 12:55:04 +00:00
Davor Bojkić a515ee6064 [IMP] base{_address_extended}: update Croatia related data
- specify the correct separators on the language
- add the address format
- add street addres format for croatia

closes odoo/odoo#33205

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-09 13:41:01 +00:00
Martin Trigaux 26d994eadc [FIX] l10n_ch: correct translation of tax label
opw-1986715

closes odoo/odoo#33278

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-09 12:22:39 +00:00
Laurent Smet 574295df57 [FIX] account: fix usage of include_base_amount taxes in invoices
Suppose 3 taxes, all with include_base_amount checked:
- 21%
- 21% TVAC
- 12%

Suppose an invoice with 3 lines, one per tax, all with quantity = 1:
- price_unit = 100 with 21%
- price_unit = 121 with 21% TVAC
- price_unit = 100 with 12%

- Validate the invoice and take a look to the taxes set on taxes journal entries:
Originator Tax: 12%
Taxes: /

Originator Tax: 21%
Taxes: 12%

Originator Tax: 21% TVAC
Taxes: 21% 12%

... instead of:
Originator Tax: 12%
Taxes: /

Originator Tax: 21%
Taxes: /

Originator Tax: 21% TVAC
Taxes: /

-opw: 1861177
2019-05-09 11:56:39 +00:00
Laurent Smet 4523a11bed [FIX] account, point_of_sale: Fix complex taxes computation
The previous _compute_all wasn't able to get the right results in case of complex
taxes computation.

See tests for examples.

task: 39945
2019-05-09 11:56:39 +00:00
Priyanka Kakadiya 1ab4b61059 [FIX] website_sale_comparison: re-enable test
This reverts commit b5684105b1.

Closes https://github.com/odoo/odoo/pull/31961
task-1950702

closes odoo/odoo#31961

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-09 14:19:26 +00:00
Priyanka Kakadiya ee94decd30 [FIX] web: disable sanitization for bootstrap popover
Since saas-11.3:
Bootstrap sanitizer sanitizes html and removes attributes which are not
defined in whitelist, here is the documentation link:
https://getbootstrap.com/docs/4.3/getting-started/javascript/#sanitizer

Restore sanitize=false for bootstrap popover.

A scenario where the sanitizer will break a popover: compare 2 products
and open Compare popover and try to delete a comparison item from the
popover -> item can not be deleted because data-product_product_id has
been removed by sanitizer and so the item can not be deleted because
deletion logic depends on data-product_product_id.

Reference commit: https://github.com/odoo/odoo/commit/36caf5fc16b5a95a0bf37f08f0caf974683b2df6

Closes https://github.com/odoo/odoo/pull/31961
task-1950702
2019-05-09 14:17:05 +00:00
Toufik Ben Jaa 9530f1071d [FIX] mail: avoid crash when calling channel_info in mail.channel
- If a channel has only the current user as the partner the method `channel_info` crashes.
This can happen in the case of a partner talks to an other partner in
discuss.
Then these two partners are merged using the CRM partner merge
feature.

The channel has now the same partner in the channel twice.
The current code doesn't handle this case and crashes.

closes odoo/odoo#33274

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-05-09 11:10:12 +00:00
Nicolas Seinletandwilliam-andre dbaef7de17 [IMP] account: faster reconciliation
avoid to get journal_entry_ids, to avoid pushing those ids in cache and
having them read uselessly when accessing an account.move.line
recordset.
Use search and search_read instead of ORM __get__

closes odoo/odoo#33192

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>


Co-authored-by: william-andre <wan@odoo.com>
2019-05-09 10:10:32 +00:00
Christophe Simonis f1d6a6108e [MERGE] forward port branch saas-11.3 up to 825fee2626 2019-05-09 11:12:22 +02:00
Luis González 6afec6b6b8 [I18N] sale: Remove duplicated term from pot
Commit c7773f9f introduced a duplicated term to the file .pot, which
causes the following error when trying to re-load translations:

```
ON CONFLICT DO UPDATE command cannot affect row a second time
HINT:  Ensure that no rows proposed for insertion within the same
command have duplicate constrained values.
```

This commit removes on eof the duplicates, leaving only the valid one.

In addition, field string is modified to match the one defined at the
`website_sale` module, to prevent this from happening again, as had also
in 6af6da5c.

closes odoo/odoo#33223

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-08 21:35:02 +00:00
Christophe Simonis 825fee2626 [MERGE] forward port branch 11.0 up to d01db48087 2019-05-08 18:29:32 +02:00
Christophe Simonis d01db48087 [MERGE] forward port branch saas-15 up to 82f88478cf 2019-05-08 17:27:30 +02:00
Christophe Simonis 82f88478cf [MERGE] forward port branch saas-14 up to 98b10f98bb 2019-05-08 17:13:30 +02:00
Christophe Simonis 98b10f98bb [MERGE] forward port branch 10.0 up to a48318cb33 2019-05-08 17:09:40 +02:00
Xavier Morel 1121f01196 [FIX] bus: crashmanager popup if beep can't be played
According to MDN, HTMLMediaElement returns

> A Promise which is resolved when playback has been started, or is
> rejected if for any reason playback cannot be started.
>
> Note: Older browsers may not return a value from play().

Since un-resolved un-handled promises re-raise and trigger the crash
manager, this is extremely noticeable if the browser doesn't support
the media type or is not currently allowed to play
medias (e.g. configured to prevent auto-play).

This just avoids the error, but eventually it might be useful to
display a toast noting the user could allow sounds iff the rejection
reason is NotAllowedError. This fix would probably be implementable /
implemented on older revisions (which might have the issue, just not
as prominent as unhandledrejection is not hooked into the crash
manager).

closes odoo/odoo#33260

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-08 14:23:53 +00:00
wan 1679b0e926 [FIX] account: action was taking unexisting parameter
Somehow this worked before and isn't working now but that parameter is never used

closes odoo/odoo#33214

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-05-09 07:08:45 +00:00
Jorge Pinna Puissant 2c366acbf0 [FIX] hr_holidays: leave type in hours in new leave request
When a new request of leave is created, some fields are computed to
calculate if it's possible or not, to take the leave
(virtual_remaining_leaves, leaves_taken, remaining_leaves and
max_leaves).

These fields are computed using the fields :
allocation : hr_leave_allocation.number_of_days.
and request : hr_leave.number_of_days.

When a leave type is in hours, both of these fields are calculated
differently:
allocation: The allocation field is calculated dividing the number of
hours registered by the user per the average hour per working day.
(https://github.com/odoo/odoo/blob/d809b476819968837b61bdd78fbf101caac73adc/addons/hr_holidays/models/hr_leave_allocation.py#L236)
request : The request field is calculated by finding the real number of
requested days.
(https://github.com/odoo/odoo/blob/d809b476819968837b61bdd78fbf101caac73adc/addons/hr_holidays/models/hr_leave.py#L360)
If in the company each day have different working hour, then the number
of days calculated with the average hours didn't represent the real
number of days that the employee can take. This issue can avoid the
employee to take a leave even if he has the correct number of hours to
take it.

Now, the fields (virtual_remaining_leaves, leaves_taken,
remaining_leaves and max_leaves) are calculated using either the days
fields or the hours fields depending on the leave type.

opw-1972133

closes odoo/odoo#33244

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-08 13:12:09 +00:00
Jorge Pinna Puissant 5c33ebef5f [FIX] hr_holidays: allocation list with leave type in hours
When a leave type is in hours, before this commit, in the allocation
list the allocation is shown in days. The problem is that the number of
days its calculated with the average hour per day. If in the company
each day have different working hour, then the number of days calculated
with the average didn't represent the actual number of days that the
employee can take.

Now, in the allocation list, the allocation is shown either with days or
hours depending on the leave type.

opw-1972133
2019-05-08 13:12:04 +00:00
Nicolas Martinelli 709e59b4e9 [FIX] account: analytic account and cash basis
- Activate cash basis
- Set a tax
Tax Due: Based on Payment
Include in Analytic Cost: true
- Create an invoice, add the tax and an analytic account on the invoice
line
- Validate and pay

The analytic account is correctly set on the tax line, but it is not set
on any of the cash basis entries.

Partial backport of 079a13a349.

opw-1971751

closes odoo/odoo#33236

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-08 12:41:00 +00:00
Julien Castiaux fe6d9ed343 [FIX] calendar: getting recurrent_ids twice
The `_search` is override in `calendar.event` to return both ids and
virtual ids of recurrent events. Calling `.get_recurrent_ids` after the
search is wrong.

The entire request has been copied from the original
`_find_allowed_model_wise` function defined in `mail.message` to ensure
his correctness.

The purpose here is to ensure every virtual event id is mapped to the
real event id so the original function doesn't throw KeyErrors for
virtual ids.

opw-1972563

closes odoo/odoo#33246

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-05-08 09:56:32 +00:00
Nicolas Martinelli 6ff5498fc0 [FIX] base: barcode fallback
- Set a product barcode to a 8 letters value, e.g. 'AAAAAAAA'
- Print 'Product Barcode (PDF)' (or any other report containing the
barcode)

The barcode doesn't print.

All templates assume that:
- a 13 characters barcode is EAN13
- a 8 characters barcode is EAN8

But this assumption is too restrictive: one could want to generate
barcodes with such length without following the EAN13 or EAN8 structure.

We fall back on Code128 when the barcode generation fails.

Backport of 06cfdbaab8
opw-1981988

closes odoo/odoo#33240

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-08 09:02:45 +00:00
Nicolas Lempereur f89d2f3599 [FIX] hw_blackbox_be: typo e8574502e1
There was a syntax improvment in the commit merged but it was not
intended to be unfinished.

fixes #33228
opw-1981839
closes #33239

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-05-08 08:55:41 +00:00
Joren Van Onder 41871bf562 [FIX] payment: prevent duplicate payments with payment tokens
When paying an eCommerce order with an acquirer which doesn't
redirect (payment_flow: s2s) the "Pay Now" button is correctly
disabled after clicking it. This prevents a user from clicking it
multiple times and being charged multiple times.

When paying with an existing payment token however the button was not
disabled and the user gets no feedback his request is being
processed. Charging an existing payment token takes a while (~5
seconds with Authorize) and so it's possible users will hit the button
multiple times.

This disables the button when reusing an existing payment
token. Additionally it now uses the correct font awesome icon (fa-lock
instead of fa-plus-circle).

opw-1981064

closes odoo/odoo#33196

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-07 17:42:33 +00:00
David Beguin 92cb648882 [FIX] survey : externalise survey web assets to avoid multiple load at website install
Since f5625969be, web assets in survey module
was loaded twice when website (and website_survey) is installed.

Thoses web assets are now externalised in another template that is loaded
only if survey is installed without website installed.

Task ID : 1985977
PR #33218

Also linked to Master task - refactor survey
Task ID : 1930132
PR #32419

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-05-07 13:34:13 +00:00
Nicolas Lempereur b87454ee1b [FIX] hw_blackbox_be: adapt code to posbox 17 py3
Python2 uses byte strings by default and python3 text string, so adapt
the code communicating with blackbox to still only use bytestring.

Also raspbian image has been updated in posbox 17 to Raspbian 9
(stretch) so ifconfig command returns has different format output (
`ether {MAC address}` instead of `HWAddr {MAC address}`) so the way we
get the MAC address is changed.

opw-1981839
closes #33150

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-05-07 12:39:51 +00:00
wan 766f8c42a9 [FIX] base: html field was used instead of m2o
Original PR: https://github.com/odoo/odoo/pull/31597

The html sanitizer could have unwanted bahavior, and using a html field should be unneccesary

closes odoo/odoo#33143

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-05-07 10:51:15 +00:00
Alexandre Kühn 893e07e590 [IMP] im_livechat,web: use nicer placeholders for livechat
In the context of a livechat session, a placeholder that looks like a
person is better than a generic "missing picture" one, when the user has
no public avatar.

In order to allow a different placeholder without exposing a public
placeholder parameter, a separate route is introduced for the
purpose of displaying user avatars:
/web/partner_image/<id>/<field>/<model>
and can be simplified to:
/web/partner_image/<id> for loading a partner avatar (`image_small`).

The common part of the /web/image route was moved into a helper
function that is not directly exposed.

Task-ID 1924666
Closes #32664

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-05-08 10:35:37 +00:00
Alexandre Kühn 9e067d7d9d [FIX] web: safe open image placeholder
Before allowing custom placeholders, make sure the placeholder images
are accessed safely, using the proper util methods.

Task-ID 1924666
Closes #32664
2019-05-08 10:35:37 +00:00
wan c1ef82225e [FIX] l10n_be_edi: removing tax duplicate
If the account was not set on the new move line, a onchange added a new tax line leading to a duplicate
Also enforce the company on the tax selection

closes odoo/odoo#33250

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-05-08 11:04:54 +00:00
Christophe Simonis b5684105b1 [FIX] website_sale_comparison: deactive test
The feature is broken in version saas-12.3 and need to be fixed.

(hopefully) deactivate the test temporary.
2019-05-07 18:47:50 +02:00
Christophe Simonis 691bfde022 [FIX] account_check_printing: adapt test
Avoid having vendor bills and supplier refunds in the same payment
batch.
2019-05-07 14:35:12 +02:00
Christophe Simonis 106dffe479 [FIX] board: adapt test to new version
Oversight of previous forward-port.
2019-05-07 11:42:58 +02:00