Commit Graph
140385 Commits
Author SHA1 Message Date
Antoine Prieels 2e34d456e8 [FIX] hw_drivers: Redirect exceptions to log file
Exceptions were logged to stderr so we couldn't see them when Odoo was
running as a service on the IoT Box. We now redirect stderr to the logger
to see track errors in the log file too.

closes odoo/odoo#41028

Taskid: 2146835
X-original-commit: 54a1919cbc37f5832ce110605c29b222c7a5bfe9
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2019-11-28 08:32:28 +00:00
Antoine Prieels 738868a1db [IMP] hw_drivers: Dual customer display
Customer displays were all using the same URL and therefore could only
show the same products. We now use different URLs per screen.

Two screens connected to the same IoT Box can now display customer
displays from different POS.

closes odoo/odoo#41026

Taskid: 2123511
X-original-commit: 12569b0e7f7a9e447f8df908597131911c5cfef8
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2019-11-27 14:15:18 +00:00
Antoine Prieels ad846fcee5 [IMP] iot: Dual screen support for RPI4
We now support the RPI4 which has 2 micro-HDMI outputs, while the
prvious driver only supported one display. We add support for a second
display.

Taskid: 2123511
X-original-commit: 5886c3a864c990fcd7b852baafab752e7da90494
2019-11-27 14:15:18 +00:00
Goffin Simon c1c4404131 [FIX] website_sale: Wrong price_unit in the cart
Steps to reproduce the bug:
- Let's consider two companies C1 and C2
- Let's consider website W
- Activate multi-company
- Disable common contact book and common catalog
- Switch the superuser in company C2
- Activate pricelist
- Create a public pricelist PL for C1 and available on W
- Set up a pricelist with compute price = formula and  based on = cost
- Go Sales > Configuration > tick Multiple Sales Prices per Product and tick Prices computed from formulas
- Create a portal user PU and set PL on him
- Create a product P with cost = 10$ and publish it on W
- Set up the product valuation as: automated
- Log as PU and go on the shop
- Put P on your cart

Bug:

The price of P was 0$ instead of 10$

opw:2092695

closes odoo/odoo#40981

X-original-commit: 40d3fa50e3d9a0e1cc0077cc8dcbe052ffa9820f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-11-28 10:10:16 +00:00
Martin Trigaux b175558ce7 [FIX] tools: no pollution during export translation
Before this commit, the export of translations was incorrect for code
and model translations:

For code translations, the field 'name' was used for the matching
while the _() method explicitly use None in the _get_source call to
only use the field 'src' for the search.

For model translations, the field 'res_id' was not used when searching
for a translation.
For instance, if a ir.model.fields did not have translated label,
exporting the translations was using the translations of the first
field having the same source.
While this could be convient during the import (to be discussed),
doing so in an export of translation is clearly an unexpected
side-effect.

closes odoo/odoo#40909

X-original-commit: 4534181f106cf5aa50c65c942c260eeec122d3d2
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-11-28 11:43:46 +00:00
jbm-odoo 9725eadfdd [Fix] hr_employee: Fix compute fields
When we add a user to employee, we can have problem with leave,
expense or coach manager. It's due to those compute fields.

closes odoo/odoo#40795

Related: odoo/enterprise#6865
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:40:34 +00:00
jbm-odoo df44538a8b [IMP] fleet: Add analytic account and mobility card
Create analytic account from fleet (and link it to vehicle) based
on the plate and the fiscal deduction rate (if l10n_hr_payroll_fleet
is installed).

Add on employee a Mobility Card number. This number is set on vehicle
when we put a partner linked to employee on a vehicle.

taskID: 2127641
2019-11-28 10:39:49 +00:00
wan 12ce030375 [IMP] l10n_be: add account.group.template
closes odoo/odoo#39422

Related: odoo/enterprise#6523
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-11-27 14:10:13 +00:00
wan e8caf0a368 [IMP] l10n_*: adapt for new account.group.template model 2019-11-27 14:10:13 +00:00
wan a124050511 [IMP] account: automatically adapt account group items
Task 2092104
Accounts group Hierarchy should be automatically well done without to
have to specify the parent (based on the account group CODE)

Before, we had to set all the accounts in the correct groups manually
and it was cumbersome.
Now:
* No need to fulfill account group parent
* No need to fulfill account group id on account

We can still change the groups if there are exceptions; the groups are
only set at create and write time.
2019-11-27 14:10:13 +00:00
sri-odooandQuentin Mourier c8d09da004 [IMP] survey: allow to somehow customize certification report templates
This commit adds possibility to select a layout for certification rendering.
User can choose among 6 predefined layouts carefully designed and that should
cover all use cases, therefore removing any need of allowing customization.

It also adds possibility to preview certification directly from survey.

closes odoo/odoo#32675

