Commit Graph
131548 Commits
Author SHA1 Message Date
svs-odoo c5fbb9cc23 [IMP] web: add widget signature
Adding a new widget to display a sign button in the form view.

task-1878607
2019-10-28 10:46:06 +00:00
svs-odoo 49b5f30202 [MOV] web: signature_dialog
Remove SignatureDialog from `signature.js` to put it in its own file,
`signature_dialog.js`. The purpose of this change is to be able to
require SignatureDialog in any other file and to separate dialog and
field business.

task-1878607
2019-10-28 10:46:06 +00:00
Hetashree Chauhan 3116191e78 [IMP] mrp: log activity on parent manufacturing order.
Before commit: - If there are multi level production order,
and user cancelled any one then,
there is no activity logged on related production order.

After this commit: - In multi level production order
(i.e. one production order creates another production order
to consume the raw material)
 if user cancelled raw material production order then,
exception will be generated on main production order,
so that user can easily get the idea that
raw material for this production order is not available.

[ADD] sale_mrp: add testcase for cancellation of the multilevel production orders

task-1819526.

closes odoo/odoo#28708

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-28 10:30:29 +00:00
Joseph Caburnay 2bc65e9052 [FIX] base: residue after making res_name a non-stored field
res_name is made non-stored in 8fffe89b0481af057fd6908a52af775578b9fce1
but the groupby filter using the field is not. The filter has to be
removed as well because groupby only works with stored fields.

closes odoo/odoo#39396

X-original-commit: 495124497c733b4bb272fb0d65e132b024a99917
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-25 16:08:50 +00:00
Joseph Caburnay 84a981dc9c [FIX] point_of_sale: no read access to bank statement
When installing point_of_sale, the admin user only belongs to
group_account_invoice and not on group_account_user. Because of this,
the record rule define in point_of_sale that allows access to
account.bank.statement and account.bank.statement.line models does not
work as intended. This commit now allows read access to the said account
models.

Task-id: 2083597
X-original-commit: b521605c166ba03079bc15899a7dc3129326c98c
2019-10-25 16:08:50 +00:00
svs-odoo b95651f681 [FIX] product_expiry: quant expiry search filter
Before this commit, the "Expiration Alerts" search filter for quant
return a traceback because it tries to render hours/minutes/seconds but
there aren't supported. This fix just removes them.

closes odoo/odoo#39416

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-28 08:59:34 +00:00
Aurélien Warnon aa53ba02fe [FIX] website_slides: fix course_member tour rating step
The last step of the 'course_member' test tour adds a new rating on the course.
This commit improves the test by actually checking the rating is added.

At the same time, we fix a potential build error caused by the fact that the test was closed
potentially before finishing the rating request.

Task#2091810

closes odoo/odoo#39393

X-original-commit: e26e99fae06d49f83ed2bfc9927dc60ec1af3b83
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2019-10-25 15:24:25 +00:00
Katherine Zaoral e32e73dbbe [ADD] l10n_ar: add new CUIT number to Reponsable Inscripto demo company
closes odoo/odoo#39394

X-original-commit: dc3025da4d176d8270d12849b286bf788e78b22f
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-25 15:24:44 +00:00
qsm-odoo 118bff26dc [FIX] website, *: restore website js loading
* web_editor

Commit https://github.com/odoo/odoo/commit/7e2b0ebe7996c9fa35f75949b7fc8cd5a58d7c36
broke the website JS loading as it added a dependency to a lazy loaded
JS module which was not even always lazy loaded.

A test so that this does not happens anymore will be made in another
commit.

Related to task-2092386

closes odoo/odoo#39391

X-original-commit: 5ac269d722f9ff8c206215dd1c07b8544cfd5382
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-25 14:40:53 +00:00
Victor Feyens f09e7fbaa8 [IMP] doc: build a module links
closes odoo/odoo#39395

