Commit Graph
126256 Commits
Author SHA1 Message Date
Lucas Perais (lpe) 6aad8b2691 [FIX] l10n_fr_fec: dom-tom excluded from EU's fiscal territory
Sources:
https://www.service-public.fr/professionnels-entreprises/vosdroits/F23570
http://www.douane.gouv.fr/articles/a11024-tva-dans-les-dom

This commit allows a Dom-Tom based company to export the FEC file out
without needing to have a normalized French TVA set on the company

OPW 1946623

closes odoo/odoo#31543

Signed-off-by: "Lucas Perais (lpe)" <lpe@odoo.com>
2019-03-04 13:53:50 +00:00
Lucas Perais (lpe) 5dfb6e39af [FIX] l10n_fr_fec: no new line at the end of file
It seems that our beloved administration is not happy with the FEC file
ending with an empty new line

Hence, this commit makes the FEC file last line end without \r\n characters
and there is no empty new line

OPW 1943302
2019-03-04 13:53:48 +00:00
Christophe Simonis 1693a27f28 [FIX] account: mute logger on expected Exception in test 2019-03-04 17:09:21 +01:00
Christophe Simonis c3764265de [FIX] base: mute logger for expected Exceptions in tests 2019-03-04 16:33:38 +01:00
Christophe Simonis 1c712986c4 [MERGE] forward port branch saas-15 up to 1f1fa35c07 2019-03-04 15:49:35 +01:00
Christophe Simonis 1f1fa35c07 [MERGE] forward port branch saas-14 up to 232da9a0ec 2019-03-04 13:40:44 +01:00
Christophe Simonis 232da9a0ec [MERGE] forward port branch 10.0 up to 0f0c5db49d 2019-03-04 12:02:31 +01:00
Julien Legros 0f0c5db49d [FIX] base: fix parse_version import 2019-03-04 11:24:18 +01:00
Romain Estievenart ab90dfd6c3 [FIX] portal: Remove non compliant ES5 syntax
Currently Odoo JavaScript code base support only ecmascript <= 5

So using a non compliant ES5 syntax can trigger a javascript engines
crash for some browsers like: IE, webview used by some old mobile
devices.

This commit fixes non compliant JS code syntax found to avoid potential
crash.

closes odoo/odoo#31522

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-01 13:56:05 +00:00
Romain Estievenart 9950c38ec3 [FIX] hr_skills: Remove non compliant ES5 syntax
Currently Odoo JavaScript code base support only ecmascript <= 5

So using a non compliant ES5 syntax can trigger a javascript engines
crash for some browsers like: IE, webview used by some old mobile
devices.

This commit fixes non compliant JS code syntax found to avoid potential
crash.
2019-03-01 13:56:05 +00:00
Thibault Delavallée 62d0eee644 [FIX] website_slides_forum: put demo in demo
Otherwise zizisse error traceback prone.

closes odoo/odoo#31672

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-07 15:33:37 +00:00
mgh-odoo f217aa528f [FIX]web_editor: Fixed traceback due to 'field_html' widget while saving record
Previously, when user edited record having 'field_html' widget and
tried to save the record immediately, a traceback was faced sometimes
because content was not loaded yet. This commit fixes the issue
by calling super method if the content is not loaded yet properly.

Task: #1932687
Closes: #30833

closes odoo/odoo#31581

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-05 09:09:33 +00:00
jem-odoo 3393dd0030 [REF] website_slides: redesign quiz widget
This commit makes the quiz widget a real odoo widget that triggers up some
events. The widget is now only responsible of

 * fetching quiz data (if not given)
 * decorating the anwsers according to the result
 * displaying message (error or modal)

To do so, some code move/rewrite was needed

 * extract and factorize some template
 * add 'sudo' on technical model to avoid access rights error
 * factorize some python method from controller to model
 * remove some CSS classes to lighten the code
 * fixing access model error
 * make quiz widget handle the display of error message
 * give browse record for template rendering, rather than slug
 * cleaning some spaghetti code in Fullscreen widget
 * ...

