Commit Graph
135768 Commits
Author SHA1 Message Date
Victor Feyens ba898ddbb7 [IMP] lunch: lunch order model cleanup
closes odoo/odoo#50854

Related: odoo/upgrade#1163
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-07 12:42:05 +00:00
Jigar Vaghela d78d4684cb [ADD] base_vat: add vat validation for india
closes odoo/odoo#48430

Related: odoo/upgrade#997
Related: odoo/enterprise#9500
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-04-30 07:20:07 +00:00
Jigar Vaghela b842af6ce9 [IMP] l10n_in: Improve Demo data 2020-04-30 07:20:07 +00:00
Jigar Vaghela 4774f97e9f [ADD] l10n_in : ADD Reverse Charge Tax
Reverse charge is a mechanism under which the recipient of the goods or services is liable to pay the tax instead of the provider of the goods and services.
2020-04-30 07:20:07 +00:00
Jigar Vaghela 34c631d363 [IMP] l10n_in_purchase: Simplify GST purchase
GST Treatment:
       * Is show that how This purchase is treated in GST
       * Set default value in customer
       * This is help in GST retrun filing.
       * Value of treamtmnet as below
            - Registered Business - Regular
            - Registered Business - Composition
            - Unregistered Business
            - Consumer
            - Overseas
            - Special Economic Zone
            - Deemed Export
       * GSTIN is required in
            - Registered Business - Regular
            - Registered Business - Composition
            - Special Economic Zone
            - Deemed Export
2020-04-30 07:20:06 +00:00
Jigar Vaghela d83763627d [IMP] l10n_in_sale: Simplify GST sale order
GST Treatment:
       * Is show that how This sale order is treated in GST
       * Set default value in customer
       * This is help in GST retrun filing.
       * Value of treamtmnet as below
            - Registered Business - Regular
            - Registered Business - Composition
            - Unregistered Business
            - Consumer
            - Overseas
            - Special Economic Zone
            - Deemed Export
       * GSTIN is required in
            - Registered Business - Regular
            - Registered Business - Composition
            - Special Economic Zone
            - Deemed Export

    Shipping GSTIN:
       * GST identification number or GST number
       * There can be multiple GSTIN for a single person, being an assessee under the Income Tax Act for every State or Union Territory in which such person operates from
       * So When specific invoice and delivery addresses is enabled then user can enter able to enter "Shipping GSTIN" on shipping address of partner
       * Add Validate of this number using regular expression
2020-04-30 07:20:06 +00:00
Jigar Vaghela 205430ffb5 [IMP] l10n_in: Simplify GST invoice
GST Treatment:
   * Is show that how This invoice or partner is treated in GST
   * Set default value in customer
   * This is help in GST retrun filing.
   * Value of treamtmnet as below
	- Registered Business - Regular
	- Registered Business - Composition
	- Unregistered Business
	- Consumer
	- Overseas
	- Special Economic Zone
	- Deemed Export
   * GSTIN is required in
	- Registered Business - Regular
	- Registered Business - Composition
	- Special Economic Zone
	- Deemed Export

GSTIN:
   * GST identification number or GST number
   * There can be multiple GSTIN for a single person, being an assessee under the Income Tax Act for every State or Union Territory in which such person operates from
   * Add Validate of this number using regular expression

remove field l10n_in_export_type and l10n_in_import_export becouse it's covered by GST Treatment
remove field l10n_in_partner_vat becouse not use anyware.
2020-04-30 07:20:06 +00:00
Kevin Baptiste 42c430a539 [IMP] project: add closed stage in project
closes odoo/odoo#46749

Taskid: 2205057
Related: odoo/enterprise#9119
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-08 08:12:51 +00:00
Nicolas Martinelli a9d117178f [FIX] hr_expense: analytic tax
- Enable Include in Analytic Cost in purchase tax P
- Create an expense
- Select product, purchase tax P, set analytic account and tags
- Create report, submit to manager, approve, post journal entries

The tax `account.move.line` does not have the analytic account and tags
assigned.

The information is missing at the tax line creation, so apply the same
logic than:

https://github.com/odoo/odoo/blob/784d22bd005db7825375a97caf9661bd5d463efe/addons/account/models/account_invoice.py#L1055-L1057

