Commit Graph
137267 Commits
Author SHA1 Message Date
Florent de Labarre b6fc5ef468 [FIX] hr_expense: Team Approver have acces to all accounting
1. Apply same logic for sale and purchase user.
2. The group Expense Team Approuver can write/create/unlink,
it is opposite than https://github.com/odoo/odoo/blob/13.0/addons/hr_expense/security/ir.model.access.csv#L15
and https://github.com/odoo/odoo/blob/13.0/addons/hr_expense/security/ir.model.access.csv#L16

opw:2275116

closes odoo/odoo#53405

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-06-22 11:23:34 +00:00
Sébastien Theys af490aa25d [FIX] web: speed up tests by parsing OWL templates only once
closes odoo/odoo#55206

X-original-commit: 9b08be34ac6ffda091a36ebc72fd05374a9d661c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-07-30 13:58:05 +00:00
Thanh Dodeur a258874132 [FIX] website: prevent flickering on image reorder in the image wall
Before this commit, reordering the images in the image wall was
causing a flicker of the snippet options.

It was caused by a forced deselection of the snippet (image) that is
not necessary since 17e7e754cd

task-2307083

closes odoo/odoo#55090

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-30 07:07:07 +00:00
Rémy Voet (ryv) e7fd2ba5c8 [FIX] mrp_subcontracting: fix flow with tracked component
After the odoo/odoo#52949 , the registering of tracked component,
in case of subcontracting, was broken. Fix and try to mimic
the same flow than before. The produce wizard has been replaced
by a clean MO form to register component and use backorder mechanisme
of MO to manage tracked finished product + tracked component.

task-2278147

closes odoo/odoo#54994

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-07-30 12:09:10 +00:00
Benjamin Vray 2458098f60 [IMP] website: ease google font selection
Before this commit users needs to link an embed code provided by
Google. But it became less obvious to find this code so we now ask for
the link of the font page. But we still keep the possibility to link
an embed code if ever a user is wrong.

task-2304075

closes odoo/odoo#54816

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-23 09:12:12 +00:00
stefanorigano (SRI) 167e70347b [IMP] website, website_form: add position options ui icons
Part of https://github.com/odoo/odoo/pull/54913
task-2157252

closes odoo/odoo#54913

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-30 11:12:03 +00:00
stefanorigano (SRI) 58927d6fc3 [IMP] website: add s_rating size option's icons
Part of https://github.com/odoo/odoo/pull/54913
task-2157252
2020-07-30 11:12:03 +00:00
stefanorigano (SRI) 3906bd33e8 [IMP] website: review options UI for media list
Reword custom controls for image position and content vertical
alignment. Use different icons set according to the selected image
position.

Part of https://github.com/odoo/odoo/pull/54913
task-2157252
2020-07-30 11:12:03 +00:00
stefanorigano (SRI) fd743b104a [IMP] website: use icons for vertical alignment option
Part of https://github.com/odoo/odoo/pull/54913
task-2157252
2020-07-30 11:12:03 +00:00
stefanorigano (SRI) e847acc8ed [IMP] website: replace dropdown of shadow options with icons toolbar
Part of https://github.com/odoo/odoo/pull/54913
task-2157252
2020-07-30 11:12:03 +00:00
stefanorigano (SRI) 3d2c591215 [IMP] website: replace icons for content-width option
Also reorder options from small to large.

Part of https://github.com/odoo/odoo/pull/54913
task-2157252
2020-07-30 11:12:03 +00:00
stefanorigano (SRI) 5c09a1c77c [IMP] website: replace icons with text for height option
Part of https://github.com/odoo/odoo/pull/54913
task-2157252
2020-07-30 11:12:03 +00:00
stefanorigano (SRI)andqsm-odoo a1c9044ff7 [IMP] web_editor: render inline svg icons, apply css style
Render inline SVG inside buttons in order to allow CSS styling.

Define SVG icons design for normal/hover status applying the same colors
as default text buttons.

In order to support multi-colors SVGs, this commits will affect inner
shapes in different ways:
- '.o_graphic' shapes: will gets the UI btns colors (default/hover)
- '.o_subdle' shapes: will gets a slightly reduced default text color

