Commit Graph
140385 Commits
Author SHA1 Message Date
Odoo's Mergebot 429765a3c3 [IMP] *: Uniformize barcode screens UI on mobile
The main goal of this task is to apply the same style used by
event_barcode.
A new button "tap to scan" is now available in some barcode
screens to use the phone camera.

Task ID: 2210396

closes odoo/odoo#50118

Related: odoo/enterprise#9616
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-07-01 13:49:53 +02:00
Romain Estievenart bd09d2acfb [IMP] hr_attendance, barcodes: extract barcode.png to barcodes
It's now possible to use this image in all modules that depend on
barcodes.

Task ID: 2210396
2020-07-01 09:28:45 +00:00
Romain Estievenart ccc243823e [IMP] pos_hr: uniformize barcode screen UI
The main goal of this commit is to apply the same style used by
event_barcode

Task ID: 2210396
2020-07-01 09:28:39 +00:00
Romain Estievenart 80bdbfda62 [IMP] hr_attendance: uniformize barcode screen UI
The main goal of this commit is to apply the same style used by
event_barcode.

Task ID: 2210396
2020-07-01 09:28:37 +00:00
Xavier Morel 3e39dcba52 [REM] sale_crm: long-dead code
odoo/odoo#42015 removed code supporting the sales/CRM dashboards which
hadn't been a thing for two years at that point.

This is doubly dead code as it's an override for the dead code which
has already been removed for a feature which hasn't existed since
2017.

Issue 2285940

closes odoo/odoo#53891

X-original-commit: 1d73a1a7c52fcc3a3ab29446b9ca3b6e4d95b451
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-01 07:02:59 +00:00
Goffin Simon 7fd7422647 [FIX] hr_attendance: All internal can modifiy hr.attendance
Steps to reproduce:

- Let's consider a user U with no access to hr.attendance
- Let's consider that U has made some check in and check out
- Log with U
- Go to your profile and on Last month

Bug:

U can modifiy manually his attendances.

opw:2279682

closes odoo/odoo#53878

X-original-commit: 53a4a95270622f3aa08136470fb627d51ed4b365
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-06-30 14:24:35 +00:00
Anh Thao Pham (pta) 359202aa18 [FIX] point_of_sale: fix closing with multiple taxes and fiscal position
- Install Accounting, Point of Sale
- Go to Accounting > Configuration > Taxes
- Create 2 taxes (e.g. Tax 15% and Tax 21%)
- Go to Accounting > Configuration > Fiscal Positions
- Create a new Fiscal Postion with the following line for Tax Mapping:
  * Tax on Product: Tax 21%
  * Tax to Apply: Tax 15%
- Go to Point of Sale > Products > Products
- Create a new Product (e.g. Test Product) with "Tax 15%" and "Tax 21%" in Customer Taxes
(Make sure that the Tax 15% is the same than the one for the "Tax to Apply" in the Fiscal Position)
- Go to Point of Sale and configure a POS:
  * Activate "Fiscal Position per Order" and choose the created Fiscal Position
  * Add Bank as Payment Method
- Start a POS session
- Search "Test Product" and add it
- Click on Tax button and select the created Fiscal Position
- Proceed to payment
- Choose Bank and validate
- Exit the POS session
- Click on "CLOSE" and "VALIDATE CLOSING & POST ENTRIES"
An error message appeared with the following message: "Cannot create unbalanced journal entry"

When closing and posting entries, an account move and account move lines are created from the session orders.
For each order lines, taxes are computed from taxes on product and fiscal position of the order.
In this case, the product has 2 taxes applied (Tax 15% and Tax 21%).
Due to the chosen Fiscal Position, the Tax 15% is applied instead of Tax 21%.
For the order line, Tax 15% is applied 2 times.
But during the account move lines generation, the original Tax 15% and the converted Tax 15% are merged together,
because they represent the same tax (same model id).
So the Tax 15% is only applied once, which results on unbalanced amounts during reconciliation.

In Sales, for the same case, the tax is only applied once.
To stay consistent with Sales behavior, the tax will also be applied once in Point of Sale.

opw-2278826

closes odoo/odoo#53880

