Commit Graph
127612 Commits
Author SHA1 Message Date
Lucas Perais (lpe) d798c27f27 [FIX] mail: no autofocus when spawning a livechat window
Have a user A having the focus on the search bar, minding his own business

Have a user B send a direct message to user A

Before this commit, the chat window on user A's browser took the focus manu militari

After this commit, the focus stays on user A's search bar

OPW 1911553

closes odoo/odoo#28915
2018-11-22 10:11:56 +00:00
lul-odoo 6cfa158b4d [FIX] point_of_sale: Update dead link to POSBox doc
The link pointing to the hardware setup for PoS redirected to the POSBox doc which no longer exists in 12.0.
Therefore the response was a 404.
Now the link redirects to the IoT doc for using the box with PoS.

Btw, this new doc seems less complete than the previous one.

closes odoo/odoo#28944
2018-11-22 09:57:40 +00:00
Parth Choksi c13298fdac [FIX] sale: display right quantity in sales by channel report
By this commit, in sales by channel report of product page we are able to show the quanity of product which is just in 'sale' and 'done' state.

Before this commit, the quantity of product included every state except 'cancel'.

This commit is related to issue: #27643

closes odoo/odoo#28948

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2018-11-22 09:44:21 +00:00
Nicolas Martinelli 3303f87102 [FIX] account: reconciliation multi-company
- Create 2 companies C1 and C2
- Do not share partners between companies
- Create a partner P1 in C1:
Name: PartnerA
AccountNumber: 1234
- Create a partner P2 in C2:
Name: PartnerA
AccountNumber: 1234
- Create an invoice in C2 for P2, validate and pay
- Add the fields `account_number` and `partner_name` to the bank
statement lines for convenience.
- Create a bank statement with a line:
Partner Name: PartnerA
Account Number: 1234
- Run the following query (on which no record rule is applied for bank
statement reconciliation):

```sql
SELECT
st_line.id                          AS id,
COALESCE(p1.id,p2.id,p3.id)         AS partner_id,
p1.id AS p1,
p2.id AS p2,
p3.id AS p3
FROM account_bank_statement_line st_line
LEFT JOIN res_partner_bank bank ON bank.id = st_line.bank_account_id OR bank.acc_number = st_line.account_number
LEFT JOIN res_partner p1 ON st_line.partner_id=p1.id
LEFT JOIN res_partner p2 ON bank.partner_id=p2.id
LEFT JOIN res_partner p3 ON p3.name ILIKE st_line.partner_name
WHERE st_line.id IN (XX);
```

The result is:

|       id |   partner_id|      p1|    p2|    p3|
|----------|-------------|--------|------|------|
|        XX|           P1|    null|    P1|    P1|
|        XX|           P2|    null|    P2|    P1|

P1 should not appear in any of the results. In some configuration, P1
will be selected for matching and will trigger an access error.

Commit 1fc0b08e14 introduced the record
rules for `p3`, but was wrongly set at the end of the query. We
introduce the rules for `p3` as well as `bank`, so the result is now:

|       id |   partner_id|      p1|    p2|    p3|
|----------|-------------|--------|------|------|
|        XX|           P2|    null|    P2|  null|

Which is the expected result.

Fixes #32954
opw-1974649

closes odoo/odoo#33245

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-09 07:19:15 +00:00
Christophe Monniez babef9ecfc [FIX] web: add a small delay before starting clickEverywhere
When the clickEverywhere js test is started with base only, the
web client opens the first app by default (see openFirstApp call in
web_client.js). Unfortunately, the test clicks immediately on the apps
menu and the client does not invalidate openFirstApp.
Then, when trying to click on a filter, it does not exists anymore and
leads to a timeout.

The present timeout should solve the problem without refactoring the web
client.

closes odoo/odoo#33339

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-05-13 13:58:55 +00:00
Christophe Monniez de4278c676 [FIX] server: use SIGXCPU on supported platform only
When Odoo is stopped using CTRL+C on Windows, a Traceback is thrown
because the SIGXCPU signal does not exists on Windows.

With this commit, the check for SIGXCPU only occurs on supported
platforms.

Fixes #33311

closes odoo/odoo#33333

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-05-13 12:39:15 +00:00
Johan Demaret Rivarola d273bdfed7 [FIX] survey: unregistered tour
This commit aims to make unit tests pass when creating a new database
with only 'survey' installed.

The tour 'test_survey' was not loaded before reaching /survey/start,
causing tests to fail.

The js asset is now loaded within web.assets_common because the tour
should also work with the 'public' user. For this reason,
'web.assets_backend' is not a good fit.