Shapes without '.o_graphic/.o_subdle' classes will be rendered normally,
as defined in the svg code.

Part of https://github.com/odoo/odoo/pull/54913
task-2157252

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-30 11:12:03 +00:00
stefanorigano (SRI) 26e146644b [IMP] website, *: review snippet names
*: website_event, website_form, website_sale

Part of https://github.com/odoo/odoo/pull/55089
task-2157252

closes odoo/odoo#55089

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-30 10:19:06 +00:00
stefanorigano (SRI) b7fe2bdae2 [IMP] website, *: review snippets thumbs
*: website_blog, website_event, website_form, website_mail_channel,
   website_mass_mailing, website_sale, website_twitter

Part of https://github.com/odoo/odoo/pull/55089
task-2157252
2020-07-30 10:13:07 +00:00
stefanorigano (SRI)andqsm-odoo c0a11148e0 [IMP] web_editor: review snippets thumbs design
Part of https://github.com/odoo/odoo/pull/55089
task-2157252

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-30 10:12:58 +00:00
Victor Feyens cc665d51e8 [FIX] sale,purchase: do not enforce company at _prepare_* level.
By specifying the with_company at a higher level:
1) The risk of multi-company conflicts decreases
2) We allow customizations to use _prepare_* methods to potentially
create records in other companies when needed.

closes odoo/odoo#55192

X-original-commit: 33c767e1778d2b1fc83aaaea92c3c2aa008b9520
Related: odoo/enterprise#12105
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-30 10:20:31 +00:00
Xavier Dubuc e244bfa1c8 [FIX] mail: do not fetch 'user_notification' messages in thread
task-2296856
See odoo/enterprise#12095

closes odoo/odoo#55189

X-original-commit: 5aaff1547d04bccf20ef333f515811570e8b8e22
Related: odoo/enterprise#12100
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-07-30 09:23:02 +00:00
Nicolas Martinelli dcf1f48ee6 [FIX] account: prevent unlink item linked to posted entry
- Create a vendor bill, post it
- Go to Accounting > Accounting > Journals > Purchases
- Select the items linked to the vendor bill, delete

Nothing prevents from deleting the items while a posted entry cannot be
modified.

opw-2305873

closes odoo/odoo#55187

X-original-commit: 14ef02f73e649b5f8c50f09213f0a0dbddf46217
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-30 08:49:10 +00:00
Nicolas (vin) 8b7861ddab [IMP] account: Clean various feedbacks reported by consultants
Clean various feedbacks reported by consultants WTA/CTH.

It concerns namely :
- CoA
- DEMO DATA
- SEQUENCE NUMBER ON JOURNALS
- PAYMENT STATUS
- BANK STATEMENTS

Task ID: #2300936

closes odoo/odoo#54874

Related: odoo/enterprise#11995
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-07-30 08:58:54 +00:00
Laurent Smet 2a751921c1 [REF] account: Refactor '_prepare_counterpart_move_line_vals'
closes odoo/odoo#55186

X-original-commit: 0ebe2034cbd55c4384dfc7f253d66958623847d7
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-07-30 08:48:38 +00:00
Laurent Smet 6c9b5d6f6f [FIX] account: Fix creation of statement with zero amount/amount_currency
During the migration, it could happen some statement lines are created with a zero amount in company currency or foreign currency.
It this specific case, we can't retrieve the correct amounts by multiplying the statement line conversion rate because X * 0 is always zero.
This commit ensures the amounts are well preserved in such case.

X-original-commit: a75bc7fdf014daf965cad72917ac475cbf83f6ac
2020-07-30 08:48:37 +00:00
Laurent Smet 17a8a6d933 [FIX] account: Fix missing 'currency_id' on statement lines with amount_currency=0.0
The `currency_id` must be set whatever the amount_currency is zero or not.