Task: 1967652
Pr: #32675
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
Co-authored-by: Quentin Mourier <qmo@odoo.com>
2019-11-28 11:55:01 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Kevin Baptiste 4c030311ad [FIX] ratings: properly convert rating
closes odoo/odoo#40853

Taskid: 2145481
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-27 07:45:45 +00:00
William Henrotin 8c1641092e [IMP] stock: track changes on type
Changing a product type from consumable to storable and and vice versa can
make the quantity in stock confusing. As only storable product update the
stock quants, the amount on stock moves could be diffenrent that the one
on stock quant if the product type has been changed in the past.

This commit will make those changes saved in the chatter history in order
to easily track inconsistencies

closes odoo/odoo#40997

Opw: 2125124
X-original-commit: 7c330b4443043dede13f76c034e2a2c5e53cbdee
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-11-28 08:49:28 +00:00
Hetal Dhanak d5d4d8cce9 [FIX] mrp: set default view to kanban
-previously, in the mobile view, while accessing Manufacturing
orders  from the dashboard in inventory, the default view was
set to tree. changed it to be kanban instead.

-Same in case user tries to access WO from dashboard when there
are none and user is redirected to MO.

Task-2127508

closes odoo/odoo#40857

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-11-27 10:13:38 +00:00
jbm-odoo 51e787d94a [IMP] base: Change default My company website
Purpose
========
Change www.yourcompany.com default link for the 'Website'
field of the res.company and res.partner to 'www.example.com'

closes odoo/odoo#40727

Taskid: 2129147
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-22 15:37:30 +00:00
Kevin Baptiste 84de0832ec [FIX] fleet: remove odometer log from chatter
closes odoo/odoo#41004

Taskid: 1931775
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 07:16:25 +00:00
jvm-odoo dc771b1a5c [FIX] http_routing: fix context language used when not available
A customer reported a problem when he deleted a language on the
website app.

In some cases, if you go on the odoo's generated website as a public
user let's imagine the following url: website.com/en_GB

The lang is saved in a cookie and sent to the context.

If you delete the language from the website languages (without
deactivating it) and you go on website.com as a public user,
the method will try to use the context or the cookie value which is
'en_GB' and it crashes.

This commit makes sure that the language is available

OPW-2129580

closes odoo/odoo#41007

X-original-commit: f3e9ca13f60ced0ec61cea0d13da45b2569da14e
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
2019-11-27 12:14:21 +00:00
Nicolas Martinelli 5ef68945e7 [FIX] web: date warning
- Set the computer TZ so that it is UTC day + 1. For example, set to
  'Australia/Adelaide' and perform the tests after 3:00 pm
- Go to Account > Customers > Invoices
- Set the Invice Date to today in the TZ

You receive the warning 'This date is on the future...'

The comparison of a UTC date without time `currentDate` is inconsistent
with `moment()`, which is not UTC and has a time set.

After playing around with `.utc()` and `startOf('d')` with no luck, we
decided to give up the idea of making `getTZOffset()` enter the game and
simply compare the string formatted values.

opw-2093186

closes odoo/odoo#40984

X-original-commit: f9eec97cb128f71796fca0116841453555ab4684
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-27 13:00:53 +00:00
Miku Laitinen 6610515929 [CLA] Updates for corporate/avoinsystems
closes odoo/odoo#40689

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-11-27 20:34:54 +00:00
Katherine Zaoral 817f1ece8d [ADD] l10n_ar: Be able to validate the cbu number no matter the stdnum version
If avaliable will use the stdnum.ar.cbu.validate functionality, if not
we defined our own validate method.

closes odoo/odoo#40998

X-original-commit: 9c389525e1c334505c8edf7276826c1b37ae0a1c
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-11-27 19:58:25 +00:00
qsm-odoo 8686ef0fb6 [FIX] web: fix wrong convertion of 8-digit hex to RGBA color
closes odoo/odoo#40991

X-original-commit: fdfce09ea5312d42379c58b334ea0ed22b8ddbfa
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-27 13:59:33 +00:00
fw-bot cfbeed761a [FIX] mrp: unit_factor computation
Updating the quantity to produce in a production order will recompute
each raw move's unit factor. The issue was this computation did not
take care of the previously product quantity. The unit factor was wrong
and so the next created workorder lines get the wrong quantity.

Example:
  - 1 components for 1 finished product (unit_factor = 1)
  - Create a production for 2 finished product -> quantity to consume = 2
  - Produce 1 then change quantity to produce to 3 -> quantity to consume = 3
    and quantity done = 1 but unit factor became 1.5

closes odoo/odoo#40990

X-original-commit: 79976600df45afc6150150734eef405fd41a70a3
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2019-11-27 14:05:26 +00:00
Victor Feyens 0b8eb71d71 [FIX] sale_margin: recompute purchase_price on product_id_change.
When creating sale order lines from the matrix (sale_product_matrix),
the purchase_price weren't computed