Widget 'root.widget' was undefined too. Appropriate js file is now
loaded.

Closes #33330

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-05-13 12:25:22 +00:00
Denis Ledoux 611eea839c [FIX] website: don't change public user of website when saving general settings
Before this revision, the public user of your website could be changed
upon saving the general settings if you added users in the public group.

Case:
- Install website
- Add a user in the "public" group,
with a login sorted alphabetically before "public", let's say "1public"
- Open the general settings and save directly
- Notice the public user of the website has been changed to "1public",
and it did not keep "public", while you haven't changed anything
in the settings.

That said, the current heuristic to find the public user of a company
might not be the best, as you could automatically find users in the group
public that you would not like to use as the public user of your website.

In master, maybe a field `public_user_id` could be added on
`res.company`, and the `user_id` of the website could become
a related of the company public user.
In addition, when `_get_public_user` creates a new public user,
it could link it to the company in `public_user_id` field.

closes odoo/odoo#33332

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-05-13 12:25:56 +00:00
Goffin Simon 2368949959 [FIX] mrp_byproduct: Impossible to process a work order
Steps to reproduce the bug:

- Create two storable products A and B
- Create a BOM for A with B as component and A as by product
- Set this BOM as "To manufacture"
- Create a MO for A and try to process it

Bug:

Ensure one error was raised by function check_finished_move_lots defined in module mrp
because the variable produce_move must be one record.

Now, it's not possible to create a MO for A if A has a BOM with A as by product.

opw:1974863

closes odoo/odoo#33280

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-05-13 06:23:12 +00:00
Jorge Pinna Puissant d4317a67d1 [FIX] crm: default probability in crm lead
When creating a new crm lead from the kanban view, using the quick add
button, the default probability is the one of the first stage, and not
the one of the selected stage.

Now, the default probability is the one of the selected stage.

opw-1986047

closes odoo/odoo#33267

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-05-08 13:56:08 +00:00
Odoo Translation Bot 232a7283a5 [I18N] Update translation terms from Transifex 2019-05-12 01:34:58 +02:00
Antoine Prieels 2a99a28004 [FIX] point_of_sale: Taxes absent from sale detail
Since the changes introduced in cdcdebc6cb,
the tax amounts were not showing in the Sale Details Report.

closes odoo/odoo#33007

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-04-29 12:33:10 +00:00
Julien Castiaux 538f99ccce [FIX] web_editor: restoreRange on invalid node
In a web editor, add some text, select the text, add a link and
immediately discard the link modal. Traceback.

The traceback is a DOM `IndexSizeError`, that error is thrown when the
boundaries of a DOM Range (`document.createRange`) are outside of the
ranged elements. In this context, the error happens because the element
is empty and the range has an end bound set to the size of the selected
text.

Odoo wrap code does some text node split in order to attach the link
just on the selected text. If it correctly re-set the underlying
structure, it does not update the $(editable) structure used to restore
ranges.

opw-1981751

closes odoo/odoo#33257

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-05-09 13:53:22 +00:00
David Beguin d82b3f143c [FIX] mail : remove blacklist from mail.channel.partner
Blacklist was added to mail.channel.partner in order to avoid sending
mail notification for a channel in send mail mode if the partner was
blacklisted.

But as everythin is done using directly the res partner model, this
inheritance is completelly useless.

Moreover, since introduction of mail.address.mixin with email_normalization
(inherited by blacklist.mixin), the partner_email cannot be normalized as it
is a non stored related field. The computation of email_normalized will
fail.

Task ID : 1911716
Closes PR #28922
2018-11-21 16:12:47 +00:00
Robot Odoo ce153c9ba6 [IMP] mrp: work orders planning
This PR introduce:
- State on kanban cards
- Do not allow a start date greater then a stop date.

The purpose and details are explain in each specific commit

Task ID -1838642
Pad - https://pad.odoo.com/p/r.68c799c9a80a18157eefebc39452f311

closes odoo/odoo#25103
2018-12-03 09:45:44 +01:00
Kirti Choudhary efb56976f4 [IMP] mrp: WO do not allow end date < start date
It does not make sense to finish something before starting it.
Do not allow to write on a done WO except for time log.

Related to task 1838642
Closes #25103
2018-11-30 09:28:29 +00:00
Kirti Choudhary 6cde9645ab [IMP] mrp: Display status of the WO on the kanban cards
The purpose is to help the operator to select easily an
order that is ready without using filter.

Related to task 1838642
Closes #25103
2018-11-30 06:30:24 +00:00
Gert Pellin 4629a4fb0e [FIX] point_of_sale: traceback on printing android
Firefox for android gives atraceback when clicking the print receipt
button. This traceback is caused becaus Firefox for Android does not
support printing.