X-original-commit: af66df3337e3a5cbf3cb7b7832460f0af1d97cc7
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-25 15:25:01 +00:00
Victor Feyens 5eec683183 [IMP] doc: guidelines references + minor corrections
X-original-commit: c83e999c6a8b16f78dfd9f944936439a53d2b52f
2019-10-25 15:25:01 +00:00
Victor Feyens 1b87271106 [IMP] doc: controllers organisation + minor correction
X-original-commit: c58751f21b49173cb51afd9ff2f01077f7610fb5
2019-10-25 15:25:00 +00:00
Victor Feyens 3917aa5fa2 [IMP] doc: views column_invisible info
X-original-commit: 82a90aa23c3d64b2d2e0cfa9d545b34fb33ec337
2019-10-25 15:25:00 +00:00
Victor Feyens 74a5b93fc3 [REM] doc: views business guidelines
Old outdated Odoo screenshots, and UI guidelines have no worth in the doc...

X-original-commit: c260f4af275d2b5b745f97274a7571bd1211eb0e
2019-10-25 15:25:00 +00:00
svs-odoo 1455e130c9 [IMP] mrp_product_expiry: wo confirmation
With product_expiry, when a workorder is done, we check if there is
expired lot in components. If it is, we ask confirmation to the user.

Task #1938656

closes odoo/odoo#36680

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-25 13:50:37 +00:00
svs-odoo a953898837 [ADD] mrp_product_expiry: confirmation wizard
When user produces for a Manufacturing Order, if he/she uses an expired
component, a confirmation wizard will ask if he/she really wants to use
this component.

Task #1938656
2019-10-25 13:50:37 +00:00
svs-odoo 7d7b902eac [IMP] product_expiry: change expiry alert compute
The production lot expiry alert was based on the field `alert_date`.
Now, it will be based on the field `life_date` since if user set only
one field, there is more chance this field will be filled but the field
`alert_date` will not.

Task #1938656
2019-10-25 13:50:37 +00:00
svs-odoo adbfb968da [IMP] product_expiry: add expiry date in lot ZPL
Adds "Best before date" and "Expiration Date" on LN/SN ZPL print format.

Task #1938656
2019-10-25 13:50:37 +00:00
svs-odoo 197ef3ea68 [IMP] product_expiry: expired wizard confirmation
When user tries to validate a picking with expired production lot,
displays a wizard for the confirmation popup. This wizard shows which
lots are expired.

Task #1938656
2019-10-25 13:50:37 +00:00
svs-odoo f30b17b0cd [IMP] product_expiry,stock: expiry date in lot report
Adds "Best before date" and "Expiration Date" on LN/SN pdf report.

Task #1938656
2019-10-25 13:50:36 +00:00
svs-odoo decef03acf [IMP] product_expiry,stock: expiration_date at receipt
User can now define the lot's field `expiration_date` when he/she
receipts a tracked product using the expiration dates.

Task #1938656
2019-10-25 13:50:36 +00:00
svs-odoo 69957aec9b [IMP] product_expiry: add expiration search filter
Adds a search filter on quant list for expired lot.

Task #1938656
2019-10-25 13:36:47 +00:00
svs-odoo 8cec00f90d [IMP] product_expiry: add removal_date on quant list
Sets quant lines in red if removal date has been exceeded.

Task #1938656
2019-10-25 13:36:47 +00:00
svs-odoo 9559bf90a8 [IMP] product_expiry: onchange on production_lot dates
Computes production_lot date fields when the user manually changes the
`life_date` field.

Task #1938656
2019-10-25 13:36:47 +00:00
svs-odoo ca06bfaf4f [IMP] product_expiry: visual changes
Changes the label and tooltip of expiration date related fields.

Task #1938656
2019-10-25 13:20:38 +00:00
svs-odoo 287f56c5c9 [IMP] product_expiry: add use_expiration_date
Adds new product field, `use_expiration_date`, to know if user wants to
use expiration date on product. Only accessible when product is tracked.