X-original-commit: 17a9feff69ec772bf3427dda886ae122fd6c7c2c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-30 14:48:05 +00:00
Benjamin Vray 0f2cab4aeb [IMP] website: add a z-index on the header for shadow option
We need a z-index on the header to make the shadow option work properly
We also needed to increase the z-index of the popup snippet so that it
goes above the header when it is displayed.

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

closes odoo/odoo#49142

Related: odoo/design-themes#238
Related: odoo/upgrade#1432
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-30 14:19:17 +00:00
Benjamin Vrayandqsm-odoo 58179cebf1 [IMP] web, *: replace the bootstrap backdrop element with a bg on modals
*: web_editor

Do not display the backdrop element added by bootstrap in the body and
add a background on the modal to keep the same effect. The bootstrap
backdrop was probably useful for compatibility with <IE9 but is no
longer needed. This also avoids z-index issues because modals could be
opened in an element (e.g. the website #wrapwrap) whose stacking context
is different of the body one (where the backdrop is opened). This would
make the backdrop appears on top of the modal.

Part of https://github.com/odoo/odoo/pull/49142
Related to task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:17 +00:00
qsm-odoo 4341a4d795 [IMP] web: better test modal backdrop behaviors
Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:17 +00:00
Benjamin Vray 257de793ca [IMP] website_sale: add an option to always show cart
Before this commit the cart was hidden when it was empty. Now we have
added a new option to display it any time.

Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:17 +00:00
Benjamin Vrayandqsm-odoo 82cc411fc5 [IMP] website: review the labels of header/footer options
Note: the reordering will be done in upcoming days.

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:17 +00:00
Benjamin Vray 79ce38fc3f [IMP] website, *: add the possibility to hide the copyright section
*: web

Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:17 +00:00
Benjamin Vray 94835eb779 [IMP] website: add the possibility to add a header main button
Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:16 +00:00
Benjamin Vrayandqsm-odoo b43546c091 [IMP] website, *: add the possibility to hide the footer, per page
*: web

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:16 +00:00
Benjamin Vrayandqsm-odoo db951aafbe [IMP] website, *: add the possibility to hide the header
*: web_editor

General website option + page option

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:16 +00:00
Benjamin Vray 7827da3e7a [IMP] website: add the possibility to hide the logo
Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:16 +00:00
Benjamin Vray 904fea38a2 [IMP] website, *: add minor improvements on header / footer design
*: web

+ Ease edition

Part of https://github.com/odoo/odoo/pull/49142
task-2229551
2020-06-30 14:19:16 +00:00
Benjamin Vrayandqsm-odoo 5879e40445 [IMP] website, *: add new footer effect options
*: web

Part of https://github.com/odoo/odoo/pull/49142
task-2229551

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-30 14:19:16 +00:00
Martin Trigaux 400cc4f14e [FIX] *: correct all or improve code translation lookup
This commit fixes all issues detected by the new pylint
gettext-variable test.
It converts some calls to the new syntax
  _("Foo %s", bar)

to progressively migrate the code to the new syntax.

A few calls were not technically incorrect but still detected by the
linter.

  _("Foo" +
    "Bar")

has been converted to

  _("Foo"
    "Bar")

as it has the same effect and make sure the argument is of type
asteroid.Const instead of BinOp).

closes odoo/odoo#53683

Related: odoo/enterprise#11467
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-30 10:19:59 +00:00
Martin Trigaux 241f06d868 [ADD] test_lint: add test to detect bad usages of _
More often than it should, translations calls are made using
  _("Foo %s" % bar)

instead of
  _("Foo %s") % bar

or the even better (but more recent)
  _("Foo %s", bar)

The issue of using the first writing is that the translation lookup
won't work at the execution (looking for ir.translation for src "Foo
Alice", "Foo Bob",... instead of "Foo %s").

Add a pylint test to ensure this won't happen anymore
2020-06-30 10:19:59 +00:00
Martin Trigaux 110263df56 [IMP] tools: use same syntax for _lt than _
A new gettext syntax was added at odoo/odoo#52155 but only for _, not
for _lt
Allow to have the same syntax
2020-06-30 10:19:50 +00:00
Martin Trigaux d12813f7ee [IMP] tools: fallback on empty translation
Avoid returning False if, for any reason, the return is falsy (False,
None,...)