This fix replaces the traceback by an explanation why it is not possible
to print.

Also  backport for safari-fix

closes odoo/odoo#28919
2018-11-21 15:35:39 +00:00
Dharmraj Jhala 2643e851aa [FIX] website_sale: prevent update of cart qty in edit mode
/!\ Should not be forward-ported in *12.0* /!\

Because of the mechanism to bind change / click event in the 10.0
implementation, when we are in edit mode on a product page, the event
handlers that are in charge of updating the cart quantity can still be
triggered.

After this commit, click / change event while updating cart qty will
not be effective in edit mode.

task-1825889
Closes https://github.com/odoo/odoo/pull/24211

closes odoo/odoo#29224
2018-12-04 09:54:20 +00:00
Sylvain Van Hoof e467681cfd [FIX] delivery: consistent return type
The original method `put_in_pack` returns a `stock.quant.package`.
Therefore, the override should do so.

Fixes #27636
opw-1912671

closes odoo/odoo#29229
2018-12-04 08:35:10 +00:00
Nicolas Martinelli e9bc13fce9 [FIX] website_sale: price difference
- Create a product A with a sales price of 40
- Create a pricelist where product A costs a fixed price of 100
- Assign this pricelist to a customer
- Connect as the customer on the eCommerce

On the eCommerce, the price for A is displayed as: ~~40~~ 100.

We only display a price difference if the pricelist price is smaller
than the sales price.

opw-1885443

closes odoo/odoo#29141
2018-11-30 08:39:37 +00:00
Odoo Translation Bot 536cd8caea [I18N] Update translation terms from Transifex 2018-12-01 02:45:01 +01:00
Nicolas Martinelli ae4a4cf0a9 [FIX] report_intrastat: product weight
- Create a product with 2 variants A & B
- Set a weight on the variants (btw, the weight field is not available
  on the template in this case)
- Create an invoice for A, validate

On the intrastat report, the weight remains 0.0.

The report clearly takes into account the weight of the template, not of
the variant. We use the product weight, and fall back on the template
weight.

opw-1913305

closes odoo/odoo#29178
2018-11-30 09:55:38 +00:00
Toufik Benjaa 23a7b15276 [FIX] http: avoid crash on jsonp POST+GET
- This commit fixes a crash that happens when the server receive a
  JSON-P call done in two requests (a POST followed by a GET).

  The issue is due to the fact that when the first request is done (POST
  one) the member `params` is never initialized.

  This parameter is then used in the module `auth_signup` on an override
  of the method `dispatch` thus crashing the code.

  To avoid the crash, we now initialize `params`.

closes odoo/odoo#27369
2018-11-21 10:09:10 +00:00
Lucas Perais (lpe) dc23365048 [FIX] calendar: detaching event makes recurring attributes irrelevant
Have a recurring meeting, repeated until some date

Edit one of the instances and detach it (click on "update only this instance")

Edit the detached event and change some value

Save

Before this commit, a JS error was thrown saying that the field final_date was invalid
This was because the required attribute on this field was set to True, but the python
put the value of the final_date to False

After this commit, there is no error as we set this value to false, since the field
doesn't make sense for a non-recurring event anyway

OPW 1892426

closes odoo/odoo#28850
2018-11-22 10:06:06 +00:00
Robot Odoo ba8bac8f98 [FIX] web: search input date in another timezone
Put the browser in timezone Sao Paulo (Or like West of UTC)

Trigger the autocomplete (and the subsequent search) on a date field
by writing a date (in the locale format) in the search view

Before this commit, the domain sent to the server contained the date as the day
**before** the one asked for in the input

This is because, the string input is parsed and gives:
input = 12/02/2018
When creating the moment object:
> since there is no explicit time, moment will interpret it as 12am (midnight)
> We force moment to consider the string as being UTC (function: moment.utc())
> the moment contains, as output the time ** 2018-02-12T00:00:00 UTC **

When getting the facet value for making the domain
> we call toDate on the moment object, which, according to the browser is UTC and will
be converted to the locale timezone before formatting
> And the domain will use the date 2018-02-11T22:00:00 Brazil/SaoPaulo
which gives the day before the one we asked for

After this commit, this issue doesn't arise, because we use the string representation of
the moment object in search_inputs (i.e 2018-02-12T00:00:00 UTC), to create a new one
*BUT* we create it with a date format that excludes the time from being interpreted.
Also, the resulting moment object in this case is not flagged as UTC anymore

OPW 1903224

