Commit Graph
127612 Commits
Author SHA1 Message Date
Jorge Pinna Puissant 6e1161e2ee [FIX] account: translate invoce line desc
opw-1922531

Before this commit, the product's description for customers was not translated in the
invoice.

Now, the product's description for customers is translated in the invoice.

closes odoo/odoo#30107
2019-01-10 13:35:19 +00:00
qsm-odoo 07e1a24368 [FIX] website: allow to remove jumbotron bg color
In the 'banner' snippet, there is a column using a white jumbotron
component. Those comes with a default background color so when using the
website builder to remove the white background, it did not go away;
it was replaced with the default background color (some gray).

This commit sets the default background color of jumbotron components to
'transparent'.

task-1889341

closes odoo/odoo#30099
2019-01-10 12:37:49 +00:00
Jairo Llopis d76182c582 [FIX] base: prevent cutting app titles in kanban
closes odoo/odoo#28628
2019-01-10 11:32:09 +00:00
qdp-odoo 57856c7536 [FIX] account: reconcilation widget in multi currency
utils.round_precision() is expecting a float as precision (0.01) whereas utils.round_decimals() is expecting the number of digits to consider after the coma (2).

The previous code was totally wrong in that regard, which led to reconciliation wrongly considered as total in foreign currency, as long as the amount_currency difference was lower than the currency precision digits.

closes odoo/odoo#30091
2019-01-10 09:05:46 +00:00
Sébastien Theys c4ee25fb7f [FIX] base,*: add MODULE_UNINSTALL_FLAG to cleanup views
* website_theme_install

This commit will add MODULE_UNINSTALL_FLAG to the cleanup methods of themes and
modules.

This is necessary to also unlink inherited views of those we try to unlink.

Before this commit, an error would be raised when trying to delete a view that
still had other inherited views (either created manually by the user, or with
just bad luck in the order of which the views are deleted).

PR: #29753
2019-01-09 12:54:47 +00:00
Sébastien Theys 2e32cc5aa3 [FIX] base: remove copies of views when removing module
If a module has a view that has been copied (copy on write, web editor,
customize show, manual copy, ...), currently the copied view will not be deleted
if the module of the original view is removed.

If the copy is not used anymore, it is not a problem (but still polluting the
database), but if the copy is still used (ex. it is an inherit of a view still
in use), then it will crash if that copy references other data (views, fields,
...) that were in the module that is now removed.

Eg.

The view `website_sale_comparison.product_add_to_compare` is inheriting
`website_sale.product` and calls `website_sale_comparison.add_to_compare`.

If the view `website_sale_comparison.product_add_to_compare` is copied (when
using the web editor on the product page -> copy on write is making a copy of
the `product` view and all its tree), then the product page on website will
crash when the module `website_sale_comparison` is removed because
`product_add_to_compare` will call the deleted view `add_to_compare`.

The solution is to also remove copied views when removing a module. Instead of
just using the xml id, we should look for the `key` starting with the module
name currently removed, because copied views don't have an external id.

task-1920005
PR: #29753
2019-01-09 12:54:47 +00:00
Sébastien Theys 6b85cbc844 [FIX] website: fix viewref to not raise when raise_if_not_found=False
`ref` could raise even if raise_if_not_found was False on `viewref`, now we
prevent that, and rely only on the exception on `viewref`.

Also, when not set to raise, the method could return None instead of a recorset.

PR: #29753
2019-01-09 12:54:46 +00:00
Sébastien Theys 9ba8dedbf5 [FIX] base,website: make better comments for view helpers
PR: #29753
2019-01-09 12:51:56 +00:00
Sébastien Theys 9918e75b2c [FIX] website_theme_install: remove obsolete comment
This comment is not true, we originally wanted to code it this way but we changed
our mind and forgot to remove the comment.

PR: #29753
2019-01-09 12:51:56 +00:00
Raphael Collet f1df5f352d [FIX] base: make cache tests more specific
closes odoo/odoo#29998
2019-01-08 15:47:55 +00:00
Nicolas Lempereur edcaaba53c [FIX] mail: typo connect notification error
In 12.0 commit f2302dfb2 the method openDmWindow was renamed
openDMChatWindowFromBlankThreadWindow but it called openDmWindow at one
location which caused click on user connection notification to cause an
error instead of opening a chat window.

opw-1910521
closes #30084
2019-01-09 17:20:25 +00:00
Yannick Tivisse 9c5f930ff4 [FIX] l10n_be_hr_payroll: Compute 13th month from wage_with_holidays
closes odoo/odoo#30078
2019-01-09 16:10:38 +00:00
Iryna Vyshnevska 3b14a7daa6 [CLA] signature for i-vyshnevska
closes odoo/odoo#30074
2019-01-09 15:51:25 +00:00
Nicolas Lempereur ed99544dfa [FIX] translate.py: really generate missing terms
With 12.0's (#28297) empty translations were no longer added by default
with the idea that if needed the "Generate Missing Terms" wizard should
be used.