opw-2250257

closes odoo/odoo#50879

X-original-commit: ec6fe8cdff7a072a6d44e5a2a40ca0da43254f7d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-07 15:55:33 +00:00
Swapnesh Shah fb8a69706f [IMP] hr_attendance: use correct label in warning
Lable for the field `barcode` is `Badge ID`.

With this commit, We display the correct field name in the Warning.

closes odoo/odoo#50700

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-05 18:25:08 +00:00
Victor Feyens 1639343411 [FIX] doc: confirm attribute isn't supported in list buttons
Closes #37036
Forward-port of #50831

closes odoo/odoo#50872

X-original-commit: 27f67bfcb9033ceffc1f781bc3785113c82d4c9c
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-05-07 14:51:14 +00:00
Jeremy Kersten 541205fbcb [FIX] website: _compute_pricelist_id compute on correct website
Before this fix, in case you try to compute the pricelist_id with another
context, the computed value is set to the website with the new context,
and so another cache.

Now with compute for the env from self, and assign the computed value with the
website with ot without another context.

Before this commit, you was unable to add fields pricelist_id or currency_id in
a tree view.

opw-2233122

closes odoo/odoo#50705

X-original-commit: 2f83c5bad94775a8f85e65c129afdcf503995ecb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-05 18:47:13 +00:00
Laurent Stukkens (LTU) e9230a1e94 [FIX] web: Prevent page reload during sale tour test
* A step has been added to the sale tour in order to ask the user
  to update the company data. As a page reload breaks the tour test
  we need to prevent it in such situation.

TaskID :2187222

closes odoo/odoo#46167

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-07 13:23:07 +00:00
Laurent Stukkens (LTU) 557582e88b [IMP] sale: Improve the onboarding tours
* The first tour is starting in the sale app dashboard and ensures
  the user goes through the needed configuration steps

* The second tour starts in the new Quote form and shows the flow to
  send a quote to a customer

TaskID: 2187222
Closes: #46167
2020-05-07 13:23:07 +00:00
Martin Trigaux 38f5004456 [FIX] doc: escape URL
The ampersand (&) needs to be html encoded to be evaluated correctly

Cherry-picked from odoo/odoo#46526
Courtesy of Olaf
Closes odoo/odoo#46526

closes odoo/odoo#50852

X-original-commit: 28b977d4702cd64290c5e48f39c8df2ad9819483
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-05-07 12:13:02 +00:00
Laurent Smet 1d7b3a8b2f [FIX] account: Fix lost call to action_invoice_paid during reconciliation
Restore the explicit call to action_invoice_paid introduced by:
https://github.com/odoo/odoo/commit/f028a5f410daf6974110f7c341b330f63fdd8885#diff-dd671a54296b170ea1393dca1a5f7798R3779

... probably lost in a bad rebase at:
https://github.com/odoo/odoo/commit/caeb782841fc5a7ad71a196e2c9ee67644ef9074#diff-dd671a54296b170ea1393dca1a5f7798L3955

closes odoo/odoo#50843

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-05-07 11:23:51 +00:00
Antoine Prieels d2b172becd [FIX] hw_drivers: No devices after monitor disconnect
Steps to reproduce:
 - Start the IoT Box with a monitor plugged in
 - Unplug the monitor
 - Restart the Odoo service (i.e. connect the IoT Box to a DB)
 - No devices are detected

The problem came from the fact that `tvservice -l` and `tvservice -n`
have different behaviors when a monitor is disconnected:
 - `tvservice -l` still says that a device is attached
 - `tvservice -n` cannot detect the name of the device so it logs an
error to stderr but still has a return value of 0 so we read an empty
string from stdout.

The `get_connected_displays` function raised an exception because the
format of the returned string was not the one we excepted. The other
loops were then not started and no devices at all were detected.

closes odoo/odoo#50839

X-original-commit: ab6ec2ab6d30a86f9741da4b1986831772004d91
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-05-07 10:50:09 +00:00
Martin Trigaux d8bc0e4811 [FIX] base: remove leftover of transient ACL
Access rights were added on transient models at odoo/odoo#43306
The _filter_access_rules method was still using the old logic of
transient, bypassing access rules

closes odoo/odoo#50828