Following the discussion in odoo/odoo#53254, the root cause was a call in the form
  _(foo)

where foo was equal False

While nothing else than a string should be the argument of _, it's
still technically possible to pass something else and get a bad return
value.
Fallback on empty string to be consistent.
2020-06-30 08:53:29 +00:00
Didier (did) 8add388db6 [IMP] Full Story Misc Usability improvements
Hide sections "Account Properties" & "Account Stock Properties" if the inventory
valuation (property_valuation) is set to manual.

task-2232026

closes odoo/odoo#52351

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-29 11:21:26 +00:00
Sébastien Geelen (sge) 6d93c72564 [IMP] base : improve messages text in access_error pop-ups
* Improve layout of access error messages from group restriction
 * Improve layout of access error messages from security records rules
 * Use the error title in the js crash manager when possible
 * adapt unit tests

closes odoo/odoo#50369

Taskid: 2206787
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-30 13:59:23 +00:00
Vishnu Thuletiya d24758db56 [IMP] sale: Change the label in SO mail while transaction is pending
Currently, when the payment is done by the wire transfer or by sepa
then the transaction is going to be in the 'pending' state and due
to that confirmation mail will display the button as
'Sign and Pay Quotation' but is should be the 'view quotation'.

So in this commit we check for the last transaction and if transaction
status is 'pending' then display the 'View Quatation' instead of
'Sign and Pay Quatation'.

We have not modified method has_to_be_paid because it's used to display
the button on portal so still it will display the 'Sign and Pay' on portal.

closes odoo/odoo#49389

Taskid: 2210990
Closes: #49389
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-15 08:46:04 +00:00
Andrea Grazioso (agr-odoo) 4ca452aacf [FIX] mrp: fix BoM Structure & Cost Report print
Create some attributes with "create dynamically" set
Create a product template using these attributes (=> product variants
should not be created)
Set this product as manufactured, and create an associated BOM with some
components
Try to print the BOM

User will face a traceback due to the product_id being non existant

opw-2283649

closes odoo/odoo#53872

X-original-commit: 4d77ada68fb4d8113a5fbf95f20ccb49d0611fc5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-30 12:51:08 +00:00
Bruno Boi 647e3d34b8 [IMP] web: prevent modal titles to overflow…
…by breaking words.

closes odoo/odoo#52727

Taskid: 2253703
Related: odoo/enterprise#10947
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-30 09:35:56 +00:00
Xavier Dubuc a6e7833a7d [FIX] mail: fix activity directly mark as done display
task-2280174

closes odoo/odoo#53863

X-original-commit: 2638d32db686ef1906c2b2b45d3e9276fe831e52
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-30 11:09:35 +00:00
Nasreddin (bon) b033244f99 [FIX] hr_expense: Fix accounting fields edition + add test
This fix will complete the task 1965890 by allowing the user with
access rights to edit fields (reference, account_id, taxes_ids
& analytic_account_id) depending the sheet state.

Also added Tests to check if access rights on expense lines are
working well depending on the expense.sheet.state and the user group.

Task ID 2226352

closes odoo/odoo#53862

X-original-commit: f42c812916a50438078210c020f6144c7417d365
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-06-30 11:09:14 +00:00
Nicolas Martinelli f3f07434f6 [FIX] point_of_sale, pos_discount: install discount when session open
Commit 4c4adf472453de65e45e fixed the `pos_discount` installation in
case of a session is already opened. However, this breaks the following
condition:

https://github.com/odoo/odoo/blob/8aa952d18acca5a0ac3b32579e812158e641c13c/addons/point_of_sale/views/point_of_sale_dashboard.xml#L67

The `current_session_id` is always filled in for any user, so the badge
is not shown anymore.

We can keep the same logic than the mentioned commit but without
impacting the computation of `current_session_id`.

closes odoo/odoo#53412

closes odoo/odoo#53858

X-original-commit: 7e0e89cbf5d09c106936a582e27af527535103f6
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-30 10:18:22 +00:00
Nicolas Martinelli b2c4c43015 [FIX] point_of_sale: resume session
- Create a new POS session with User A
- Make an order
- Logout and connect as User B
- Resume the session