No cleaner change has been found to ensure the cost is computed.

Triggering all onchanges from the server side is quite tricky and dirty
to do...

closes odoo/odoo#40986

X-original-commit: 5c15b1310729129e390b455b0d1e0ac367f8dd69
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-14 09:55:14 +00:00
Victor Feyens 7581097779 [FIX] sale_product_matrix: typo
X-original-commit: 47693e8da777429585cf258dd1e23557a82c91a0
2019-11-13 10:05:20 +00:00
Victor Feyens 1a99a47fac [FIX] stock: wrong stored attribute, replaced by store
closes odoo/odoo#40979

Related: odoo/enterprise#6924
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-27 15:54:00 +00:00
Victor Feyens c32e9a4788 [ADD] (*_)_product_matrix: test tours
closes odoo/odoo#40971

X-original-commit: d729460f5fc72aa70e0a024e1dff281299eed0e3
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-27 15:49:57 +00:00
Victor Feyens 6c80003208 [ADD] purchase_product_matrix: tests
as we cannot do the test in product_matrix, add the purchase equivalent
in purchase_product_matrix to also test the matrix in this case.

X-original-commit: 9d7024a5327939de3c145928782936000d26bd33
2019-11-21 15:31:30 +00:00
Victor Feyens 60c50d16a5 [FIX] *_product_matrix: use correct record for comparison.
X-original-commit: a1d2893f8bdd05ad277b4129932849865a48b1d6
2019-11-21 15:31:30 +00:00
Victor Feyens d0d52743b7 [FIX] web,product_matrix: Do not trigger event on parents.
X-original-commit: 127a75ed5c746291f9b0b7466d8935c83abc32a0
2019-11-21 15:31:30 +00:00
Victor Feyens 21bcafc053 [FIX] product_matrix: ensure the data is taken from a targeted widget.
X-original-commit: 44462e11ddba648d64fb75997e3f87a877c642eb
2019-11-21 15:31:30 +00:00
Antoine Prieels 53bc9dcdc6 [FIX] hw_drivers: Print status ESC/POS printers
The status ticket contains ESC/POS commands but was printed on all
printers connected in USB. Plugging a printer that doesn't support
ESC/POS resulted in undefined behaviors.

We now only print this status ticket on ESC/POS printers.

closes odoo/odoo#40972

X-original-commit: c6a28b627cbe6f8bd1da4321c1329cbc1bde498d
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2019-11-27 09:18:33 +00:00
Jigar Vaghela 441759a5f1 [FIX] l10n_ch: avoid warning about not stored of l10n_ch_isr_number_spaced
two compute field have same method but one is store and other one is non store
so we split compute method for both fields(l10n_ch_isr_number,l10n_ch_isr_number_spaced)

closes odoo/odoo#40970

X-original-commit: d7a2d4aca37647ae568a5bb9f515ce2138245878
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-11-27 12:56:04 +00:00
Josse Colpaert 0940bfcfd5 [FIX] l10n_cl: avoid warnings on module install
X-original-commit: c6a00ff1c29481e826c81f551cacf60f054c15f8
2019-11-27 12:55:56 +00:00
lejeune quentin 194e49a902 [IMP] point_of_sale: Refactoring the "build" of the IoT Box
The use of an emulator (qemu) for the IoT Box build posed compatibility and performance issues.
So we have the Raspbian filesystem to install and configure packages.

closes odoo/odoo#40967

Task: 2145445
X-original-commit: 9c4e23a656bfd7b2f0c40feafadbce1b8d651aa8
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-11-26 13:36:38 +00:00
Juan Carlos Montoya 46ea06816c [FIX] payment_paypal: no transaction found
The paypal payment flow was crashing because no transaction was found
when the client wasn't connected.

closes odoo/odoo#40966

X-original-commit: 48f02f32fc3c32812a391d1fa37d561a8ae55e74
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-11-27 12:22:09 +00:00
Xavier Morel c15f81e2e1 [REM] sale_management: dynamic domains
The static domains were already added in
65613f5f83, it's just that the dynamic
ones were missed / left over.

closes odoo/odoo#40960

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-27 13:59:37 +00:00
Xavier Morel 1881999b89 [REM] l10n_ar: dynamic domain
closes odoo/odoo#40954

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-27 10:00:31 +00:00
Nicolas Martinelli 7ae118a20b [FIX] mail: reply to note
- Handle the notifications in Odoo
- On any object, e.g. a SO, user A a note and ping user B
- As user B, go to Discuss and reply to the note

The reply is sent a regular message.

Actually, everything is available to reply with the right message type
in:

https://github.com/odoo/odoo/blob/bae8ab7d93143e082e1d1a9cbe20a350c2d34d07/addons/mail/static/src/js/discuss.js#L1327

It is simply unset.

opw-2088619

closes odoo/odoo#40946

X-original-commit: 84c8221c60e3483aa637abad057253424236af83
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-27 08:44:56 +00:00
jvm-odoo 5ff3bec51b [FIX] sale_crm: fix crm quotation context
Reproduce the issue

    - Install CRM & sale_crm
    - Create an opportunity
    - Create a quotation from the opportunity

    The name of the draft is the opportunity's name instead of "New"

    - Add a "Storage Box" to the quotation, for instance
    - Confirm the quotation
    - Check the delivery note

    The name of the delivery note is the opportunity's name instead of
    WH/OUT/...

Cause

    This issue is caused by 4c9c249c. It seems that we pass an extra
    default_name in the context.

This commit removes the extra default_name from the context.

OPW-2122928

closes odoo/odoo#40943

X-original-commit: e8d91e4a7037d6c05991debb91072de162f0cf56
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
2019-11-22 08:00:23 +00:00
Kevin Baptiste 82df1dfccc [IMP] fleet: model cleanup, dashboard
Purpose
=======

It is currently difficult to know exactly what is used for costs
and services on the contracts.

Hence it make it difficult to evolve the fleet application
We should clean the models in order to have something that is clearer

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

Cleanup of models: removed Fuel and Cost. Contract and Services are no
longer inheriting Cost and are seperate models simplifying the use of
Fleet. A contract now has included services and they are no longer
generating cost.

closes odoo/odoo#34090

Taskid: 1931775
Related: odoo/enterprise#4572
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-27 11:54:51 +00:00
Victor Feyens c5398bd4bc [IMP] doc : group_operator field attribute
closes odoo/odoo#40944

X-original-commit: 7cbad14e28c50d51c14683d2548ea32ebc58907f
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-27 10:06:36 +00:00
Xavier Morel 7b75571fe8 [FIX] crm: remove onchange domain
closes odoo/odoo#40939

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-27 09:59:57 +00:00
Xavier Morel 17ad6be46a [FIX] base: returning a domain from an onchange
Turns out we've got an operator just for the pattern of "match value
if there's one, otherwise match everything".

Also remove an example of domain in onchange doc.

closes odoo/odoo#40938

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-27 09:59:51 +00:00
Laurent Smet 5426960e54 [FIX] account: Fix reconciliation access rights with Invoicing
As the group_account_invoice doesn't have the access rights to unlink the
account.partial.reconcile/account.full.reconcile, there was impossible for
the user to undo a reconciliation.

closes odoo/odoo#40934

X-original-commit: 0288adb0c315a1da63fe7e2d9b1f586ad6c9555b
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-11-27 08:16:57 +00:00
Nicolas Martinelli e3954db697 [FIX] stock: confusing error message
In case of a picking type where stock move lines are not shown, clicking
on 'Put in Pack' without 'Done' quantitites set shows a confusing error
message.

closes odoo/odoo#40928

X-original-commit: 76b72ab5953c1fc72e3c06464fd1c65e6420a4b3
Related: odoo/enterprise#6906
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-27 07:52:58 +00:00
Nicolas Martinelli 4dfa4e2c06 [FIX] stock_barcode: put in pack in receipt
- Activate product packing
- Create a PO for a stockable product, validate
- In the barcode interface, go to the created picking
- Set the product quantity
- Click on 'Put in Pack'

An error is raised: 'All the products currently reserved in the picking
are already in a pack...'

In the regular interface, the procedure is to create the move lines
manually, therefore setting a quantity done. However, this is not
possible in the barcode, and `move_line_nosuggest_ids` is always empty.

We introduce a special use case to bypass this in the case of the
barcode view.

opw-2127637

X-original-commit: d3a7b0e1b1dffd73b9ff31f1ec9fa4f6bbf478d2
2019-11-27 07:02:11 +00:00
Nans Lefebvre f3dec5d0ae [FIX] hr_holidays: allow request unlink because of typo in group name
opw 2144639

closes odoo/odoo#40927

X-original-commit: 82de73f421885e76aae81e2e6d8ec7bb585ad3f4
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-11-26 12:52:33 +00:00
Lucas Lefèvre b51be7fa02 [FIX] lunch: Disable vendor creation from grouped products
fixes #38014

closes odoo/odoo#40926

X-original-commit: dbd532894783fc8aeb0b5c72b2dd88d8afdb1ccb
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2019-11-26 08:27:49 +00:00
qsm-odoo fbdc541f9c [FIX] web_editor: read both color and bg-color to find custom ones
This was broken during the recent colorpicker refactoring.

closes odoo/odoo#40925

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-11-27 09:36:27 +00:00