But that wizard itself used what was modified so also did not added
empty translation.

With this changeset, empty translations are added when using the
"Generate Missing Terms" wizard.

fixes #29184
closes #30037
2019-01-09 15:00:43 +00:00
Sébastien Theys 82ea843585 [FIX] base,product,website_sale: default to main company currency
When using multi-company, the base currency of a product is the currency of the
main company, not a contextual company.

closes #29905
closes #29946
closes #30046
2019-01-09 16:19:45 +00:00
Sébastien TheysandWolfgang Taferner e8a01ddc88 [FIX] product,sale,website_sale: fix currency conversion of product
In commit f8dad1bb4b, we tried to fix the currency
conversion of products by always using the currency of the product as the base.
This is still correct.

However, the conversion method also needs to know the company (to find the
correct currency rate), and it was assumed the company was also always set on
the product. This is of course not correct when using multi-company.

In this commit we fix that issue by falling back if no company is set on the
product. The order of the fallback is: product website company, given website
company, given pricelist company, current user company.

closes #29905
closes #29946
closes #30046

Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Wolfgang Taferner <wolfgang.taferner@wt-io-it.at>
2019-01-09 16:19:45 +00:00
Nans Lefebvre 874425c69e [FIX] stock_account: fix default field value in wizard
Default time was set to default=fields.Datetime.now() instead of
default=lambda self: fields.Datetime.now(),
resulting in a discrepancy when printing the report.

opw 1917523
2018-12-28 15:19:15 +01:00
Nicolas Lempereur 222f3166b0 [FIX] account: apply currency on uom change
When creating a new line on a customer invoice, we could get the price
unit in the company currency instead of the invoice currency.

This is because the uom_id onchange would ignore currency when setting
the price.

Changing an invoice line's price unit on uom_id change was introduced
in february 2018 in saas-11.3 with 3a38080ff.

Change to how currency is applied when setting an invoice line's price
unit was introduced in june 2018 in 9.0 with 367fadc8.

So there was a missing part in saas-11.3 to adapt 367fadc8 for 3a38080ff
change that is added with this commit.

Without the fix, the added test failed with:

  AssertionError: 10.0 != 20

opw-1920504
closes #29776
2018-12-28 13:20:52 +00:00
Nicolas Lempereur a6279fe169 [FIX] hr_holidays: demo data error on 31 december
On installation demo data causes an error on 31 december since we test:
 is 31 december at midnight < now() => so after midnight error.

Solve this by comparing today instead of datetime.

opw-29776
closes #29830
2018-12-31 11:31:02 +00:00
Josse Colpaert f5fe1f4064 [IMP] l10n_no: Norway tax update, see #28422
closes odoo/odoo#29852
2018-12-27 10:45:53 +00:00
Romain Derie d73c4e583a [FIX] website_*: prevent record to be unpublished on website change
Before this commit, when changing the website field in a record form view,
the is_published field would be force to false, ending unpublishing the record
if it was published.

That behavior was coming from the fact that is_published field is missing from
the form view. Thus, onchange on website is triggering a recompute server side
without is_published as the JS framework is not sending the field.
The ORM is then fallbacking on default Boolean value (False) for is_published
when sending back the onchange result.

This would only appear on object with 'website.published.multi.mixin' and with
website_id in the form view.

task-1919689

closes odoo/odoo#29707
2018-12-21 13:47:58 +00:00
RomainLibert 8d6bb22298 [FIX] hr_holidays: use a better heuristic when mode != employee
closes odoo/odoo#30082
2019-01-09 15:50:14 +00:00
Pierre Masereel ad40ed029c [FIX] delivery: weight computation without quant
The weight computation was not working anymore on packages that don't
have any quant, because they are fresh ones.

We fix this by setting back the behaviour with the picking id in
context and adapt the function to find the corresponding move lines.

closes odoo/odoo#30071
2019-01-09 12:52:01 +00:00
Nicolas Martinelli a323b86ecb [FIX] l10n_nl: incorrect tax template
Following forward-port.

closes odoo/odoo#30056
2019-01-09 09:28:20 +00:00
Nans Lefebvre 8c5ec851fc [FIX] website: fix menus unlinking
Fine-tuning of commit b48d2b6b5e.
The call to unlink inside the unlink can recurse infinitely
in case there is a copy of a menu.
We replace that direct call by an accumulator so no recursion occurs.

opw 1922448