The session cannot be resumed and the user is redirected to the POS
Dashboard.

When searching for a session to resume, the search restricts the user to
the current user. Therefore, no session is found.

If no session is found, we search on sessions corresponding to the given
configuration. The configuration is mandatory to avoid being redirected
to a random session.

opw-2274973

X-original-commit: 2deb94aa9da821455374df5602e2d30c5befcdec
2020-06-30 10:18:22 +00:00
Mathieu Duckerts-Antoine 141aaa2db1 [FIX] web: renderers with a pie chart can reload
The on_attach_callback methods on the widgets (comming from a tag
'widget') of a form renderer were not called at an appropriate time.
They were not called at all or called before the widgets were actually
in the dom. This was made manifest in the dashboards that generally use
pie charts widgets. Each time a pie chart widget is renderered,
a new canvas with a unique id is created. The above mentioned problem
explains why Chart.js was not able to acquire the canvas contexts: they
are obtained by looking for a specific id in the dom.

The present commit fixes that problem by doing in the class FormRenderer
what was already done correctly in the child class DashboardRenderer and
remove the unapropriate calls to on_attach_callback in _renderWidget.

Task ID: 2278717

closes odoo/odoo#53853

X-original-commit: 7641c7074616b4375f1eb4f1fcb5a96e2ed39f94
Related: odoo/enterprise#11537
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-30 09:12:11 +00:00
Leo Tran a80ace5654 [CLA] Viindoo signs Odoo's CCLA
Done at odoo/odoo#53561

closes odoo/odoo#53852

X-original-commit: e4bef56cbbda3eba3d6171132948b74e0dd3ae90
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-30 09:10:13 +00:00
Julien Mougenot c96de07f85 [FIX] web: Allow default favorite filter over search default
Before this commit, when a search_default on a many2one field tried to
update its label after a name_get, the value was set on its initial
associated query element which could have been erased by a default
favorite.

Now, the model determines whether there is a default favorite before
processing default filters, preventing any unnecessary RPC.

closes odoo/odoo#53840

X-original-commit: ff834d0ba6f9b7eadc23c28dbbf892eba2058583
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-30 07:22:12 +00:00
Aurélien (avd) 7e5ae026fd [FIX] hr_expense: Apply miscellaneous fixes
closes odoo/odoo#53834

Taskid: 2229597
X-original-commit: cc125a1fe850941a7bf1cec2cd0392fdf025a60a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-29 18:51:25 +00:00
Andrea Grazioso (agr-odoo) 58b3dc6a35 [FIX] repair: add shipping info to invoice
- Create a repair order
- Choose a customer A
- Change the invoicing address to customer B > set default
- Create invoice

The delivery address set on the repair order is not taken into account
on the invoice. The delivery address field on the invoice stays empty
despite having a delivery address set up on the repair order.

opw-2285659

closes odoo/odoo#53831

X-original-commit: e109faec5f1e14864addfb1eb56c508ab04f6eb0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-29 16:01:03 +00:00
Xavier Dubuc 65c71a5a7a [FIX] web: fix do-action handler so it calls web_client do_action
The do-action handler added was calling directly doAction method of
action_manager which lead to an issue in enterprise as the override
taking care of closing home menu in web_enterprise/do_action was no
more called. This commit fixes that by calling the do_action method of
abstract_web_client and thus the override to be executed.

Originally detected in task-2282273

closes odoo/odoo#53836

X-original-commit: 7949baf08b7e07cb5f25f1a42b4eb12ed3a65a64
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-29 18:52:11 +00:00
Hardik PrajapatiandMohammed Shekha c3080e54ed [FIX] web: update action on archive/unarchive
Before this commit, when archiving a record through the action
menu, the 'Archive' link was not updated to 'Unarchive' and same
when unarchive was clicked, the link was not updated to 'Archive'.

After this commit, when archiving a record through the action menu,
the 'Archive' link is updated to 'Unarchive', same way when
unarchiving a record link is updated to 'Archive'.

This commit also introduces a new prop 'closeOnSelected' to the
Dropdown component, to specify whether the dropdown should be
closed when an item is selected, and makes Action Menu dropdown
closed on item selected.

task-2251739

closes odoo/odoo#53835