X-original-commit: 7e0d6f7e0d725a2addb2821c16fce77aed54ca03
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-05-07 09:49:11 +00:00
Aaron Bohy c88d9fc003 [IMP] web: remove _lt from env
Having _lt in the env doesn't make much sense, as it is useless
at run time, and it would incite people to require 'web.env' to
use it (at load time). The env should never be directly imported,
it is automatically propagated from parents to children.

To sum up, in Owl components:
 - when terms have to be translated at run time (e.g. in a function
   called when the user clicks on a button), the env is available
   and env._t must be used
 - when terms have to be translated at load time (e.g. a JS module
   defining a component with a translatable static property), one
   must require 'web.translation' and use function _lt it exports.

closes odoo/odoo#50656

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2020-05-07 07:26:43 +00:00
jvm-odoo 1159dcadbf [FIX] mail: fix "open_attachments" option's attachments not loaded
Issue

	- Install Recruitment
	- Go on any application
	- Add an attachment
	- Go back, refresh
	- Returns on the application

	The attachment box is open but
	the attachments are not loaded.

	You must toggle it again to load them.

Cause

	When opening the box, this.attachments is empty
	so no attachments are shown.

Solution

	Load the attachments if the option is present.
	It will not cause supplementary RPCs thanks
	to "_areAttachmentsLoaded"

OPW-2246116

closes odoo/odoo#50825

X-original-commit: 40cea06301505f0f931b5cfce1da0f05760f8dcc
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-05-07 09:33:52 +00:00
Thibault Delavallée 513c6d18df [FIX] website_slides: allow portal users to udpate their review
Followup of 86c80d341846894c435b1c8f61ef946b06e72ec7 : currently portal users face an access issue
if they change attachments in their review. This commit fixes that by sudo-ing
access to the attachment as other access is already granted.

Task ID 2214795

closes odoo/odoo#50815

X-original-commit: 90152abef30e043d36f8a8aabfe18c46e807973f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-07 09:03:24 +00:00
Thibault Delavallée d0a855985f [FIX] website_slides: allow portal users to read their own reviews with attachment
Followup of 86c80d341846894c435b1c8f61ef946b06e72ec7 : currently portal users face an access issue
if they try to read their full review with attachments. This commit fixes that
by sudo-ing access to the attachment as other access is already granted.

Task ID 2214795

X-original-commit: ad7cd4bd38fdb0d92b22bb979637bb5623621378
2020-05-07 09:03:24 +00:00
Nicolas Lempereur 7252713eac [FIX] website: changing menu sequence clear menu cache
As of 02e01dce51 the website menu is prefetched for the user and saved
in cache.

If the sequence of a menu is changed (eg. with the "Edit Menu" modal on
website), the cache was not cleared so it seemed like this did not work.

With this changeset, changing a menu sequence will clear ormcache.

opw-2244908
closes #50683

closes odoo/odoo#50703

X-original-commit: 8da3276e8b641e615e4c436b4f0f79139d158220
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-05-05 18:45:58 +00:00
Lucas Lefèvre b674e4401d [FIX] resource: Adjust time span to calendar
The method `_get_work_interval` has several problems:

1) The name is not self explanatory in any way

2) It should be defined on the `resource.mixin`

3) It simply does not work (as described in its docstring).
   Here is a simplified example (only concerned about hours):
   Currently, given two attendances: 8-12 and 13-17,
   with parameters start=9 and end=18 it returns (9, 17)
   while it should return (8, 17).

   This leads to strange behaviors in the planning app:
   Given employee A with calendar 8-17 and employee B 8-16.
   Create a planning slot and assign employee A: the start and end times
   are set to 8-17.
   Then assign employee B, the start and end times are correcly set to 8-16.
   Now reassign employee A: the start and end times are not set to 8-17.

Task 2229296

closes odoo/odoo#50804

X-original-commit: 7dfab89bc0025cf6424f00b6992fef1f42463ffe
Related: odoo/enterprise#10426
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2020-05-07 08:22:22 +00:00
Jigar Vaghela 0180510c20 [FIX] l10n_in: payment report wrong date compare
closes odoo/odoo#50779