Commit linked to task ID 1941250 and PR #31584.

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-07 09:41:43 +00:00
David Beguin f029bf71d0 [IMP] website_slides_forum : allow to create a forum and to comment on course frontend creation
When creating a course via the frontend, the behaviour with forum and comment
should be the same than from backend. The website_publisher can decide to
create or not a forum linked to this course and decide independantely to allow
the review and comment on that course.

Commit linked to task ID 1941250 and PR #31584.
2019-03-07 09:42:03 +00:00
Thibault Delavallée 47b308d8ae [FIX] website_slides: correctly return deferred when calling slide routes in fullscreen
I promise to fix all deferred. Huk huk huk.

Commit linked to task ID 1941250 and PR #31584.
2019-03-07 09:41:43 +00:00
Robot Odoo 10469b81f6 [MERGE] website_slides: clean controllers and apply various fixes
Purpose of this merge is to perform some code cleaning in eLearning
controllers and demo data. There are also some fixes coming from first
user testing of eLearning. See sub commits for more details.

Merge linked to task ID 1941250 ("fix all the eLearning").

closes odoo/odoo#31512

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-06 16:58:30 +01:00
David Beguin 6aedd56c40 [FIX] website_slides_forum : fix elearning navbar style in forum
Since design refactoring from af41382fa1, eLearning navbar style
was not displayed correctly. This commit fixes this by applying same design
rules as user profile page navbar.

Task ID : 1941250
PR #31512
2019-03-06 14:09:16 +00:00
David Beguin 1949c796b5 [FIX] gamification, website_profile : re-fix division by zero if user has no karma
If a new user try to access the elearning platform or his porfile, if he has
no karma, has it is the case for new users, he won't get any rank. So that
the next rank karma minus current rank karma equals zero.

To avoid this, next_rank will always be first one existing if the user has no
karma. Also, the current rank will not be displayed if the user has no karma.
finally, next rank will not be displayed if the user reached the last existing
rank.

Task ID : 1941250
PR #31512
2019-03-06 14:08:24 +00:00
David Beguin c7cceaef79 [FIX] website_profile : hide badge if not website_published on user's profile page
Badges that should be displayed on user's profile page must be website
published. Badges that are website_published are typically forum badges or
others that will be configured for eLearning.

Task ID : 1941250
PR #31512
2019-03-06 14:06:27 +00:00
Thibault Delavallée 31d9bbd904 [FIX] website_slides: add gray background to lesson not fullscreen display
Simple fix to already have the standard gray background. Future commits will
improve display of not fullscreen lessons but this fix was necessary for
incoming work.

Commit linked to task ID 1941250 and PR #31512.
2019-03-06 14:03:17 +00:00
Thibault Delavallée 9e7c5537d2 [FIX] website_slides: fix set viewed slide
Currently a slide that can be previewed is never set as completed. Correct
condition to not update the hard slide-partner relationship is:

 * either current user is public;
 * either current slide is not published (happens when a publisher sees still
   unpublished lessons);
 * either current user is not member of slide channel (happens when seeing a
  free preview slide without being channel member);

Commit linked to task ID 1941250 and PR #31512.
2019-03-06 14:03:17 +00:00
Thibault Delavallée 3bdccc0867 [FIX] website_slides: latest courses should display all my courses
Correctly fetch courses the current user is a member of, not those he already
finished at least a lesson.

Commit linked to task ID 1941250 and PR #31512.
2019-03-06 14:03:17 +00:00
Thibault Delavallée 711a48aaa8 [REF] website_slides: clean slide fetch details method and controller
Currently there is a tool method on controller allowing to prepare some
slide related data. However controllers still add values in the slide
dictionary outside of this method, making it non consistent.

Let us prepare all side related data in this tool method to simplify code
understanding.

Commit linked to task ID 1941250 and PR #31512.
2019-03-06 14:03:17 +00:00
Thibault Delavallée 181e6487ef [IMP] website_slides: reorder controller code to ease understanding
Purpose is to order methods and routes according to the main related model.
Main routes are above, then tools (sub routes, json routes).

