Commit Graph
126133 Commits
Author SHA1 Message Date
Julien (juc) Castiaux e97e41f2e3 [FIX] account: change reconciliation journal to a non-reconciliable
Changing the journal of a reconcialiation model to a journal not
reconciliable resulted to the model not accessible from any
menu.

opw-1913079

closes odoo/odoo#29249
2018-12-05 08:43:22 +00:00
Olivier Dony 3b85900faf [DOC] install: update info about wkhtmltopdf
We now support version 0.12.5(.1), which is available for all recent Debian and Ubuntu versions,
and contains quite a few bug fixes. An up-to-date version of Odoo 10 or later is required, for
pixel-perfect compatibility with the result of 0.12.1.3.
See also the wiki for more info: https://github.com/odoo/odoo/wiki/Wkhtmltopdf
2018-11-26 13:40:15 +01:00
David Beguin 06e1a46c04 [FIX] survey : fix review survey page
The prefill of the date field must be done after the initialisation,
otherwise, it would override the value. so prefill must be done inside
the .then to avoid prefill before the locale is ready.

Since the datetime are real datetime in DB, we cannot give real datetime
to JSON but string instead.

Finally, no need to keep the div class row. Otherwise, it would put everything
on same line and the jumbotorn div wouldn't be on top on the rest of the page.

Special thanks to @awa-odoo that gave me his masterpiece brain
to help me on this.

Task ID : 1911291
Closes PR #28966
2018-11-26 12:04:47 +01:00
David Beguin 318893d6ed [IMP] im_livechat, website_livechat : update website default livechat
In order to facilitiate the configuration of a livechat on the website,
the first livechat channel that was demo data from im_livechat
is now set as data. Website is now using this first livechat channel
instead of creating a new one and using it.

Task ID : 1912056
Closes PR #29020
2018-11-26 08:47:19 +00:00
Wolfgang Taferner 284eb622d6 [FIX] sale_coupon: typo in variable
closes odoo/enterprise#3143
2018-11-24 10:42:48 +00:00
David Beguin 5738a046be [FIX] survey : fix datetimepicker initialization - BS4
Since BS4, input-group is used instead of form-controll.
The initialisation was not correctly made because it didn't find
the datetimepicker.
There were several resulting issues:
- Max and Min date were not taken into account
- Clicking on the text area of date field was not opening the
    datetimepicker as config was not defined (allowInputToggle option)

Task ID : 1911291
Closes PR #28966
2018-11-23 10:00:55 +01:00
David Beguin 937db5386a [FIX] survey : Fix datetimepicker single id issue.
In survey template, the datetimepicker was created with always the same id.
So if two date fields were present on the same page, it created a
multidemensional vortex that broke an alternative reality, resulting in
not being able to fill in both date fields and other crapy stuffs.

Also, the sass file needed to work with tempusdominus library were not
loaded with the js file that comes with it. Resulting in an hugly calendar
(if it could be called calendar) widget.
As survey does not load backend nor frontend assets, it's necessary to have
both files (js and sass files) in common assets.

Task ID : 1911291
Closes PR #28966
2018-11-23 10:00:46 +01:00
Christophe Simonis b3052b690f [FIX] point_of_sale: use pycompat.izip 2018-11-23 00:35:16 +01:00
Christophe Simonis 5de8842b31 [FIX] account: correct test
Let postgres do the casting...
2018-11-22 21:38:45 +01:00
Christophe Simonis 97f3f9d118 [FIX] point_of_sale: adapt code and test to version 12
Oversight of previous forward-port.
2018-11-22 21:36:53 +01:00
Christophe Simonis 4cbcbe9ea4 [FIX] base: adapt property field optimization to native date(time) fields
See b6d32de31e
2018-11-22 20:33:22 +01:00
Christophe Simonis 70f9cb33ac [FIX] base: remove leftover print statements 2018-11-22 20:19:06 +01:00
Christophe Simonis b4e1be8ab0 [MERGE] forward port branch saas-11.3 up to b09f624f20 2018-11-22 20:06:48 +01:00
Christophe Simonis b09f624f20 [MERGE] forward port branch 11.0 up to 263b388c50 2018-11-22 17:52:57 +01:00
Christophe Simonis 263b388c50 [MERGE] forward port branch saas-15 up to e44c35f407 2018-11-22 17:06:31 +01:00
Nicolas Lempereur 1c4d49330e [FIX] mail: notif manager positions date + check
By default in the notification manager we see something like:

```
record name     {a second ago}
summary                      V
```

but if for example the record name is long or the summary empty, we can
have something like:

```
record name so very long {a s}
V
---
record name so very very lo...
                             V
```

This is because the record name was not allowed to grow, and the
positionning of the check mark based itself on the existence of the
summary container (.o_last_message_preview).

With this change the date a message was sent is shown in any case and
the check mark is on the right.

opw-1911654
closes #28960
2018-11-22 14:45:33 +00:00
Raphael Collet 9d72263717 [FIX] base: partner.user_ids only shows active users
Returning inactive users breaks many features based on the partner's user ids
(among which the company switcher).

This reverts a small part of commit 14af2c7f2fe6c14afb96d7e9f2bb02b2a022eaae
which is related to #25939.  That part was not necessary and had some
unintended side-effects.

closes odoo/odoo#28947
2018-11-22 15:03:06 +00:00
Yannick Tivisse e3a4bfa1c6 [FIX] hr_payroll: Display currency on payslip pdf report
Purpose
=======

There is typo that doesn't display the currency next to the different amounts
on the payslip report.

closes odoo/odoo#28964
2018-11-22 14:46:45 +00:00
Christophe Simonis e44c35f407 [MERGE] forward port branch saas-14 up to a9752d3ad3 2018-11-22 15:03:01 +01:00
Christophe Simonis a9752d3ad3 [MERGE] forward port branch 10.0 up to af476c6949 2018-11-22 14:39:08 +01:00
Swapnesh Shah 1b8ac11d16 [FIX] sale: Fix _compute_type_name to work in batch
Closes #28713

closes odoo/odoo#28742
2018-11-22 13:35:27 +00:00
Alexandre Saunier 1d2a4d8459 [IMP] hr_attendance: faster loading of employees kanban view 2018-11-22 12:22:36 +00:00
Alexandre Saunier e946f00801 [CLA] Add asaunier to Camptocamp CLA 2018-11-22 12:22:17 +00:00
Toufik Ben Jaa ae6ab96629 [FIX] payment: if a payment transaction processing fail, rollback.
- Before this commit when a transaction failed, the code doesn't
  rollback and continue to process the other transaction, thus creating
  record that should be rollbacked.

closes odoo/odoo#28748
2018-11-22 11:44:36 +00:00
Yannick TivisseandCas Vissers 02ce0022b2 [FIX] hr_holidays: Fix remaining leaves count on employee form
Purpose
=======

Currently the remaining leaves substract the taken leaves with
no needed allocation.

That way, sick leaves are removed from the remaining leaves for example.

Closes #28659

Co-authored-by: Cas Vissers <c.vissers@brahoo.nl>

closes odoo/odoo#28951
2018-11-22 11:35:08 +00:00
Nicolas Lempereur 10f0766b3e [FIX] mail: no link special character mention
When we mention for example `@hell'o`, the user will be added as
subscriber but he is not linked.

This is because there is two part of mentions:

- inserting the mention in the message: at this point the mention is
  not escaped (only space are replaced with non-breaking space).

- wrapping a link around the mention in a message that is being posted:
  at this time the message has been escaped ( for &<>"`' ).

Thus when wrapping the mention, we have to search the escaped content.

In the case of canned response, the system is different with defined
substitution that replaced the "shortcut" so this makes no change to
that.

Added test without fix failed with:

8. should contain a link in the message content (expected:1, result:0)
9. should have correct mention link in the message content
    (expected:"@ЅpëciãlUser<&>\"`' ツ", result: "")

opw-1909300
closes #28846
2018-11-22 11:04:47 +00:00
Toufik Ben Jaa b294fc15e3 [FIX] sale: allow duplicate SO from other company
- In some cases (record rules modified to allow access to multi company
  SO) the duplication of a quotation isn't possible if the quotation is
  set on a company than the user trying to duplicate it.

  This is due to a computed field that tries to access the order's
  company currency.

closes odoo/odoo#28945
2018-11-22 10:20:05 +00:00
Toufik Ben Jaa b083cca7ad [FIX] hr_timesheet: set allow_timesheets on task to readonly
- On `project.task` records the field `allow_timesheets` is a related
  set to `readonly=False` which triggers writes on `project.project` and
  raise access rights issue for users who can create tasks but cannot
  write on `project.project`.

  OPW-1910877

closes odoo/odoo#28943
2018-11-22 09:53:43 +00:00
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
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