Also, changes fields' name:
    - product.template:     life_time becomes expiration_time
    - stock.production.lot: life_date becomes expiration_date

Task #1938656
2019-10-25 13:20:38 +00:00
wan bd5c6d6ff0 [IMP] account: avoid draft entries for closed fiscal years
Task 2076182
It makes no sense to allow creating draft entries for closed periods as it will never be allowed to post them! Directly warn the user seems smart.

At the same time, we should be able to duplicate entries from closed fiscal years without any errors. So, if we duplicate an entry from a closed period, we should replace the accounting date by the first "open" accounting date.

In order to keep the audit trails, we should keep the history in the chatter.

closes odoo/odoo#38699

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-10-22 07:55:14 +00:00
wan 045e0c0a26 [IMP] account: Control Access: Journals that can be allowed by accounts
Task 2074811

Allow to specify on an account the journals that can be allowed

Example of use case :
* I create an IFRS journal and some specific IFRS accounts
* I want to make sure that the accounts I configured for the IFRS are
  only use to make entries in the IFRS journal

In this commit we also prevent from changing the configuration of a
journal if there are account.move.line that should not have been allowed
to be created with the new configuration.

closes odoo/odoo#38255

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-10-22 07:44:14 +00:00
Katherine Zaoral 07377d5700 [FIX] l10n_ar: mispelling error was throwing error when consulting environment company
closes odoo/odoo#39383

X-original-commit: eb90607b3470274d37c8542b2dafc636b4c6cf1c
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-25 12:49:59 +00:00
jvm-odoo d8c477572f [FIX] payment_transfer: fix wire transfer when amount total is 0
In e-commerce module, when you have a free product and 2 delivery
methods:
    - Free
    - Any delivery method with a fixed price

When you confirm your cart, you have to choose a payment method.

If you select "free delivery" and "wire transfer":

Before this commit:

    - You get an internal server error

After this commit:

    - You are redirected to the wire transfer confirmation

OPW-2083778

closes odoo/odoo#39328

X-original-commit: c87398ac1e6c49555a1e34ebf4e0ec714baa9ff3
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-24 11:19:47 +00:00
fw-bot 9e7e96c804 [FIX] maintenance: don't copy stage
When duplicating maintenance request, the stage should be reset to the
first one (which is +/- what the default does).

Fixes odoo/odoo#38558

closes odoo/odoo#39327

X-original-commit: 14642826601070960fdd79ebd74ebd407e00617c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-24 11:18:30 +00:00
jvm-odooandodony 67bc68dfd3 [FIX] hr_holidays: fix leaves types order
In the leaves app, you can create an allocation request where you can
select a leave type.

Before this commit:

    - The leaves type order is not correct when you have a lot of them.
      You should have your remaining leaves on the top of the list.

      When you click on search more, the order is correct.

After this commit:

    - The leaves type order is correct.

Odony's comment: Leave types are reordered after each search(), based on
some context-dependent, non-stored conditions. The problem is that the
initial search() applies the given *limit*, so the "post-sort" will only
sort a limited number of random result from the initial search,
rather than all types matching the domain.

If you have more than 7 leaves types matching the domain, you have a
chance that the m2o auto-completion on the leave request form will not
suggest the correct leave types, because the post-sort will not even
receive them. So you may not see a leave type for which you have
remaining leaves!

OPW-2089593

closes odoo/odoo#39372

X-original-commit: 04e85efb82f257c01ea056c759eb1b2cec078188
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: odony <odo@odoo.com>
2019-10-25 10:34:40 +00:00
Nathan Perry b4e3635b9a [CLA] signature for servel333
closes odoo/odoo#39348

X-original-commit: 7ae417a935388a64c0ce94c611b85fae52f0dcc9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-24 14:27:31 +00:00
Richard Mathot cc26791880 [FIX] base: symbol for Tanzanian Shilling
Ref: https://en.wikipedia.org/wiki/Tanzanian_shilling