Commit linked to task ID 1941250 and PR #31512.
2019-03-06 14:03:17 +00:00
Thibault Delavallée 813943c8bc [IMP] website_slides: improve demo related to quizzes
Purpose is to have a bit more demo data allowing to test quizzes and see
how they behave. Notably

 * have more than one question in existing quizzes to check answer validation
   more in-depth;
 * have more than 2 answers to check answer highlighting more in-depth;
 * clean a bit user related demo for channels and slides;

Commit linked to task ID 1941250 and PR #31512.
2019-03-06 14:03:16 +00:00
Antoine Guenet 0374ecaeb8 [FIX] web_editor: properly set media dialog onlyImages and find video
Media dialog was trying to reach the current media's parent node, which
was not possible as it was cloned on instantiation.
To fix this, the `showImageDialog` now passes the `onlyImages` option
upon instantiation, checking the parent's data. It also passes the
media's parent if said parent is a video. This way, neither of these two
things need to be done in media dialog.

closes odoo/odoo#31634

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-03-06 12:51:41 +00:00
Lucas Perais (lpe) f5813975d3 [FIX] account: reconciliation proposition div by 0
In some cases when computing reconciliation propositions against
reconciliation models, there may be case where we try to divide by 0

This commit handles the case

OPW 1946266

closes odoo/odoo#31534

Signed-off-by: "Lucas Perais (lpe)" <lpe@odoo.com>
2019-03-01 13:01:23 +00:00
Odoo Translation Bot 42469048d8 [I18N] Update translation terms from Transifex 2019-03-03 06:02:06 +01:00
Lucas Lefèvre 221caccb70 [FIX] hr_holidays: Group team leader imply group user
Currently, group Team Leader does not imply group user.
However a team leader is always a user and should be member of
the corresponding group.

closes odoo/odoo#31539
2019-03-01 15:05:22 +00:00
Lucas Lefèvre a8ab3063e8 [FIX] hr_holidays: Allow Team leader to approve
Currently, a Team leader can't approve a leave of an employee
in his team if the leave type requires an allocation.

The reason is the `ir.rule` for `base.group_user` restricting allocation
read access to only your own allocation (`[('employee_id.user_id', '=', user.id)]`)
There are no `ir.rule` for group Team leader.
Therefore, a team leader can't read allocations for his team members.

Fix: add an `ir.rule` to allow a team leader to read allocations
of employees in his team.

+ add associated tests
2019-03-01 14:30:39 +00:00
XavierDo a95756faac [FIX] bus: gc event at the end of a polling
When making a poll, an event is registered on each channel. Once
a notification is sent on a channel, only the events of the
notified channel are removed. A pointer to the event is kept
in all other channel the user subscribes to until those channel
are notified.

Since a user usually has many mail.channels but only a few active ones,
a new event and a bunch of pointers are created at each poll and
never removed.

This fix simply remove the pointers to the current event at the
end of a poll.

closes odoo/odoo#31215

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-02-28 15:49:04 +00:00
Goffin Simon 6edd699ee9 [FIX] account_check_printing: Error when clearing the currency
Steps to reproduce the bug:
- Activate multi currencies on your user
- Let's consider currency A and currency B and currency A is the one set on your company
- Create a customer invoice I with currency B
- Go on the tree view of customer invoices and select I
- Click on "Action" and select "Generate an invoice"
- On the wizard, clear the currency B

Bug: A traceback was raised because the function amount_to_text requires a currency.

opw:1958888

closes odoo/odoo#32202

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-03-28 10:45:12 +00:00
Goffin Simon 72932d7956 [FIX] mrp: Printing a BOM with a variant
Steps to reproduce the bug:
- Create a BOM for product P
- Generate variants for P: P1 and P2
- Go to BOM of P and click on Structure & Cost
- Change the current variant to P2
- Click on "Print"

Bug:

A traceback was raised because the function _get_bom expects in arguments that
product_id is an id and not a recordset.

opw:1950401

closes odoo/odoo#32128

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-03-26 12:46:02 +00:00
Nicolas Martinelli 06cd3e5510 [FIX] account: invoices and bills filtering
- Create a new Sale journal
- From the accounting dashboard, click on the name of the journal
  created

Invoices from all sale journals are shown.