closes odoo/odoo#28542
2018-11-22 13:02:21 +01:00
Дмитро Катюха f68c5261f9 [FIX] resource: Fix work/leaves hours count methods
Purpose
=======

Buggy example:
I have a 35h working schedule. I work every week day:
- From 8h to 12h
- From 12h to 16h

Let's say that I want to retrieve the working hours from Wednesday 14h03
to Thursday 11h03.

The working hours are:
- From 14h03 to 16h --> 1h57
- From 8h to 11h03  --> 3h03
----------------------------
TOTAL                   5h

Currently the result will be 1.95, i.e. 1h57 because the second day
is not taken into account as start time > end time, and thus rrule
doesn't manage this correctly and returns only the datetime corresponding
to the first day.

Specification
=============

Force the until parameter of rrule to be set at the end of the day, do
avoid skipping the second day. Do this in the methods that compute the
work hours and the leave hours.

Add a test to ensure the robustness of the fix.

Closes #21297

closes odoo/odoo#28920
2018-11-21 15:42:48 +00:00
Denis Ledoux af476c6949 [FIX] report: support for wkhtmltopdf 0.12.5
This revision brings the compatibility for our reports
using wkhtmltopdf 0.12.5.

Up to now,
the supported wkhtmltopdf version was 0.12.1.

The goal of this revision is to add the compatibility
to wkhtmltopdf 0.12.5,
while keeping the same exact rendering than in 0.12.1.

There is a behavior change with the `--dpi` parameter,
which no longer has a "zoom" level effect as it did with 0.12.1.

To deal with it, we pass the `--zoom` parameter when
the detected version installed of wkhtmltopdf is after 0.12.2,
with a ratio 96:dpi. 96 being the default dpi of wkhtmltopdf.

This trick allows to render the reports with the exact same
zoom level, whatever the dpi value configured in the reports paperformat.
(at least with dpi values up to 149, after 150, included,
the dpi parameter with wkhtmltopdf 0.12.1 as a weird behavior,
it no longer zoom out)

opw-1907346

closes odoo/odoo#28864
2018-11-21 09:30:02 +00:00
Nicolas Lempereur 1f8788deef [FIX] purchase: es_AR translation typo
Fixing it directly by commit since there is no es_AR on transifex.

The issue of the ticket has been solved by transifex, this is for
another similar issue that has been found.

opw-1907924
closes #28923
2018-11-21 17:37:35 +01:00
Denis Roussel e81809b89d [FIX] mrp: Allow mrp user to delete stock_move_lot links
With an mrp user, add lots lines to mrp production order moves. Then,
try to delete one line, the dustbin icon does not appear.

opw-1908930
2018-11-21 14:08:47 +01:00
Denis Roussel 8a6162d00d [FIX] mrp: User with no products write access cannot create production order
As the product_tmpl_id field is related one but not readonly, the creation
of production order triggers a write on product.product model
2018-11-21 13:16:45 +01:00
Lucas Perais (lpe) 07d4505759 [FIX] base: res_partner: clarify string of commercial_partner_country_id
To avoid confusion in the filters and elsewhere

OPW 1910654

closes odoo/odoo#28848
2018-11-20 14:39:14 +00:00
Laurent Smet 11180de96d [IMP] account: Add constraint on statement line currency
When importing a bank statement, we need to prevent the case that an inconsistent
currency_id is set on statement line (= statement currency).

E.g. Your company is EUR, your journal is EUR, your statement is imported with a csv having
currency_id = EUR.

The amount currency will be used in the reconciliation widget instead of the
amount. Furthermore, if you are not in the multi-currency group, the currency_id is invisible and
then, it becomes difficult to understand the reconciliation propositions in the widget.

-task: 1909317
2018-11-20 13:30:51 +00:00
Lucas Perais (lpe) 462681723b [FIX] web: search input date in another timezone
Put the browser in timezone Sao Paulo (Or like West of UTC)

Trigger the autocomplete (and the subsequent search) on a date field
by writing a date (in the locale format) in the search view

Before this commit, the domain sent to the server contained the date as the day
**before** the one asked for in the input

This is because, the string input is parsed and gives:
input = 12/02/2018
When creating the moment object:
> since there is no explicit time, moment will interpret it as 12am (midnight)
> We force moment to consider the string as being UTC (function: moment.utc())
> the moment contains, as output the time ** 2018-02-12T00:00:00 UTC **

When getting the facet value for making the domain
> we call toDate on the moment object, which, according to the browser is UTC and will
be converted to the locale timezone before formatting
> And the domain will use the date 2018-02-11T22:00:00 Brazil/SaoPaulo
which gives the day before the one we asked for