X-original-commit: 119ebbc727d7d95caa6d8812299bbc53540a59e8
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-06 15:50:07 +00:00
Nicolas Martinelli 8e493f3f3d [FIX] stock_sms: SMS for picking from POS
Avoid sending an SMS for picking created from the POS. We usually don't
want to send an SMS if the customer just bought the product in the
physical shop.

This is more a workaround than a real fix, since the only field that
can be used to distinghish the pickings is the picking type. A better
solution would probably be to set the SMS sending configuration at the
picking type level.

opw-2250185

closes odoo/odoo#50768

X-original-commit: 58492733b81073694a7e2f5e790b31983f91df7d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-06 14:04:37 +00:00
Nasreddin (bon) 04ecbe08b9 [IMP] base: Warning on m2o required field with ondelete set to 'Set NULL'
Since a required field can not be empty: a warning message will
be thrown if a many2one required field has the "on_delete"
attribute set to "Set NULL".

Task ID 2250533

closes odoo/odoo#50751

X-original-commit: 084555c6395b484a85ec9d386fbc8afc8aec1f8c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-06 11:59:31 +00:00
alt-odoo a3049d1300 [FIX] mail: variable not referenced before assignment
In case of generic activity user type, if the referenced field does not exist
in the linked model, we should not raise an UnboundLocalError and use the
current user as a fallback case instead.

closes odoo/odoo#50802

X-original-commit: 554a7cc400b4e1d8cda835e445b152f146bb0003
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-05-07 08:14:16 +00:00
oco-odoo e997bf14b3 [FIX] l10n_ch: fix QR-bill pdf report so that it matches the spec
Using it as a parf of the regular invoice pdf report was wrong, as this report is subject to the margins defined in its paper format; causing issues as for the rendering of the QR report, which must be displayed at a precise location (just like ISR). wkhtmltopdf doesn't allow having different margin values in the same file, so we did just as for ISR, and now generate QR-bill in a distinct pdf.

[IMP] l10n_ch: add receipt part to QR-bill pdf report

closes odoo/odoo#50765

X-original-commit: 99b5306545b945810e8259f2cc447b933d316778
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-05-07 08:18:35 +00:00
David Monjoie 6c05214f90 [FIX] web_editor: fix media dialog when no media selected
closes odoo/odoo#50341

X-original-commit: 9baf753ace725b000eae98cd95e4f5e0aa84466a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-04-28 15:44:31 +00:00
Aurélien Warnon 71e17248a4 [REF] survey: move from onchange to editable stored fields
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

SPECIFICATIONS

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

SURVEY USE CASES

- On survey.question, the question_type field should be emptied if the question
  is a page (is_page = True)
- On survey.survey, if scoring is configured, the minimum scoring success
  should be between 0 and 100 (added SQL constraint).
- On survey.survey, the certification field cannot be True if we're in no
  scoring mode (scoring_type = 'no_scoring')
- On survey.survey, the attempts number cannot be limited (is_attempts_limited
  is False) if the access mode is public and the login is not required.
- On survey.survey, we cannot give a badge (certification_give_badge is False)
  if it's not a certification or if the login is not required.
- On survey.invite, the "subject" and "body" field are based on the template
  used (template_id field).

MISC

- As "validation_email" works with "validation_required", we removed the
  onchange on "validation_email".
- To avoid extra complexity with an onchange on "is_time_limited" and
  "time_limit", we simply default the time_limit field to 10.

LINKS

Upgrade PR odoo/upgrade#847
Task 2187377

closes odoo/odoo#46291

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-06 13:01:08 +00:00
Raphael Collet eb08e2c228 [FIX] core: unexpected cache invalidation when updating one2many
When setting a many2one field, the corresponding one2many fields are
updated in cache.  When such a one2many field has a domain, the
evaluation of the domain may require to fetch some fields from the
database.  If the `towrite` cache has not been updated yet, the many2one
field is overridden by the database value.

Fix by setting the `towrite` cache before updating inverse fields.

closes odoo/odoo#50788

X-original-commit: c1ebfe05a66cfebc7ced36e25db5f6ff4bfb2d46
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-05-06 19:25:17 +00:00
Goffin Simon 864e1ed61d [FIX] sale_stock: Incoterm not displayed on a printed invoice
Steps to reproduce the bug:

- In sales settings, activate incoterms (to be displayed on sales ordres and invoices)
- Create an invoice I with incoterms and print it

Bug:

The incoterms were not displayed.

opw:2247837

closes odoo/odoo#50735

X-original-commit: 9dcabd611b54f361c63e99a6459dbdc2b543faff
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-05-06 10:36:57 +00:00
Christophe Monniez 277aa01112 [FIX] tests: wait for Chrome tab to appear
From time to time (frequently on Mac OS), the Chrome tests are failing
because there is no tab found in the browser instance.

It seems that in some circumstances, the browser is started but the tab
takes some times to appear, for that reason, the tab information is not
available in the first json commands.

With this commit, the json command is issued multiple times with an
increasing delay until the desired key is found in the json answer, or
until the timeout is reached.

closes odoo/odoo#50784

X-original-commit: 4b12643abc6b8ba34f14e468e8d7760bc2db385b
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-05-06 17:18:07 +00:00
fja-odoo c20423313c [FIX] website, *: fix colorpalette custom colors
*: web_editor

Previously the theme body, text, header, headings and footer colors were
not added to the customs colors of other colorpickers if they were
custom. Now it is the case.
Those colors can be set to a theme color but it will be the css color
of the theme color that will be set, not its name.
This can lead to the custom color being a theme color which was not
checked before as it was not possible. Now it is checked.

Also before the theme tab, if the selected color was custom, it would
always appear in the palette and be marked selected. This is no longer
the case with the like of status colors as their color are
not part of the custom colors available on the color palette. Now we add
the selected color as a custom color to always have the selected marked.

task-2198177

closes odoo/odoo#50766

X-original-commit: d631b27b0bf04e708c16262378ab5729252838fe
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-06 13:49:49 +00:00
Victor Feyens e28b9ce4ca [FIX] website_sale: pricelist multi company
When modifying the company_id of a pricelist, the check to ensure
a website has a pricelist available wasn't triggered.

This commit ensures the check is done in this case, to avoid
the absence of any pricelist for a given website (which breaks /shop).

Fixes #50707

closes odoo/odoo#50760

X-original-commit: 911ada2d02b24778435fd9174441a6834da2effa
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-05-06 13:22:11 +00:00
Lucas Lefèvre a65b17659c [FIX] calendar: Remove duplicated timezone field definition
The field `event_tz` is defined twice.

closes odoo/odoo#49778

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-20 10:14:24 +00:00
Lucas Lefèvre e3af2ea39c [FIX] google_calendar: Sync partner with attendee
Create an event with at least one attendee.
Synchronize the event between Odoo and Google.
Add/Remove an attendee in Google.

Observed behavior
-----------------
After synchronisation, the partner is not added/removed in Odoo

Expected behavior
-----------------
The partner should be added/removed

Task 2241572
2020-04-20 10:12:33 +00:00
Kevin Baptiste 430cfa76f5 [IMP] project: hide Archive button on delete wizard
... when all the projects are already archived.

closes odoo/odoo#48728

Taskid: 2228556
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-06 09:16:32 +00:00
Sébastien Mottet (oms) cd9dfc9da4 [IMP] base_setup: some changes in settings display
- Hide statistics section when empty
- Change order of two options in Integrations section
- Change label users to permissions to avoid duplicated label

Task ID: 2214425

closes odoo/odoo#48362

Related: odoo/enterprise#9491
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-06 12:54:39 +00:00
Urvi Soni 33f7a1f9a7 [FIX] hr_timesheet: Hide remaining hours tag on task kanban if allow_timesheet is false
Currently, when the project have the 'allow_timesheet' false even though
it will display the remaning hours tag in task kanban view.
so purpose of the task is hide the 'remaining hours' tag if
allow_timesheet is false.

So after this commit, Hide 'remaining_hours' tag on task kanban view
if allow_timesheet is False.

closes odoo/odoo#50754

Taskid: 2243305
Closes: #50357
X-original-commit: daa75ea5f217010deb4cb5937747f37ab533bcd6
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-06 12:31:07 +00:00
Swapnesh Shah 6054f60d51 [FIX] resource: display hours with float_time widget
closes odoo/odoo#50750