The filtering performed is not sufficient: it should filter by journal.

opw-1958446

closes odoo/odoo#32166

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-27 14:15:00 +00:00
Nicolas Lempereur b2b395467f [FIX] delivery: picking weight not updated sometime
The delivery lines (move_lines) have two way to be displayed in a view:

- with move_lines (all move line of a stock.picking)
- with move_ids_without_package (same but removing packages)

But so if we write directly on move_ids_without_package we would not
trigger the stock.picking @api.depends('move_lines') _cal_weight method
thus the picking weight was not updated in some instances.

With this changeset, we adds the move_ids_without_package as depends so
on move_ids_without_package onchange the total weight should be set to
the correct weight or 0 (if move_lines is not in the view) and on write
the correct weight should be computed.

opw-1959523
closes #32157

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-27 11:43:51 +00:00
Julien CastiauxandNans Lefevre e2e27b41ad [FIX] sale: subtotal computation and display
Steps to reproduce:
- Install Accounting and Sale
- Enable the developer mode.
- Go to Settings > Users & Comp > Your user, edit to check both "Tax
Display B2B" and "Tax Display B2C" boxes.
- Go to Settings > General Settings > Accounting > Reporting, check the
"Add totals below sections" box.
- Create a sale order in the sale module, the sale order must have at
least one section with several products.
- Print the sale order. The subtotal amounts are wrong.

There are two different subtotals amount to compute, one for the
*Amount* column and one for the *Total Price*. The actual computation
did not store the two amount in different variables. Multiple template
are broken in the same way.

Fine tunning of 716ff76

Co-authored-by: Nans Lefevre <len@odoo.com>

opw-1950833

closes odoo/odoo#32148

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-27 13:16:56 +00:00
Jorge Pinna Puissant 9a8859cc92 [FIX] account: write off with same account as the move lines
Having two move lines to reconcile.
The debit one with a past date.
The credit one with a future date.
Have a write-off in the same account as the move lines.

Before this commit, the function that creates the write-off move lines
(_create_writeoff) returns two move lines (the write-off move line itself
and the balance move line) normally only the balance move line should be
returned. Because of this, the reconciliation is not done correctly:
the credit move line is reconciled with the write-off and the balance
line. And the debit move line is not reconciled.

Now, the function _create_writeoff returns only the balance line so the
debit move line, the credit move line and the balance line are totally
reconciled.

opw-1924973

closes odoo/odoo#32055

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-03-25 08:49:07 +00:00
Nicolas Martinelli b1ed7b4637 [FIX] repair: product change
Make sure to trigger price computation even when the UoM doesn't change.

closes odoo/odoo#32139

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-27 07:16:25 +00:00
Jorge Pinna Puissant e9c7fc0d93 [FIX] base: split _get_rendering_context to allow different models
Allowing to override the _get_rendering_context and call the new
function (_get_rendreing_context_model) with a different custom model
to render the html.

opw-1946792

closes odoo/odoo#32101

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-03-25 14:44:27 +00:00
Yenthe666 8527c5adab [FIX] l10n_nl: set correct VAT codes on fiscal position lines
Before this PR quite a lot of the lines on the fiscal positions
"EU landen", "Niet-EU landen" and "Installatie en Afstandsverkopen"
where mapped wrong, some of the lines even referred to another
tax percentage.

Changes:
- The tax "BTW te vorderen laag (inkopen) 9%" on the product
mapped to the tax to apply named "Inkopen import buiten EU laag 6%",
which should be "Inkopen import buiten EU laag 9%" to correctly
counterpart the taxes. All the other changes where similar,
either invalid tax rates where applied or it mapped to a wrong category.
- "Verkopen/omzet overig diensten" on the product would map to
"Installatie/afstandsverkopen buiten EU" as the VAT to apply.
This should map to "Verkopen export buiten EU".
- Added 3 accounts for Omzet NL handelsgoederen 1,
Omzet NL handelsgoederen 2 and Omzet NL handelsgoederen 3
- Mapped the 3 accounts to the fiscal position
"Installatie en Afstandsverkopen" their relevant lines.
- Removed purchase taxes from fiscal position "Installatie en Afstandsverkopen" .
- Mapped the right taxes to the three fiscal positions their VAT tabels.
- Updated .pot file to add the three extra accounts.

