Commit Graph
124195 Commits
Author SHA1 Message Date
Laurent Smet b8e32340c5 [FIX] account: Fix _convert in Aged Partner Report
Introduced by the forwart-port:
https://github.com/odoo/odoo/commit/4b8bd36219c1c11bb1ca36a9862baf632a995bad

closes odoo/odoo#28825
2018-11-20 09:47:32 +00:00
Nicolas Lempereur d36b42a779 [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 #28929
2018-11-21 17:17:08 +00:00
Nicolas Lempereur b642687d53 [FIX] lunch: BS4 previous order not just one column
In bootstrap 4 grid are based on flex and so flex items require a flex
container parent.

opw-1911572
closes #28905
2018-11-21 15:05:31 +00:00
Nicolas Lempereur 6d5df714a7 [FIX] mail: add mention no set focus on subject
In the extended composer, we focus on subject when adding a mention in
the body. Focusing in subject is wanted at the opening of the composer,
but not when adding a mention.

opw-1911566
closes #28910
2018-11-21 12:40:24 +00:00
Julien (juc) Castiaux d395accd94 [FIX] account: outstanding credit add button not shown in green
The "add" button shown in the outstanding credits menu in the
button right corner of a payment wasn't shown in green like the
other clickable elements.

opw-1907342

closes odoo/odoo#28908
2018-11-21 12:05:56 +00:00
RomainLibert 1d28525d6b [FIX] resource: increase the rounding factor in resource_mixin
In order to be more precise in the number of hours shown in leaves, we
need more precision in resource_mixin

closes odoo/odoo#28907
2018-11-21 13:04:55 +00:00
Rémi Rahir a874760d41 [IMP] doc: Update iap flow for 12.0
closes odoo/odoo#28866
2018-11-21 13:07:08 +00:00
RomainLibert 4a2c73d1a5 [FIX] hr_holidays: change selection keys from floats to integers
In the following commit (https://github.com/odoo/odoo/commit/744de4ee1cec5e43aa77ac3eccc7a9b1224f8fa1) we introduced some floats as keys
to Selection fields (namely request_hour_from and request_hour_to)

This lead to the ORM creating a column of type `int4` to store this
field which rounded the values.

In order to repair that faulty behaviour we use negative integer values
for the half hours, which is then transformed back into a float in the
code.

closes odoo/odoo#28877
2018-11-21 10:49:02 +00:00
Goffin Simon f3b3875305 [FIX] mrp: field result on 'quality.check' displayed False as uom
Steps to reproduce the bug:

- In the Manufacturing App , enable Work Orders and Quality
- Configure your products,BOM and Routing
- Create steps in routing with type='Register Consumed Materials'

Bug:

When you finished your Work Order operations it displayed "False" value in
the "Finished Steps" tab instead of the uom of the finished product.

Technically:

The function "record_production" unlinks the temporary stock.move.line that can
be linked to a quality.check. So the component_uom_id of the quality.check could not
be found when computing the field 'result' on model "quality.check' with function "_compute_result".

opw:1909768

closes odoo/odoo#28865
2018-11-21 09:34:20 +00:00
Nicolas Martinelli f533ddab43 [FIX] hr_timesheet: total in list view
opw-1911593

closes odoo/odoo#28872
2018-11-21 10:30:20 +00:00
Nicolas Martinelli 6d42f2f0bb [FIX] event: expected attendees
The 'Expected attendees' text is replaced by the number of attendees.

opw-1911577

closes odoo/odoo#28868
2018-11-21 10:06:29 +00:00
Nicolas Lempereur 3455a4d0e7 [FIX] account: send several invoices => state sent
When we print or post_message of an invoice it is set as sent.

But when we multiprint, we do not use each invoice post_message but
create directly mail.mail then send them in batch.

Thus the invoices are not set as "Sent".

With this change we make a special case.

opw-1910937
closes #28852
2018-11-21 10:00:36 +00:00
Odoo Translation Bot c487d2c26c [I18N] Update translation terms from Transifex 2018-11-21 09:40:22 +01:00
Yannick Tivisse 602f7ea0bc [FIX] lunch: Fix unreviewed new feature from a2f69ca
Purpose
=======

As we try to open a mail.compose.message on a model that doesn't inherit
from mail.thread (Mimic a cowboy yellin' "Yihaaa" while shooting into the air
with one revolver in each hand).

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

The only way to fix this issue while keeping the feature (Open a
mail composer) is to open the mail composer in mass_mail mode and
to remove the model on which it should be called.

The template won't be rendered in the mail composer but will
be rendered when sending the mass_mailing obviously, while avoiding
the unavoidable traceback when clicking on the 'Send' button

closes odoo/odoo#28849
2018-11-20 14:40:16 +00:00
Laurent Smet bd90026c67 [IMP] account: check match_partner in the default reconcile rule 2018-11-19 16:01:02 +00:00
Julien (juc) Castiaux 82f7fdd66b [FIX] gengo_base: Unable to uninstall module
The gengo module is used for automatic translation, if you try to
uninstall the module, at some point the required models/fields of
gengo no more exist but the module is still in use by odoo for
every translation.

This commit fixes the problem by disabling the gengo translations
when the system is installing/uninstalling a module.

opw-1906293

closes odoo/odoo#28806
2018-11-19 15:14:55 +00:00
Julien (juc) Castiaux f197498058 [FIX] google_drive: button in config not cross-browser
The "Get authorization code" button in the General Settings >
Integrations > Google drive was not correctly rendered on firefox.

This PR fixes that bug by correcly rendering the button, it has
been tested on both Firefox and Chrome

opw-1907644

closes odoo/odoo#28672
2018-11-20 10:02:45 +00:00
Toufik Ben Jaa 69c2b0a7d1 [FIX] portal: force cache clearing at access_token generation
- The value returned by the method `_portal_ensure_token` is False due
  to a cache issue.

  The value is generated written using the `sudo` environment while in
  the current user environment the cached value is `False`.
  After generating the value, the cache is not cleared, thus letting the
  method return `False`

closes odoo/odoo#28836
2018-11-20 11:49:17 +00:00
Alexandre Kühn a13db188f3 [FIX] mail: notify when resetting unread counter of thread
Before this commit, we had the following issue:

1. Open two tabs A & B.
2. Receive a message from a channel in tab A.
3. Mark it as read in tab A by clicking on the
   chat window of the channel.

> The unread counter is correct in tab A: no
  unread messages on this channel, and the
  messaging menu counter has been updated.
> The unread counter is not correct in tab B:
  it still has unread messages on this channel,
  and the messaging menu counter has not been
  updated.

The issue was caused by not notifying the updated
unread counter to the widgets when receiving the
'channel_seen' notification from the longpoll.
It was working in tab A because this is were we made
the action, so that it already marked messages as
read without waiting for the longpoll response.
However, Tab B has to wait for the longpoll response
to update the unread counter. It was updating the
counter, but it was not notifying the widgets.

This commit fixes the issue by letting the widgets
know when the unread counter has been reset.

Task-ID 1911239

closes odoo/odoo#28833
2018-11-20 10:52:26 +00:00
Nicolas Martinelli 09a2ef2e7c [FIX] l10n_fr_fec: date
The FEC report fails to generate because of an incorrect variable type.

opw-1908541

closes odoo/odoo#28832
2018-11-20 10:49:47 +00:00
Aaron Bohy 49e78f46ee [IMP] web: tests: backport of new helpers
This rev. is a partial backport of abf32b8b, so that the newly
introduced helpers are already available in 12.0.

closes odoo/odoo#28827
2018-11-20 10:17:37 +00:00
len-odoo 24ca67b545 [FIX] mail: execute only once when setting automated actions at record update
Fine-tuning of commit: d60f2ab0e2
Which applied when the next action was to create a new activity.
However the problem is also present when the next action is to send an email.
We extract the logic in a new private function to share the code in both cases.

opw 1904156

closes odoo/odoo#28819
2018-11-19 19:36:14 +00:00
qsm-odoo 180de24df0 [FIX] website: allow publishers to save their website edition
On save, the editor will ask to parent widgets if something needs to be
done first. The website navbar will receive that demand and asks to its
action-capable components to do something. For example, the content menu
handles page-related options saving. However, some users with limited
access rights do not have the content menu... but the website navbar
expects that the save action is performed. So, this empty action is
defined here so that all users have an 'on_save' related action.

This was only happening since 12.0 as 'on_save' actions were introduced
there to save page-related options.

closes odoo/odoo#28810
2018-11-20 10:05:54 +00:00
Ivan Yelizariev a0bda6bcf2 [FIX] account: fix code of transfer account
Transfer accounts created for payment acquirers was ignoring the prefix of the main transfer accounts and was always creating accounts with code 000001, 000002, etc.

The reason is because the method was called on an empty recordset

closes odoo/odoo#28789
2018-11-20 07:41:48 +00:00
Julien (juc) Castiaux c9229aa949 [FIX] website_crm: contact us form create leads in wrong company
In a mutli-company account with multiple websites for the
differents companies, the 'contact us' form creates leads in the
company of the admin instead of the one linked to the website.

This PR corrects that behavior by setting a 'company_id' field
to the company_id of the user in case that field is missing on
models that require it.

opw-1907375

closes odoo/odoo#28749
2018-11-19 15:57:52 +00:00
Nicolas Martinelli 84bf9f3145 [FIX] sale: free optional product
- Create a dynamic product P1 with an optional product P2
- The list price of P2 is 20
- Create a pricelist where P2 is free (fixed price of 0)
- In a SO, choose 'Configure a product' and choose P1, add

In the modal which suggests P2, its price is 20 instead of 0.

This is because we fall back on the list price when fetching the
combination prices.

This should not be necessary since:
- a pricelist is required to fetch a price
- a pricelist should always contain a rule applying to all products

Therefore, the list price doesn't need to be used as a fallback.

It is then necessary to modify the test tours by adding a partner on the
SO before selecting the product. Anyway, this is usually the way to go
since the selection of the partner determines the pricelist.

opw-1902456

closes odoo/odoo#28687
2018-11-20 10:22:56 +00:00
Nicolas Martinelli 9ba547100d [FIX] web: External Link
- Install Sales
- Go to Sales > Orders > Customers, 'Invoicing' tab
- Add a Bank Account

The 'External Link' button (which allows opening the form view) on the
bank account is not visible.

More generally, in the case of a One2many list view in a `<group>` tag,
the 'External Link' button of a Many2one field (which allows opening
the form view) is not visible.

The `flex: 1 0 auto;` should not be applied in the list view.

Corresponding PR in v11: #28812
opw-1903158

closes odoo/odoo#28741
2018-11-19 19:22:51 +00:00
Lucas Perais (lpe) 596af12c21 [FIX] web: dateField datepicker don't propagate field options
In a form view (account.invoice), have a date field as:

    <field name="date" options="{\'datepicker\': {\'warn_future\': true}}"/>

Open a record with the field set to a value
Click Edit, click save
Click create

Before this commit, the value of the field of the new record
took the one of the previous record

On account invoices, it resulted on having the popup "The record has been modified etc...."
And it was not possible to create an invoice from another one

this was because we passed the same reference object for the datepicker

After this commit, there is no popup as the field do not take a value from the framework

OPW 1906085

closes odoo/odoo#28759
2018-11-19 15:38:22 +00:00
Raphael Collet 5eb2fbdec3 [FIX] base: create parent XML ids before XML id
When a module creates a record from a model M that `_inherits` from some parent
model P, the method `_load_records` creates an XML id for the record, and an
extra XML id for the parent record.  The corresponding `ir.model.data` entries
must be created in the right order (parent record, then record), so that the
record is deleted before its parent record.

closes odoo/odoo#28805
2018-11-19 14:57:52 +00:00
Goffin Simon 7b8c415fc5 purchase_mrp: qty_received not updated on a PO
Steps to reproduce the bug:

- Let's consider a product P with a BOM in kit
- Create a PO with P and confirm it
- Cancel the shipment and the PO
- Reset to draft the PO and confirm it
- Valide the new shipment and receive P

Bug:

The qty_received was not updated

opw:1904678
2018-11-19 15:23:00 +01:00
len-odoo 0081321136 [FIX] website_sale_digital: display download links on free digital orders
Create a coupon/promotion that gives a 100% discount on some digital product.
If the total of the order is 0, then the client won't have the possibility
to download the product(s), since the download links appear on invoiced lines;
and no invoice has been created.

We display the download link on the products if the order total is 0,
as the other cases are already covered by the existing code.

opw 1905682

closes odoo/odoo#28799
2018-11-19 13:46:02 +00:00
Denis Ledoux 8ea10d42ba [FIX] website_sale: performance imp to search abandoned carts
By removing the `.id` from the `partner_id.id` domain leaf,
the ORM avoids to do a useless `SELECT` to read
the id of all partners different from the public partner,
as it already got the information from the `sale_order` table

e.g
Here is the SQL request before the revision:
```
SELECT "sale_order".id FROM "sale_order" WHERE ((((("sale_order"."date_order" <= %s)  AND  ("sale_order"."team_id" in (%s)))  AND  ("sale_order"."state" = %s))  AND  ("sale_order"."partner_id" in (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)))  AND  ("sale_order"."id" in (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s))) ORDER BY "sale_order"."date_order" DESC,"sale_order"."id" DESC
```
Here it is after:
```
SELECT "sale_order".id FROM "sale_order" WHERE ((((("sale_order"."date_order" <= %s)  AND  ("sale_order"."team_id" in (%s)))  AND  ("sale_order"."state" = %s))  AND  ("sale_order"."partner_id" != %s))  AND  ("sale_order"."id" in (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s))) ORDER BY "sale_order"."date_order" DESC,"sale_order"."id" DESC
```

closes odoo/odoo#28927
2018-11-21 17:05:13 +00:00
Raphael Collet 4894419b61 [FIX] cache: ormcache logger
The adaptation to Python 3 was done with two mistakes: the iteration on the lru
cache does not return keys, and functions are not sortable.

closes odoo/odoo#28870
2018-11-21 10:16:06 +00:00
Florent de Labarre baf48ee1f9 [FIX] project: remove unused and slow field
closes odoo/odoo#28887
2018-11-21 12:17:22 +00:00
Nicolas Martinelli 89927b7725 [FIX] point_of_sale: fine tune test
Remove false-positive errors based on the order of the data.

opw-1910248

closes odoo/odoo#28880
2018-11-21 11:18:26 +00:00
Nicolas Lempereur 2e8cc56432 [FIX] account: invoice sent when sent from list
The "sent" field on an invoice indicates if it has been sent to
customer or not.

When the invoice is sent to a customer from a form view the sent was
set, but when it was sent from the "Send" action on the list view,
it was not updated which seems wrong.

opw-1910937
closes #28796
2018-11-19 13:36:28 +00:00
Aaron Bohy 48a2ee0b07 [FIX] web: remove debugger
closes odoo/odoo#28798
2018-11-19 13:41:36 +00:00
Olivier Dony 45aaca1d4b [FIX] mass_mailing: fix typos in 8545e05fc0
TODO: add test coverage for this computed field

closes odoo/odoo#28797
2018-11-19 13:33:44 +00:00
Prakash Prajapati 96b103a8b1 [IMP] stock_account: Return product improvement
-Ticked by default(Update quantities on SO/PO)
   -Hidden in debug mode
   -Rename label "To Refund (update SO/PO) into Update quantities on SO/PO"

This commit is related to task ID 1880715 and closes PR #28091.
2018-11-19 11:11:30 +00:00
Robot Odoo 8272b914d5 [REF] mrp: state refactoring
The purpose of this PR is to allow more flexibility on Manufacturing.
It will allows:
- Pull and Push rules are no more directly trigger. It will require a confirmation from the user in order to launch them. (except when it comes from another rule)
- The user will be able to add extra components. Those components will follow the classic flow (trigger rules, will be present in workorders and produce wizard, ...)
- State will be computed and will not require explicit write
- Advanced filter

Task 1889384

closes odoo/odoo#28034
2018-11-28 06:06:17 +01:00
Robot Odoo 257bd0e874 [IMP] website_sale: add html field to customize category header
closes odoo/odoo#29085
2018-11-27 18:27:17 +01:00
Jeremy Kersten 432997b967 [IMP] website: support custom placeholder in empty-structure for editor
Before this commit, the placeholder was hardcoded:
'Drag building blocks here'

Now you can customize the placeholder using a data-editor-message attribute.
2018-11-27 16:13:01 +00:00
Fabien Pinckaers d06fcffe1d [IMP] website_sale: ability to set a cover (or other building block) in /shop/category/X
This commit closes #29045
2018-11-27 15:49:43 +00:00
Arnold Moyaux 1efc2e9ad9 [FIX] mrp: mrp user w/h inventory right 2018-11-27 11:58:02 +00:00
Arnold Moyaux 7206b385b5 [IMP] mrp: raw moves generation in onchange 2018-11-27 11:58:02 +00:00
Arnold Moyaux d76048c003 [IMP] mrp: miscalenous tab no more in debug mode 2018-11-27 11:57:44 +00:00
Arnold Moyaux 3bb3e6a530 [IMP] mrp: add a 'draft' state to MO
The purpose is to be able to plan manufacturing order
without propagate the components's documents directly.
Except when the manufacturing comes from a pull rule, it will
be confirmed directly.

In order to do it, it will just create the moves without confirm them.
They will be only confirmed after a 'Mark as Todo' click.
2018-11-27 11:57:43 +00:00
Arnold Moyaux c407d9afb9 [REF] mrp: compute state for production
Refactor production order state:
- Directly have an idea of linked workorders's state
- Computed in order to manage it in a single method
- Add tooltips for each state

Remove the None in availability selection field instead use a False

Also refactor the ready_to_produce field in order to only set as
assigned a production order that have the component for its first
workorder.
2018-11-27 11:56:56 +00:00
Romain Derie 52c3836780 [IMP] website_sale(_comparison): simplify xpath for old customize_show
Historically, the `website_sale.product_attributes` was a customize option.
That template became a normal view (removed customize_show attribute) with
bbd2d0e42
As it is now a normal view, there is no reason left to be an xpath view and we
can move itw code directly into the inherited template.

That way, we can simplify the `website_sale_comparison.product_attributes_body`
template that was doing a cross xpath (inheriting `website_sale.product` but
xpathing a DOM element from `website_sale.product_attributes` which was also
inheriting `website_sale.product`).

Note that cross xpath was not working well with multi website but was fixed
with 410c07283b

Still, we should avoid doing cross xpath when possible (originally it was not
possible since the view was a customize_show) as it is hard to grep DOM element
to find possible breaking xpath when doing changes on DOM.
This is the reason of this commit.

closes odoo/odoo#29044
2018-11-26 16:52:40 +00:00
Richard Mathot 30791b59b3 [IMP] hr: allow to search employees per company
closes odoo/odoo#29053
2018-11-27 08:10:53 +00:00