X-original-commit: 88065aef326dcbe0fb821da8d9aa6cc0316615c7
2020-07-30 08:48:37 +00:00
Laurent Smet 78aae94838 [FIX] account: Fix float division by zero when statement amount is zero
This should never happen for someone starting Odoo after saas-13.4 but is happening during migrations.

X-original-commit: b43849032766b95f07d3ac73fc67e4c03138c3b5
2020-07-30 08:48:37 +00:00
Laurent Smet 920a5f1df1 [FIX] account: Fix typo in field declaration: 'require' instead of 'required'
Note: Since this field must not be required, this attribute can be removed.
X-original-commit: f88e37e912b3c60349ad8cba92ec8bfd2a95e2bd
2020-07-30 08:48:35 +00:00
Nasreddin (bon) 54a429af58 [FIX] point_of_sale: Receipt footer breaklines escaped
Issue

	- Install "Point of Sale" module
	- Edit POS (e.g.: Shop) settings
	- Enable "Header & Footer" feature
	- Add a footer with multiple breaklines and save
	- Start a session with the current POS
	- Make an order

	Receipt footer not well formated

Solution

	Add 'white-space:pre-line' style to avoid escaping breaklines;
	inspired on text-field css class.

opw-2300889

closes odoo/odoo#55182

X-original-commit: 85de8418ae9b152fc0f4c300b71249440f381224
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-30 07:56:53 +00:00
Goffin Simon 2800c89014 [FIX] l10n_se: Fiscal position not loaded
Steps to reproduce the bug:

- Create a new company C with country = Sweden
- Install app l10n_se
- Go to Accounting/Configuration/Setting/Fiscal Localization Package, select Swedish Chart of Account and then save

Bug:

The sweddish fiscal positions were not loaded.

opw:2302926

closes odoo/odoo#55170

X-original-commit: bd0c2ee6501c87789278377f7725e3c611955edc
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-07-29 15:54:08 +00:00
Nicolas Martinelli 5eea4c014a [FIX] account, stock_account: clean anglo-saxon lines
- Configure a Product Category Automated + FIFO
- Create a product in this category
- Create a PO for 10 units, receive the units, bill the PO and pay
- Sell 1 unit of the product and deliver it
- Create an invoice for the order
- Without paying the invoice, create a credit note with the option
  'Full refund and draft invoice'
- Post new invoice

The anglo-saxon lines are counted twice.

This happens because the lines already exist in the newly created draft
invoice.

For the sake of simplicity of the fix, we clean-up the invoice after
creation.

opw-2300536

closes odoo/odoo#55158

X-original-commit: 02d857b8aa75962f535ab4cd69ff8e2a6ef3fb48
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-29 15:20:02 +00:00
Anh Thao Pham (pta) 7d010ee8a5 [FIX] repair: use Customer Payment Terms in repair invoice
- Install Contacts and Repairs
- Go to Contacts and configure Payment Terms of Contact X (i.e. 2 Months)
- Go to Repairs and create a Repair Order:
  * Select Contact X as Customer
  * Select "Before Repair" as Invoice Method
  * Add Parts or Operations
- Confirm Repair and Create invoice
The Payment Terms of the created invoice is the default one and not the Payment Terms of Customer.

opw-2304818

closes odoo/odoo#55152