closes odoo/odoo#30032
2019-01-09 10:29:52 +00:00
Laurent Smet f24d5dd2b6 [FIX] account: Fix missing cancel option in Misc. journal form
Introduced by:
https://github.com/odoo/odoo/commit/73fc643057958edd37e385148dcf22c768e3cc01

-opw: 1921034

closes odoo/odoo#29885
2019-01-03 12:27:56 +00:00
Laurent Smet 57c6dab075 [FIX] account: Fix payment's move_name when cancelling
Create a paiement, post it, cancel it, set it to draft, post it again:
The move_name has been incremented instead of staying the same as before.

-opw: 1919241
2019-01-03 12:19:30 +00:00
Laurent Smet 0600253f22 [IMP] account: Search res.partner.bank without partner in reconciliation
Search bank account without partner to handle the case the res.partner.bank already exists but is set
on a different partner. Without this commit, the error 'An account with the same number already exists'
was raised.
2019-01-03 11:38:31 +00:00
Romain Derie d927dd51bb [FIX] website_sale_delivery: allow to restrict delivery to a website
Before this commit, website_id field would not be added in form view, making it
impossible to set a website on a delivery method and so impossible to restrict
a delivery method to a specific website.

Now, adding this field will be enough as we already search() on
website_published carrier and the delivery.carrier model has the
'website.published.multi.mixin' mixin that will filter accessible website when
searching on website_published field.

+ add missing groups on website_id field
+ remove useless website_published

opw-1918189

closes odoo/odoo#29749
2018-12-26 12:03:42 +00:00
Priyanka KakadiyaandMohammed Shekha ccb2fffc65 [FIX] web: prevent crash in kanban in some cases
Before this commit, if a user tries to group a kanban view by a date or
a datetime interval, then tries to drag and drop a record from one column to
another, then the web client crashes.  This is actually an invalid
operation, and is supposed to be disallowed.  There is already some code
that properly handle the situation.  However, the field attribute was
not properly read in the case of fields of type date/datetime.

Related to Issue: #1911975

Co-authored-by: Mohammed Shekha <msh@openerp.com>

closes odoo/odoo#30029
2019-01-09 09:13:59 +00:00
Nicolas Martinelli 6be112ac2c [I18N] website: export missing translations
Following https://github.com/odoo/odoo/commit/7f8631a913de7aebb9b954

opw-1908220

closes odoo/odoo#30060
2019-01-09 09:51:52 +00:00
Xavier Morel 1e9ed52052 [FIX] mail, sale: indentation & spacing in docstrings
rST is somewhat unforgiving when it comes to whitespace. The extra
indentation on list would generate (nested) blockquotes instead of
just paragraphs & list items, and the missing empty lines would make
rST parse the entire block as a single paragraph rather than a
paragraph followed by a list.

closes odoo/odoo#30058
2019-01-09 09:16:02 +00:00
Xavier Morel 00fb73fa22 [FIX] barcodes: JS documenter fails to infer BarcodeEvents
As a result, parsing the JS fails and so does the doc compilation.

Fixes odoo/odoo#29197
Fixes odoo/odoo#29961

closes odoo/odoo#30057
2019-01-09 09:02:21 +00:00
Nicolas Martinelli 07befd19a7 [FIX] web: make pie chart title translatable
The Pie Chart title is not translatable, since a string defined in a
`t-att-` cannot be translated.

We use the attribute `title` instead.

Tests are adapted in https://github.com/odoo/enterprise/pull/3379

opw-1908220

closes odoo/odoo#29991
2019-01-09 08:28:08 +00:00
Nicolas Martinelli 69f6b9510d [FIX] web: decimal separator of percentage
When a percentage if formatted, the decimal separator used is always
`.`, while it should be the decimal separator of the language.

opw-1908220

closes odoo/odoo#30030
2019-01-09 08:07:56 +00:00
Nicolas Martinelli e95b4e9594 [FIX] web: graph view translation
The control labels 'Grouped' and 'Stacked' are not translated since they
are default values from nvd3.

opw-1908220

closes odoo/odoo#29975
2019-01-08 13:43:43 +00:00
Jorge Pinna Puissant 5995680542 [FIX] hr_holidays: validation_type same behavior
opw-1919744

Before this commit, the user in the leave_type had the choice between
three validations : 'hr', 'manager' and 'both'. The behaviour of the
application was exactly the same if 'hr' or 'manager' was chosen.

In this commit, a computed field was added only to hide this choice,
and restrict the user to choice between the 'double validation'
or the normal validation.

This commit must be reverted once the fonctional part is implemented.

closes odoo/odoo#29952
2019-01-09 07:28:21 +00:00
Jorge Pinna Puissant 171d1e7bc3 [FIX] web_editor: Media dialog next btn reload page
opw-1910505