opw-2091857

closes odoo/odoo#39288

X-original-commit: 4dbe922a2a4c960f8a0ea234d3a67c0479397f4e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-23 17:43:24 +00:00
Goffin Simon 7dd24ec90b [FIX] iap, partner_autocomplete: Autocomplete without IAP account token
Steps to reproduce the bug:
- Go to Settings > Technical > IAP account >
- Remove the access token
- Go to Contact
- Try to create a company called 'Proximus' and click on the autocomplete

Bug:

A traceback was raised because the IAP account token was not set.

opw:2087607

closes odoo/odoo#39099

X-original-commit: bc6357f0b95d354afa602eecce24a3c265819101
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-21 09:08:27 +00:00
Nicolas Martinelli fe6b351e04 [FIX] mrp_account: access to BOM
- Install MRP and Accounting
- Create a user with only 'Billing' as access right
- Create a customer invoice
- Add a line, type some text (e.g. 'desk'), then click on 'Search
  more...'

An `AccessError` is raised.

It arises because of this:

https://github.com/odoo/odoo/blob/e2d7cf7898704c82f25556b0b0edb87c05ec5903/addons/mrp/models/product.py#L112

The user has no access to `mrp.bom`, leading to the error.

Since the user has access to stock moves and pickings (thanks to the
rules `access_stock_picking_invoicing_payments` and
`access_stock_move_invoicing_payments`, it makes sense to give him
access to `mrp.bom` and `mrp.bom.line`. Moreover, adding a `sudo` on the
mentioned line could cause issues since `_bom_find` performs a search
which is company dependent.

opw-2089556

closes odoo/odoo#39365

X-original-commit: 59ea1993bc5ddb66675bfc2bff70a626cd14b645
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-25 07:33:12 +00:00
fja-odoo c86d37c755 [FIX] web_editor, *: fix the theme colorpicker
*: website

Inherited colorpicker were not used due to the context missing the
website_id and the method call being used instead of call_kw.

task-2092386

closes odoo/odoo#39357

X-original-commit: 7e2b0ebe7996c9fa35f75949b7fc8cd5a58d7c36
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-24 17:20:59 +00:00
Odoo's Mergebot 4ded923bb7 [MERGE] stock: picking: button_validate multi
preliminary work for
- task 1938108 (which is adding a pre action done wizard)
- task 1938656 (which is adding another pre action done wizard)
- task 2069646 (which will rework all pre action done wizard to select to pickings to apply)

closes odoo/odoo#39318

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-25 11:30:49 +02:00
Simon Lejeune 9823170f51 [REF] *: adapt tests to picking button_validate multi 2019-10-25 08:10:40 +00:00
Simon Lejeune f1972c2130 [REF] stock_picking_batch: use picking button_validate multi 2019-10-25 08:10:40 +00:00
Simon Lejeune 6ab4b0d496 [REF] stock: make picking button_validate multi
So we have to adapt
- the sanity checks
- the immediate/backorder wizards
- split the call to _action_done with and without backorder

This is a preliminary work to remove all the override in
stock_picking_batch and to allow choosing the pickings to immediate or
backorder directly in the wizards.

Before this commit, both wizards were calling _action_done and one
another. We make them go back through `button_validate` so that it is
more sane to handle and allow future extensions to add pre-action done
wizards.

Also the first part of button_validate is some sanity check. We adapt
them to be multi (inside of a loop over self) without any other
changes.

Now the wizard can work on the records (immediate: write the done
quantities) or work with the context (backorder: picking ids to not
backorder in the context).

Also we adapt the stock sms weird wizard (a confirmation wizard but the
feature is auto installed? wth). Now there it isn't manually called in
the middle of button_validate but it uses the pre_action_done_hook.

task-2069646
2019-10-25 08:10:40 +00:00
qsm-odoo 34cbf64966 [FIX] sale_coupon: fix concurrent update on cart
Shop page link and popover use the same route which make a write on db
to recompute coupon lines. Can lead to concurent updates if unlucky on
timing.

closes odoo/odoo#39356

X-original-commit: 14253c412be8078290e808fe255c746afa79cc9c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-24 16:38:31 +00:00
qsm-odoo 6f76b9a6ca [FIX] website_sale: fix concurrent update on cart
shop page link and popover use the same route which make a write on db
to recompute coupon lines. Can lead to concurent updates if unlucky on
timing.

task-2070507

X-original-commit: f7c64081f6a41884ddea2a914d48d91750e48d41
2019-10-24 16:38:30 +00:00
fw-bot cddddf0078 [FIX] mail: avoid raising errors during uninstall
Raising a python error cannot stop an uninstall, however since the
unlink stops early, the calls to super() are never reached, this
prevents the deletion of module-related data and leaves crap in the
database, not to mention that it potentially prevents the reinstallation
of a module because of duplicate data with unique IDs, which is the case
for mail.

With this patch, we let the registry delete everything related to the
mail module when uninstalling, which allows for its reinstallation.

Fixes #25138

closes odoo/odoo#39347

Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2019-10-25 06:51:54 +00:00
Julien Giannone f507df510a [IMP] livechat: add settings to set livechat colors
This commit allow users to set up different colors for both
the live chat button for website visitors and the chat window
once the live chat button has been clicked. For both, the header
background color and the text color can be set up.

Task-Id 2030383

closes odoo/odoo#35843

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-10-24 14:50:54 +00:00
Nans Lefebvre 4dcae232f3 [FIX] fields, test_translate: multilanguage without en_US
Before, en_US was almost always the default in case of 'no language'.
Now, that should be superseded by lang=None;
yet still, en_US plays the role of source language.

In a multilanguage database where en_US was not installed,
writing a translation with lang=None would crash.
This could prevent module installation.

A test is added to cover that case.

In the case where we write a record with lang=None, the source is the
same as the record; in that case the cache contains the value for the
field.name under the context keys en_US and None, so we need to
invalidate the cache to avoid getting back the old value.

co-authored with mart-e

opw 2088487
opw 2083710

closes odoo/odoo#39130

X-original-commit: 1a5a999c2dd69c9a6a2dacb59e8bf45b09c6bc13
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-10-21 14:31:10 +00:00
Victor Feyens 84a89e1e1e [FIX] account: always restrict fiscal position search on one company.
closes odoo/odoo#39274

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-24 17:12:16 +00:00
Victor Feyens 9639283a81 [FIX] sale,account,purchase_requisition: multi-company
Use correct company to get fiscal positions and properties

Ensure company used to fetch fiscal positions is always the correct one
when coming from a company restricted model (company_id required, or
related.required).

purchase: get_fiscal_position doesn't consider company_id ctxt key

others: properties were accessed with potentially the wrong company.
2019-10-24 17:12:16 +00:00
Victor Feyens f0d5c0b32d [IMP] base: test multi-company behavior. 2019-10-24 17:12:16 +00:00
Victor FeyensandRaphael Collet f76c5a8bbd [IMP] ORM: do not allow invalid allowed_company_ids context key.
Since https://github.com/odoo/odoo/commit/a5b6f31cf28e5381e1c85f66730bcdb55998e643,
the current companies of the user are saved in the context as "allowed_company_ids"
context key.

In case of invalid context content, the api was computing the intersection
between the context content and the user company(ies) and falling back on user
company_id(s) when catching an error.

A sanity check was done, but no feedback was given to the user,
saying that the context change was falsy.

This commits changes this behavior to :

* raise an AccessError when trying to access self.env.company(ies) when
invalid or unauthorized companies are defined in the context.

* take sudo mode into consideration, allowing inter-company impacts,
even when current user doesn't have access to a given company,
if the code is done in a sudoed environment.

Co-Authored-By: Raphael Collet <rco@odoo.com>
2019-10-24 17:12:16 +00:00