After this commit, this issue doesn't arise, because we don't convert the moment into a Date,
and we directly format that moment into a string

OPW 1903224

closes odoo/odoo#28689
2018-11-20 10:06:18 +00:00
Julien (juc) Castiaux 8ccc976c20 [FIX] website_crm_partner_assign: unpublised parter rendered empty
Unpublised parters were rendered empty instead of not rendered at
all in the resellerrs tab of website

opw-1903573

closes odoo/odoo#28917
2018-11-21 14:43:57 +00:00
mgh-odoo 52f13c5f6d [IMP] purchase: PO status changed to more suitable
purpose of this commit is to change invoiced status
    "No Bill to Receive" to "Fully Billed"

Task: 1857963
Closes: #25804
2018-11-20 10:03:53 +00:00
Géry Debongnie 6eb217ef79 [FIX] web: properly cleanup after notification tests
The NotificationService has a side effect: it adds a div inside
document.body. We could implement a cleanup mechanism for services, but this
seems a little overkill since services are not supposed to be destroyed anyway.

closes odoo/odoo#29099
2018-11-28 13:38:21 +00:00
Géry Debongnie 0e40d843d5 [DOC] doc: add warning in JS test documentation
This commit adds a warning for common causes of mistakes, while running
the JS test suite.  It is possible to lose a lot of time trying to make the
tests pass if one does not notice that the browser window is not zoomed at 100%.

Maybe this warning will help someone in the future...

closes odoo/odoo#29021
2018-11-28 12:47:55 +00:00
Robot Odoo 7f1f7794fb [MERGE] website(_*): reorganize the JS
Reorganize the javascript to use conventional website widgets, rpc calls, classes, ... This will allow to better improve, fix and extend the existing behaviors. This is also a first step towards automatically testing website features more correctly.

This work was started with  https://github.com/odoo/odoo/pull/27719

closes odoo/odoo#28404
2018-11-28 14:41:26 +01:00
Robot Odoo e48cc56b3b [IMP] mrp: unbuild ui improvements
Add some tooltips and rename labels for lot and source_location fields.
More details in specific commits

Task link : https://www.odoo.com/web?#id=39843&action=327&model=project.task&view_type=form&menu_id=4720
Pad link : https://pad.odoo.com/p/r.c50cfff56ca538324f15214213c860d9

closes odoo/odoo#27017
2018-11-28 14:41:02 +01:00
Darshil Trivedi b2ec6bc7ad [IMP] mrp: BoM and product as readonly when a MO is set on UB.
Since commit 2bd10fa757 when the user specify a MO the
unbuild use the existing moves raw and moves finished in order to create the unbuild
moves. In this case the bom_id and the product_id is not needed since we don't generate
unbuild move from the BoM

This commit is related to task ID 39843.
2018-11-28 11:50:24 +00:00
Darshil Trivedi e25b9c9ffa [IMP] mrp: unbuild tooltips and fields label rename
The purpose is to help the user if he has difficulties
to know the purpose of a field. The field for tracking
was named lot but it is also used for serial number. That
could be confusing for the end user. Also rename source as
source location in order to be coherent with destination
location

This commit is related to task ID 39843.
2018-11-28 11:47:22 +00:00
qsm-odoo 5bb426c9de [FIX] website_slides: move JS in the correct file
Commit https://github.com/odoo/odoo/commit/6f5748d28854305bb33ffe54e5f94bab4a14828f
split and moved JS in different files... but in files which were in
different assets.
2018-11-28 10:28:53 +00:00
qsm-odoo 6d67ce5b7c [REF] website_*: review reorganization and enforce conventions
Review the JS reorganization made by direct parent commits and do more
to use our defined JS conventions. Also simplify JS which can be
obviously improved.
2018-11-28 10:28:53 +00:00
Andrea Ulliana c64c646d62 [REF] website_slides: reorganize javascript 2018-11-28 09:49:10 +00:00
Andrea Ulliana 08230abe3c [REF] website_sale_delivery: reorganize javascript 2018-11-28 09:49:10 +00:00
Andrea Ulliana eb5d6c212e [REF] website_mail_channel: reorganize javascript 2018-11-28 09:49:10 +00:00
Andrea Ulliana 1eab58bdbd [REF] website_links: reorganize javascript 2018-11-28 09:49:09 +00:00
Andrea Ulliana 2cdcdedef6 [REF] website_forum: reorganize javascript 2018-11-28 09:49:09 +00:00
Andrea Ulliana ed3c8d38ff [REF] website_event_track: reorganize javascript 2018-11-28 09:49:09 +00:00