X-original-commit: dc5d02ade7747c74c31566c74932ef45c30e9356
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-06-29 18:51:47 +00:00
Nasreddin (bon) 499a649b16 [FIX] sale: Duplicating a Sales Order with Custom Attributes
Issue

	- Turn on Sales Product Configurator
	- Create a product template with an attribute and an attribute value defined as "is custom".
	- Create a new quote, add the template, and configure the product, entering a custom value.
	- Save.
	- Duplicate the Quote

	Custom value missing.

Cause

	Custom value (field product_custom_attribute_value_ids) not duplicated.

Solution

	Add attribute 'copy=True' to field product_custom_attribute_value_ids.

opw-2279933

closes odoo/odoo#53827

X-original-commit: 0ca092361819bb198c87ca6772ec0e93a2158018
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-06-29 15:37:29 +00:00
jvm-odoo 9b2c05742d [FIX] payment_stripe: fix can pay a cancelled order
Issue

	- Install eCommerce, Stripe
	- Setup stripe for testing
	- Order something
	- Open stripe payment interface (not with odoo)
	- Go back with the stripe interface button

	Order Cancelled

	- Go back with browser back button
	- Enter your data

	Can pay but order still cancelled so
	you paid for nothing

Cause

	I fixed a linked error in
	b8b9a04ff5b5b2ba40b26632

	but I didn't mind that we should cancel
	the stripe payment intent too

Solution

	Cancel the stripe payment intent so that
	filling the stripe form by following
	those step will returns an error from
	stripe

OPW-2282946

closes odoo/odoo#53819

X-original-commit: 5acb2a649a2f2490725283c7f4cff5a5183d8ed0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-06-29 14:38:56 +00:00
Laurent Smet 45138611bc [FIX] account: Fix shared fields between payments/journal entries
Fields that are shared between account.payment & account.move models are badly set when creating the records.
For example, 'partner_bank_id' in vals will be set on account.payment but not on the account.move.

closes odoo/odoo#53832

X-original-commit: a23c1e30c5b6b28f25c5f76d9fb85f075433b18f
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-06-29 17:00:25 +00:00
Xavier Morel 75f2984834 [REM] base: precision() override on ir.qweb.field.float
Code's been dead since 3407fb70e4
essentially inlined its behaviour into the base class.

closes odoo/odoo#53774

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-29 06:16:01 +00:00
Yannick Tivisse 7d281b3f7f [FIX] hr: Don't link another menu_id when lauching an onboarding plan
closes odoo/odoo#53814

Taskid: 2219194
X-original-commit: 2050bd95bf6773f0fd3174d13843f763641e00ab
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-29 14:07:00 +00:00
yhu-odoo 0f80e69b8d [IMP] purchase(_stock): track qty_received in chatter
Track the change of qty_received of POL in the chatter of PO.

Task 2265912
PR #52809

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-06-29 13:27:24 +00:00
yhu-odoo 78a860fe86 [IMP] purchase: update tour message
Improved some message.

Task 2265912
PR #52809
2020-06-29 13:27:24 +00:00
yhu-odoo 70cb328588 [IMP] purchase: show toaster when send reminder preview
Show toast message to notify the user when he send the reminder preview
to himself.

Task 2265912
PR #52809
2020-06-29 13:27:24 +00:00
yhu-odoo 0d3d26aca1 [IMP] purchase(_stock): portal update scheduled date
1. Show only date not datetime on update portal. When update the
scheduled date, set it to be the last minute of that date.
2. Send updated date immediately when user pick a date.
3. If an activity for update the date already exist, update the
note instead of creating a new one.

Task #2265912
PR 52809
2020-06-29 13:27:17 +00:00
Rémi Rahir 687a845cdb [FIX] snailmail: fix error translations
The string formating was called inside _() which does not work.

closes odoo/odoo#53781

X-original-commit: aef420570ca153da34796a80d3e22193f17c2cf0
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2020-06-29 12:09:25 +00:00
Kevin Baptiste c8d496382f [IMP] resource: hide start/end date on resource attendance
This commit sets the fields date_from and date_to as optional hidden on
the resource.calendar.attendace.

closes odoo/odoo#51527

Taskid: 2241686
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-29 11:53:57 +00:00