Before this commit, the next button in the media dialog widget reloaded
the page and opened only the iframe of the widget.

Now, the button only update the media dialog widget.

closes odoo/odoo#29981
2019-01-09 07:29:22 +00:00
Veikko Väätäjä 270171752f [FIX] doc: fix numbered list in guidelines
Fix rst-formating for numbered list under heading "Inherited XML".

closes odoo/odoo#30043
2019-01-08 16:49:10 +00:00
Nicolas Martinelli d0d8b7b4de [FIX] mrp: BoM Structure report
Send the context for proper translation of the report.

opw-1908220

closes odoo/odoo#30038
2019-01-08 14:37:02 +00:00
Martin Trigaux 91882dd972 [FIX] base: delete linked record only if last external id
In case a record is no longer referenced in the updated module, its external id
is deleted.
If the linked record still exists, it is deleted as well.

This last clause was incorrect as the record may still be referenced in other
modules.

If a field is declared in module A

class FooA(models.Model):
    _name = 'foo'
    bar = fields.Char()

and overriden in module B

class FooB(models.Model:
    _inherit = 'foo'
    bar = fields.Char(translate=True)

In case the field is no longer inherited in module B (code change, moved to
another module,...), the ir.model.field record for bar was deleted.

Two external ids are linked to field bar:
A.field_foo__bar
B.field_foo__bar

The ir.model.field record should be dropped only if both ir.model.data entries
are no longer loaded.
Otherwise, only the ir.model.data entry should be deleted (i.e. B.field_foo__bar
in the above example).

Fixes odoo/odoo#29820

closes odoo/odoo#30018
2019-01-08 15:21:27 +00:00
张志亮 8322c7c731 [CLA] alexcn signs cla
closes odoo/odoo#30010
2019-01-08 14:45:02 +00:00
Christophe Simonis 3e4138deaa [MERGE] forward port branch saas-11.3 up to 2d824a5b7a 2019-01-08 17:08:48 +01:00
Nicolas Martinelli 232675c49b [FIX] stock: translation of Traceability Report
opw-1908220

closes odoo/odoo#30012
2019-01-08 13:45:24 +00:00
Julien (juc) Castiaux e02a05a724 [FIX] web_editor: left/right/center image for mail
When creating a banner using the web editor, the targeted image
appears centered in the editor but is aligned on the left in the
email.

The issue also happened with other alignment (left in a centered
widget, right, ...) for example on outlook 2007 and should be solved
with this changeset.

note: 12.0 version of #29214

opw-1904827
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
closes #29954
2019-01-08 11:53:32 +00:00
Romain Derie fd80cf9e53 [FIX] portal: dont override list-group-item BS4 active color (white)
Before this commit, BS4 color for active list-group-item (white) would always
be overriden by our portal custom css to the BS4 color for inactive one.

Part of #29884
2019-01-08 12:50:24 +00:00
Romain Derie d3a7edaec4 [FIX] web, website: set correct order on modal footer button
Since 12.0, some modal footer button order were changed. The primary button
would not be the one in the modal footer corner.

This is against bootstrap but more annoyingly, users are intuitively clicking
on the secondary button, ending up closing the modal and losing form
information they entered.

This commit simply fix the regression from 12.0 as before 12.0 these buttons
were positionned correctly.

Note that a commit in master (saas-12.2) will fix all the other ones that were
wrongly positionned before 12.0.

Step to reproduce:
  - Go to an event having the possibility to register.
  - Click on 'Register Now', a modal is shown to write details (name, email..)
  - You intuitively click on 'Cancel' as it is the bottom right button
    |________________________________ CONFIRM _ CANCEL _|
  - The modal is closed, if you try to open it again your infos are lost

Closes #29884
task-1922120
2019-01-08 12:50:24 +00:00
Antoine Prieels 2299d2563b [FIX] snailmail: Remove class on recipient's address
Layouts were not accepted by Pingen due to the fact that the class that we added to the recipient's address was not present in stable versions.
The format was therefore not adapted to Pingen.
We then remove this class to fix layouts in stable versions.

closes odoo/odoo#29976
2019-01-07 09:25:51 +00:00
Christophe Monniez 6366c24499 [FIX] test_main_flows: open operations menu in enterprise only
In community, when entering the Manufacturing app, the first view is the
Manufacturing orders list view as it's not the case in enterpise, the
two steps are only necessary in enterprise.

Note: even if it fix the tour, the main bug could still be there.

closes odoo/odoo#30016
2019-01-08 08:47:53 +00:00
Odoo Translation Bot 652cecffde [I18N] Update translation terms from Transifex 2019-01-06 01:32:05 +01:00