Closes #31403

closes odoo/odoo#32130

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 13:26:37 +00:00
Nans Lefebvre 0a4e67c609 [FIX] account: only put internal users as followers of vendor bills created by emails
When the pdf of a vendor bill is sent to the alias of a journal,
all the partners that match one of the email address present in the mail thread
are added as followers of the newly created record.
This is a problem since the vendors are actually not concerned by the internal
work that is done, only internal users are.
As a result they get spammed by useless emails, and complain to Christine.
It was put in commit a4df9f8c93 despite not appearing in the task description.

We filter the partners to only keep the ones that belong to internal users.

opw 1958729

closes odoo/odoo#32110

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-26 13:30:31 +00:00
Nicolas Martinelli a80126a12a [FIX] repair: price and UoM
- Activate multiple UoM
- Create a Repair Order
- Add a repair line ('Parts') of type 'Add', change the UoM
  => the unit price is not modified
- Add a repair fee ('Operations'), change the UoM
  => the unit price is not modified

The UoM is never taken into account.

opw-1953752

closes odoo/odoo#32127

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 12:38:04 +00:00
Tomas Alvarez 0215b6f682 [FIX] website_sale: use sudo to check pricelist code to avoid field groups check
closes odoo/odoo#32111

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 03:53:59 +00:00
Nicolas Martinelli 322a964a39 [FIX] purchase: onchange at create
When creating an invoice programmatically, make sure to retrieve the
`currency_id` field set by `_onchange_partner_id`.

opw-1951314

closes odoo/odoo#32097

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 13:26:41 +00:00
Nicolas Martinelli 5eb4065486 [IMP] account: onchange at create
Make the onchange calls at invoice creation deterministic and
extendable.

opw-1951314
2019-03-25 13:16:14 +00:00
Jorge Pinna Puissant d8b45d24aa [FIX] account,payment: instant payment post process
Fine-tuning of commit dd8494313f

closes odoo/odoo#32124

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-03-26 11:10:52 +00:00
Goffin Simon 660cd529ad [FIX] product: Issues with product configurator with single attribute values
When creating several attribute lines for the same attribute, the function _update_product_template_attribute_values
in model 'product.template.attribute.line' only kept the product.template.attribute.value records of the last
created line. So it generated issues with the product configurator because no value was founded for certain attribute line
in function _get_possible_combinations defined in model 'product.template'.

Now it's forbidden to create several attribute lines for the same attribute.

opw:1950786

closes odoo/odoo#32086

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-03-26 10:45:28 +00:00
Nicolas Martinelli f5e99060b6 [FIX] stock: discard scrap
- Process a WO (e.g. 'Manual Assembly' from the demo data)
- Create a scrap for component 'Drawer Black'
- A new wizard appears:
  'The product XXX is not available in sufficient quantity'
- Click on 'Discard'

A scrap is created in draft, but it cannot be canceled.

The scrap shouldn't have been created in a first place, but this cannot
be changed in stable. Therefore, we delete it.

opw-1946254

closes odoo/odoo#32122

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 09:32:43 +00:00
Lucas Perais (lpe) 80b900ee57 [FIX] account: reconciliation matching rule div by zero
Do a MISC operation representing a payment
revert it

Do a statement line for that amount

Click on "reconcile" on the bank journal

Before this commit there was a Division By Zero traceback
This was because the bank account line had a zero amount_residual
due to its reversion
while the statement line was negative.

After this commit, for liquidity lines, we take the total amount instead of the residual
Because a reverted payment line can always be associated with a statement

OPW 1947362
courtesy of @smetl (las@odoo.com) for the fix

closes odoo/odoo#32105

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-03-26 08:35:51 +00:00
Nicolas Martinelli b8950ab49a [FIX] purchase: currency of supplierinfo
Set the currency of the supplier info according to the currency set on
the partner.

opw-1951314

closes odoo/odoo#32098

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 08:02:29 +00:00