X-original-commit: 1bb0f50bf6a04c93b144d889fe1faecfca949c92
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-06 11:59:12 +00:00
Nicolas Martinelli a4b52411cc [FIX] stock: correct misleading tooltips
The tooltips are incorrect and lead to wrong expectations on the
behavior.

opw-2249152

closes odoo/odoo#50746

X-original-commit: bf1d83dd310983c3f3270bf7a7f5c03128fb0993
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-06 11:17:04 +00:00
Kevin Baptiste 14807da76e [IMP] project: hide 'View Task' in email
Hide the View Task button in the emails sent to a task's followers based
on the project's privacy settings.

closes odoo/odoo#49021

Taskid: 2230189
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-15 10:10:11 +00:00
Nicolas Martinelli 6bc3b30371 [FIX] mrp: Sub BoM
- Create products P1 & P2
- Create a BOM for P1
  Operation O1
- Create a BOM for P2
  Use 1 unit of P1
  Operation O2
- Open the 'Structure & Cost' report for P2

The BOM of P1 is not taken into account in the report.

This happens because a 'Sub BoM' must have the same Operation than the
parent (or no operation set).

There is no real functional reason for this, so we remove the
limitation.

opw-2246370

closes odoo/odoo#50743

X-original-commit: 5d3e88aa919a69ad54076637e72b880552e2a0be
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-06 11:14:35 +00:00
Adrien Horgnies 06c0600ba9 [ADD] l10n_fi: Finnish localization module
Task ID : 35180

closes odoo/odoo#50506

X-original-commit: 651a360881e99534f6ee9f8f14dd732519cbbe44
Related: odoo/enterprise#10324
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-05-05 10:35:05 +00:00
Urvi Soni 8f0f204afa [IMP] hr_timesheet: Remove default groupby from 'My/All Timesheets' menu
Currently, The 'My Timesheets' and 'All Timesheets' action has a
default groupby on project_id and task_id and the timesheet gridview
has the same grouping defined in the view architecture so the default
action grouping therefore only makes sense if we want the other views
of the action to be grouped as well, and we do not want that.

So in this commit we removed  the default_search_groupby* from action
of 'My Timesheets' and 'All Timesheets'.

Also remove the group by filter employee & department from
my timesheet menu.

closes odoo/odoo#49910

Taskid: 2230634
Closes: #49910
Related: odoo/enterprise#9694
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-01 07:10:04 +00:00
std-odoo 0ef207cff9 [FIX] mass_mailing: remove duplicated JS file import
If a user wants to unsubscribe from a mass mailing, he will get a traceback
when doing so. This is due to a file being imported twice. Indeed unsubscribe
file is imported in mass_mailing.layout that calls assets_backend that already
imports unsubscribe.

It seems there is no traceback in 13 but well in 13.2. However we can clean it
in 13. It has been introduced at f296992317 .

Task-2241443

closes odoo/odoo#50722

X-original-commit: 521eb273ce792eb99631fe34faf7d512e3b59a8e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-06 09:17:56 +00:00
Swapnesh Shah c3184e7993 [FIX] hr_attendance: remove unnecessary view modes
Commit 6d11097a9b added view mode `tree,activity` in this action which is not necessary for Attendance Kiosk mode. (and also not working when selecting an employee from `tree` view)

With this commit, we remove extra view modes which are not required/working for this action.

closes odoo/odoo#50528

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-03 17:12:16 +00:00
Andrea Grazioso (agr-odoo) 5e94c70541 [FIX] sale_coupon: fix _remove_invalid_reward_lines check
Create a coupon program with:
- Minimum purchase in currency (ex 100$ tax excluded)
- Fixed discount applied on order (ex 100$)
Generate some coupon.
Go to shop. Fill an order with amount slightly above the minimum
required by the coupon (ex. 125$). Apply the coupon.

Nothing occur to the cart: the coupon is applied correctly,
but when the cart is refreshed it will check for any non-applicable
promotion against the current order state (125$ - 100$ = 25$, since
the coupon check is for orders above 100$ the promotion will be removed).

Fixing the condition in '_get_no_effect_on_threshold_lines' to detect
also coupon lines in order to make the fair computation.

opw-2224169

closes odoo/odoo#50694

X-original-commit: 2f733ba85320dd67c6892f6a56e3680a3b2fbb50
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-05 16:14:07 +00:00