X-original-commit: 351718d5f579fca4945538c78e63aa50118af2b4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-29 14:30:21 +00:00
Swapnesh Shah 99c02a83a5 [IMP] stock: display validation properly
Before this commit, This validation message was not displayed properly. (See https://nimb.ws/zYBLvh )

Now we are displaying validation error Properly.

closes odoo/odoo#51209

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-13 18:23:51 +00:00
qsm-odooandThanh Dodeur a777da6cd3 [IMP] website: make GMap on contact us page a customize show option
Part of https://github.com/odoo/odoo/pull/49101
task-2091396

closes odoo/odoo#49101

Related: odoo/upgrade#1524
Related: odoo/design-themes#231
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Thanh Dodeur <39259739+ThanhDodeurOdoo@users.noreply.github.com>
2020-07-28 07:45:40 +00:00
Thanh Dodeur d98ee926d6 [IMP] website: allow to change GMap API key from left panel
Part of https://github.com/odoo/odoo/pull/49101
task-2091396
2020-07-28 07:45:40 +00:00
qsm-odoo 430b5b669f [IMP] website, *: move all google map options to left panel
*: web_editor

-> Introduce the we-gpspicker widget and improve the way the gmap lib
    is loaded (for Odoo / multiple snippets / ...).

Part of https://github.com/odoo/odoo/pull/49101
task-2091396
2020-07-28 07:45:40 +00:00
Thanh Dodeurandqsm-odoo 59d46b51b1 [MOV] website: move google map snippet from themes to community
Improve the base code and adapt to new website features as well.

Part of https://github.com/odoo/odoo/pull/49101
task-2091396

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-28 07:45:40 +00:00
Xavier Morel 37a7aed189 [IMP] core: allow both action & children on root node
Reported by VFE, odoo/odoo#54564 missed one of the use cases in menus:
normally a menu can have *either* sub-menus or an action (aka only
"leaf" menu items can have actions), however there's an exception for
root (application) menus: those can have an action, which is used as
the application's action, that is, what gets executed when opening the
application itself.

* root menus were already special cased (to allow a ``web_icon``),
  expand this to allow both action and submenus
* modify the alternatives -- submenu-items and menuitems with a parent
  -- so they keep the behavior of allowing *either* an action or
  children

closes odoo/odoo#55144

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-30 05:37:05 +00:00
Alexandre Kühn a647497b51 [FIX] im_livechat: missing env/owl dependencies in external lib
closes odoo/odoo#55173

X-original-commit: b24b0e29fe537baed6919f26a4b63e7f3ad37e66
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-07-29 16:42:27 +00:00
Alexandre Kühn 9ba879fc61 [FIX] im_livechat: hide 'add attachment' button in livechat
Message attachments are not yet supported in livechat for livechat
visitors, so the "Add file" button should not be visible.

closes #54927

Forward-port-of: #54972
Forward-port-of: #54957
X-original-commit: 91a548a6a7456dfd50833671a3938fcf55ed18c6
2020-07-29 16:42:26 +00:00
Christophe Simonis 92c2a54505 [FIX] timer: remove leftover file
Oversight of d6a23144d5

closes odoo/odoo#55165

X-original-commit: a8d450f2339d1e788d50455e3c5ad009155b99ee
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-07-29 15:40:21 +00:00
Dhruv Patel 246a9de7b6 [FIX] web_tour: tooltip bubble info glitch and moves to the left
When you hover on the bubble tooltip infobox then sometimes its glitch,
and moves left. once you leave the mouse over from the tooltip info then
it will be repositioned as before.

So with this commit, we have resolved this issue by giving the condition
on the repositioning of every time the _updatePosition methods execute.
If the tooltip infobox is open then we are not repositioning the box's position.
otherwise, it will be repositioned.

closes odoo/odoo#55162

Task: 2263600
X-original-commit: 1d62b9d5fbe17cb1cc33dd335cff129ce9b13570
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-29 15:39:03 +00:00
Sébastien Theys 6b06ada2c2 [FIX] mail: fix messaging locale update on translation bundle change
closes odoo/odoo#55167

X-original-commit: c3eb3f04e06cea84dd98323b6d10867dead5b953
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-29 15:41:10 +00:00
Xavier Dubuc a28f24ca3f [FIX] mail: prevent attachment delete from not authored message
task-2299330

closes odoo/odoo#55164

X-original-commit: c331b6761fbc1e8dd4d554109acab142ab02702d
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-29 15:39:56 +00:00
Xavier Dubuc 69d89218f9 [FIX] mail: fix read more/less span insertion
task-2248307

closes odoo/odoo#55163

X-original-commit: a8ea9bc98d114eef056babc0d2639eaddbcf3778
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-07-29 15:39:31 +00:00
Victor Feyens 42fc0f4910 [FIX] product_matrix: matrix edition on a new record.
Probably since recent js framework changes, when trying
to modify the matrix of a product on a new SO (not saved),
a js error was raised (wrong qweb template rendering).

This is due to a wrong check when loading the matrix data,
in the case of a new record, the data wasn't correctly updated
on all widgets, resulting in an opening of the matrix with the results
of the last matrix changes (since the information is transferred in the same field).

This commit:

* Ensures that the correct data is taken to open the matrix (solving the main
problem of matrix update on new records)
* Improves test coverage to cover untested buggy situation
* Fixes another error found while improving test coverage:
The edition of existing quantities was wrongly creating new lines, instead of updating
existing ones.  Simplify lines comparison to ensure the matrix won't generate two lines
for the same variant combination.

closes odoo/odoo#54917

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-29 13:46:46 +00:00
Julien Mougenot d3f0632f49 [FIX] web: datepicker get correct database format
Before this commit, the format used by both date and datetime picker
components depended on default props which are evaluated on module
loading. This was an issue because the "time" module did not have time
to load and fetch the correct database value, hence using the default
ones.

Now, the format is evaluated on component instantiation, giving enough
time to the "time" module to load.

Task 2307258

closes odoo/odoo#55113

X-original-commit: 792b565a65a8c9f65bf13e94f30b88913f2bfa7f
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-07-29 11:20:16 +00:00
Robin Heinz dbbf6a8731 [IMP] point_of_sale: customer flow improvement.
Improve the flow of the customer list and edit to fit better with odoo.

closes odoo/odoo#54571

Task-id: 2294251
Related: odoo/enterprise#11891
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-07-29 08:39:40 +00:00
Thibault Francois fb396a954d [FIX] hr_timesheet: Timesheet in multi company
Allow user that have a employee in a company A
and that is allowed on company A and B to timesheet
on company B

Problem:
A user have access on company A and B but is link to
an employee that belong to company A. He want to timesheet on a
project from the company B. He gets an error
"Incompatible companies on records".

Since most users are linked to only one employee that belongs
to one company. It's impossible to have consistent companies.

Solution:

The employee shouldn't be checked on the timesheet

closes odoo/odoo#55074

X-original-commit: 7eada96b8fc1c370801ff42231167885cc8e46bc
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-07-29 09:02:49 +00:00
Lucas Perais (lpe) 559a9cf018 [IMP] *: adapt some list views to the action button in controlPanel
task-2246383

closes odoo/odoo#54593

Related: odoo/enterprise#11992
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-07-29 09:11:52 +00:00
Lucas Perais (lpe) 49d9771c56 [IMP] web, base: action buttons in list's controlPanel
This commit introduces a new semantics to define action and method buttons
in the list view.
The aim of this feature is to be able to do some actions on selected records, or on the entire
records' domain with the help of buttons located in the controlPanel, much like the form view header buttons.

To define such buttons, one must add a `header` node in the list view's xml definition
```
<tree>
  <header>
    <button type="action|object" name="actionId|methodName" string="button's text" context="{}"/>
  </header>
  <field name="fieldName" />
</tree>
```

task-2246383
2020-07-29 08:59:42 +00:00
Andrea Grazioso (agr-odoo) 97cdcc05f1 [FIX] stock,sale_mrp: Inventory adjustment not possible
1) Create a stockable product > Add some quantities on hand
2) Edit this product > set it as a consumable or service
3) Create an inventory adjustment on all products

Error will raise "Something went wrong! You can only adjust storable products.

This occur because when switching product type the available quantity
was not cleared, so it will get in the next inventory, but only storable
products can have inventory. So the product should to have no
quantity left before switching type

opw-2300478

closes odoo/odoo#55062

X-original-commit: be17e31307070498ba9ac7dc594443730caa7404
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-07-28 14:40:25 +00:00
Paul Morelle 544e22f4f2 [FIX] mass_mailing: respect mail_server_id for test emails
When sending a test email for a mass mailing, it was using the default
server, ignoring the one that could have been set on the mailing object.

This commit fixes this issue, so that the way the test emails are sent
is even closer to the real process.

closes odoo/odoo#55072

X-original-commit: 6af6e4714f2ccc703e9a3189b12a2317bd6af49c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-07-28 15:43:36 +00:00