Commit Graph
143436 Commits
Author SHA1 Message Date
Laurent Smet 221e6da548 [FIX] account: Allow sharing outstanding accounts on bank journals
In the bank reconciliation widget, allow matching a payment (blue lines) owned by another bank journal as the statement line one if both journal are sharing the same outstanding account.
It implies to remove the constraint preventing such accounts sharing.

The purpose is the following.
Suppose you are working with payment acquirers generating payments on a bank journal A.
At the end of the month, the bank journal B is debited to pay the payment acquirer.
At this point, you get a statement line on journal B you need to match with payments generated on A.

closes odoo/odoo#64115

X-original-commit: 8d34e1606f930deaa148563ffd40c69457650305
Related: odoo/enterprise#15577
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-01-05 18:38:05 +00:00
Andrea Grazioso (agr-odoo) 6611628019 [FIX] base_vat: fix ABN check for Australia
The Australian equivalent of a VAT number is an ABN number.
In Australia TFN are private and not meant to be entered into
systems or publicly displayed.
ABN numbers are the public facing number that legally must be displayed
on all tax invoices and legal documents.

This fix will override the 'tfn' check done via stdnum for AU companies
with 'abn' check

opw-2415142

closes odoo/odoo#64221

X-original-commit: a72f7222c9f5987a20461be9c837e3de73801ff7
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-01-07 16:13:06 +00:00
Arnold Moyaux 161a9b8192 [FIX] repair: be able to put service on repair fees
commit 38711e9f9c prevent multi company issues.
But it goes a litle too far in restriction and prevent to put a service
in the repair fee. Which is a feature since user would like to register
and invoice human ressources in maintenance cost.

closes odoo/odoo#64033

X-original-commit: 64de68b4420eb4d82ff2130dfaa310e40775a0b7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-01-04 17:04:08 +00:00
Achraf (abz)andThibault Delavallée f5adb5b25d [FIX] mail: send notification mail with right access link when using mail.thread
PURPOSE

Notification may be sent using a generic mail.thread record, notably when
sending user notifications. In that case links to view document are
incorrect.

HOW TO REPRODUCE

Issue

    - Install "Approvals"
    - Submit new approval with you as "Request Owner"
    - Click on "View Approval Request" in your mailbox

    The link redirects to a 505 error

Cause

    The model is not the correct one and the res_id is undefined

Solution

    Specify the model and the res_id to _notify_get_action_link
    when creating the link with kwargs

SPECIFICATIONS

Propagate message value through various notification sub methods. That way
we can rely on them if model seems void.

Also limit values given as URL parameters to some white listed values.

LINKS

opw-2358846
Task ID-2379766
Followup of odoo/odoo#60998
Followup of odoo/odoo#61545
Closes odoo/odoo#63292
Closes odoo/enterprise#15585

closes odoo/odoo#64229

X-original-commit: 58bac5d242d6548d54f0163328fa64b319852e40
Related: odoo/enterprise#15634
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Achraf Ben Azzouz <abz@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2021-01-07 17:44:37 +00:00
Nicolas Galler f7ccadb353 [FIX] stock: run scheduler actions as super user
In `run_scheduler`, we are running certain functions as super user to
avoid inter company and access rights issues.  This commit adds a
`sudo()` call to the `action_assign()` call, in case some objects
related to the retrieved moves are not accessible.

In addition a commit call is moved up to apply after the
`procure_orderpoint_confirm` call (as it was, it was applied after the
`_action_assign` loop, but there is in fact already a commit in that
loop, this lead to a somewhat random behavior where the replenish rules
were sometimes rolled back and sometimes not, depending on whether the
first iteration of the loop errored out or not)

opw-2394706

closes odoo/odoo#64041

X-original-commit: 592ee14d7fe81e7e5afd23f2bbbdac344eae6060
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2021-01-04 18:39:21 +00:00
mir-odoo 57db30ba69 [IMP] website: Use nolabel on visitor country_flag on tree view.
Before, there was no support of nolabel in tree view but now we
added it.

So in this commit, Replace the empty string with nolabel True.

closes odoo/odoo#64212

Taskid: 2414124
X-original-commit: 4286f2f90258a5c1f97d42f7c2aee1e964723ca0
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-01-07 13:45:14 +00:00
qsm-odoo 089ae3d28b [IMP] web_editor: review image size display
Now the size is displayed in a badge in a better location.

Also, the size is now always displayed even if the user did not just
apply a modification (so that if the user saves then reopens edit mode
and clicks on an image, he can inspect the image size).

task-2424917

closes odoo/odoo#64036

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-07 16:17:13 +00:00
Christophe Simonis 8d5aaaa0e2 [FIX] core: check module state inconsistencies after end upgrade scripts
Some modules may be removed by the upgrade scripts with the help of the
ORM and are done in `end` scripts.
This is the case for uninstalling the themes which use the `_theme_remove`
method [1].

[1] in 12.0: https://github.com/odoo/odoo/blob/e2084a4356f63249920d8c777e92f1710be8b5a6/addons/website_theme_install/models/ir_module_module.py#L337

closes odoo/odoo#64219

X-original-commit: e5ab5410dbc006fc4bcdd21e603026483bf5d360
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Simonis <chs@odoo.com>
2021-01-07 15:24:27 +00:00
Odoo's Mergebot 448e0840e9 [MERGE] crm: reorganize convert and merge tool methods
PURPOSE

Prepare sales team membership and lead assignment improvements by
reorganizing and cleaning some code bits.

SPECIFICATIONS

Reorganize sales team tests to ease addition and modifications of tests
when adding multi-membership and lead assignment features.

Separate business methods from tool methods. It eases their discovering and
their re-use through various other methods and models. Moreover it helps
reading business oriented methods without being disturbed by tools.

Tools methods should be private by default to indicate those are not part of
official convert or merge API for leads. In this commit we make convert and
merge tool methods private, keeping only main API methods public.

LINKS

Task ID-2428882
Prepares Task ID-2086889
COM PR odoo/odoo#64196
ENT PT odoo/enterprise#15610

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-07 13:59:59 +01:00
Thibault Delavallée fff19019de [IMP] crm: make some internal methods private
PURPOSE

Prepare sales team membership and lead assignment improvements by
reorganizing and cleaning some code bits.

SPECIFICATIONS

Tools methods should be private by default to indicate those are not part of
official convert or merge API for leads. In this commit we make convert and
merge tool methods private, keeping only main API methods public.

LINKS

Task ID-2428882
Prepares Task ID-2086889
COM PR odoo/odoo#64196
ENT PT odoo/enterprise#15610
2021-01-07 11:16:28 +00:00
Thibault Delavallée 4819df905e [MOV] crm: reorganize convert / merge tool methods
PURPOSE

Prepare sales team membership and lead assignment improvements by
reorganizing and cleaning some code bits.

SPECIFICATIONS

Separate business methods from tool methods. It eases their discovering and
their re-use through various other methods and models. Moreover it helps
reading business oriented methods without being disturbed by tools.

LINKS

Task ID-2428882
Prepares Task ID-2086889
COM PR odoo/odoo#64196
ENT PT odoo/enterprise#15610
2021-01-07 11:15:47 +00:00
Thibault Delavallée 3e287843f0 [MOV] sales_team: reorganize tests
PURPOSE

Prepare sales team membership and lead assignment improvements by
reorganizing and cleaning some code bits.

SPECIFICATIONS

Reorganize sales team tests to ease addition and modifications of tests
when adding multi-membership and lead assignment features.

LINKS

Task ID-2428882
Prepares Task ID-2086889
COM PR odoo/odoo#64196
ENT PT odoo/enterprise#15610
2021-01-07 11:15:20 +00:00
Nidhi Patel d47ff19014 [IMP] project: Remove the auto_validation_kanban_state field from tree
Purpose of the task is the Automatic Kanban Status field present without
any importance in view of stages of a project.

So in this commit, we remove the auto_validation_kanban_state field from
the stages of a project.

closes odoo/odoo#63727

Taskid: 2378811
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-12-23 11:58:46 +00:00
Arnold Moyaux 72d43fdf9f [FIX] stock: scrap wrong issuficient quantity wizard
revert commit 72c36aaf90 due to commit 47219e96e1
First commit is now useless and on top of that it ignores the putaway
strategies.

opw-2412699

closes odoo/odoo#64200

X-original-commit: a8db48244f069f9f29ee1120862bdf2c03ec26dd
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-01-07 11:13:30 +00:00
Goffin Simon e131028dec [FIX] sale: Discount on re-invoicable product
Steps to reproduce the bug:

- Let's consider a re-invoicable and expensable product P at 100€
- Let's consider a pricelist PL with 20% of visible discount on every product
- Let's consider a confirmed sale order SO with PL set on it
- Create an expense E with P at 100€ and reinvoice customer set to SO
- Generate the entries of E

Bug:

A new sale order line was created with 80€ as unit price and no discount instead of
20% discount.

opw:2423147

closes odoo/odoo#64194

X-original-commit: 8815f4d9ab8620428d50abbe603c7f6c63076d6c
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-01-07 10:24:18 +00:00
Urvi Soni 1877079c3b [FIX] fleet : duplication in filter
Observed Behavior:

Open Vehicles > Contracts and going to use the filter,
there are two filters with the same name 'Archived'

This commit solves this issue and we have only one filter named 'Archived'

task - 2413755

closes odoo/odoo#64175

X-original-commit: 1ecc79992cf9842777883c7ea4ba8f477fea7b0f
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-01-06 19:06:13 +00:00
Adrien Dieudonne 81180146b7 [IMP] account: add kanban view for journal items in invoice on mobile
The list view wasn't suitable for mobile devices. It's why we added
a kanban view for the followings menus:

- Accounting/Invoicing > Customers > Invoices > Journal Items
- Accounting/Invoicing > Vendors > Bills > Journal Items
- (in debug mode) Accounting > Accounting > Journal Items
- Accounting > Journals > Sales
- Accounting > Journals > Purchases
- Accounting > Journals > Bank & Cash
- Accounting > Journals > Miscellaneous

closes odoo/odoo#64138

Task-id: 2157725
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-01-07 10:08:30 +00:00
Kevin Baptiste 9724230ea1 [FIX] google/microsoft_calendar: reset correct user account
closes odoo/odoo#64184

Taskid: 2416820
X-original-commit: 3363a264d96817eed4fa1fdaa62b238656f107e1
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-01-07 08:24:43 +00:00
Laurent Smet dc3df030f8 [FIX] account: Fix 'change_account' automatic entry wizard
Percentage is not used when change_account is selected. Then, the constraint must not be triggered in that case.

closes odoo/odoo#64112

X-original-commit: a23a47457d98aba4ec643f4422f3735d98fab2b4
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-01-05 18:18:25 +00:00
Joren Van Onder 5c113a8f50 [FIX] payment_authorize: send the full reference for s2s transactions
invoiceNumber is limited to 20 characters so if the reference in Odoo
is longer we send an incomplete reference. This makes it hard to match
up S2S payment.transactions in Odoo with their counterparts in the
Authorize.net portal.

To solve this send the full reference in the description field (which
has a max length of 255 characters [1]).

[1] https://developer.authorize.net/api/reference/index.html#payment-transactions-charge-a-customer-profile

closes odoo/odoo#64179

X-original-commit: 5504ad189f66c63b930ae5a6f5838b8478ba28ec
Signed-off-by: jorenvo <jorenvo@users.noreply.github.com>
2021-01-06 22:35:09 +00:00
Pierre Paridans 996c2eadf1 [FIX] web: qunit: always log name of failing qunit-fixture content test
Follow-up of odoo/odoo@598d036b59

closes odoo/odoo#64171

X-original-commit: b4ceaa06b2c3ca4b9a1e95dc815d18867c49fd80
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-01-06 16:58:56 +00:00
Pierre Paridans b3277372ef [FIX] web: restore post-test check for qunit-fixture elements
Disabled in odoo/odoo@b992619840
by mistake.

Also, restore the "failfast" for the QUnit tests (disabled in the same
commit...).

X-original-commit: 7f8e0fe4d2a47968bdcb136fd7e6d96a184f9eae
2021-01-06 16:58:55 +00:00
Benoit Socias 1feebf2a4d [FIX] web_editor: review public_render_template
The normal flow to render a template is now to use `render_public_asset`
which bypasses the read access rights if the user matches the groups
the view declares.

For public users, we still cannot use that as they do not have access
to calling model methods at all. The route `public_render_template` is
thus still needed, but it should use the `render_public_asset` util.

Related to task-2412544

closes odoo/odoo#64167

X-original-commit: 3fd40ba2030fef7dccf4046a932e3b3a172dc53f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-06 17:01:34 +00:00
mir-odoo fc348de003 [IMP] various: Do not allow create/open on country_id
Purpose of the task, is to prevent users from inadvertently
creation/opening countries from country_id fields.
Countries should be managed from their dedicated menu item.

so in this commit, we have set both no_open and no_create to True
so user should not update and create a country from the many2X fields.

closes odoo/odoo#63773

Taskid: 2241677
Related: odoo/enterprise#15464
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-12-24 12:51:04 +00:00
Samuel Degueldre fc089f32b0 [FIX] web_editor: DOM is not cleaned before saving custom snippets
Previously, when saving a custom snippet, the outerHTML of the snippet
was naively read directly and saved as a new custom snippet.
Unfortunately this completely bypasses all cleanup mechanisms that we
have before saving, such as stopping the public widgets, or creating
attachments for cropped or optimized images. This would result in weird
bugs, where public widgets would appear twice when dropping a custom
snippet containing one, as well as the creating a new attachment for any
image that was optimized or cropped before saving the custom snippet
every time it was dropped in the page again.

Unfortunately there is no good mechanism for an option to ask the editor
to clean the DOM without actually saving it, as a temporary measure, the
snippet-save option will instead save the whole page (which will clean
up the DOM) and save the custom snippet after the save, before
refreshing the page and reopening the editor, not unlike some theme
options.

task-2341612

closes odoo/odoo#64166

X-original-commit: 38569777935a7939182f49ca978d98f4079e8f2f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-06 15:49:34 +00:00
Julien Giannone c87dbecf54 [IMP] mail: set there is no message text in italic and text-muted
task-id:2343510

closes odoo/odoo#64148

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-01-06 12:42:04 +00:00
Nasreddin (bon) 5a23a935fe [FIX] website,website_sale: Dynamic products isn't visible if category deleted
Issue

	- Install "Ecommerce" app
	- Go to 'Shop' page and edit it
	- Add a "Dynamic Products" block
	- Click on it to edit it :
	-  Select any template
	-  Select `Desks` as product category
	-  Save
	- Go to "Website -> Configuration -> eCommerce Categories"
	- Delete the "Desks" category
	- Go back to Shop page

	Error : "Record does not exist or has been deleted".

Cause

	The search domain is looking for child categories of dataset.productCategoryId
	(who does not exist anymore in the above case).
	`child_of` do a browse() to fetch the records, and therefore generate
	an error if category not found.

Solution

	Check if dataset.productCategoryId exist before updating domain.

opw-2416231

closes odoo/odoo#64157

X-original-commit: 0de069b8ca9fb005ba5b076984f5677de25889ee
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-01-06 14:16:13 +00:00
qsm-odoo 73093edc18 [FIX] web_editor: stop showing text tools on empty oe_structure
Do not switch to text tools if the cursor is in an empty oe_structure
(to encourage using snippets there and actually avoid breaking tours
which suppose the snippet list is visible).

Part of https://github.com/odoo/odoo/pull/64088
Related to task-2352339

This commit has been merged twice as it was lost during JW revert.

closes odoo/odoo#64104

X-original-commit: 455f4ec1c5d60d1868f181075ce97a24ee6bc62e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-05 17:16:18 +00:00
qsm-odoo 0283ce986c [FIX] web_editor: prevent switching to text tools immediately
On editor start, "the cursor enters editable text" at a "random" time
thus switching immediately to text tools or not depending on the fact
text tools switching was initialized or not. We now only allow to do so
after some fixed delay after the editor is ready, to prevent any
automatic switching on editor start (which may break tours).

Part of https://github.com/odoo/odoo/pull/64088
task-2352339

This commit has been merged twice as it was lost during JW revert.

X-original-commit: 8e0efcd42b6254343aae8faf402e3d8dc630dd14
2021-01-05 17:16:18 +00:00
qsm-odoo 834e3f8f9b [IMP] base, *: remove read_template and review colorpicker template
*: web_editor, website

In stable versions, [1] was made as a fix to allow access to read
the colorpicker template for mass mailing users when they do not have
the read access right on ir.ui.view records.

This commit, for master, remove the need of using the confusing
read_template method by using render_public_asset instead (thus turning
the read into a render, which is the same for our colorpicker but might
be a change for potential custo). At the same time, this allows to
remove the read_template public method entirely.

Related to task-2412544

[1]: 8af75e00bdcda3d5ff4facd2f5f146e1d6bf79e4

closes odoo/odoo#64100

Related: odoo/enterprise#15580
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-06 09:30:13 +00:00
Jorge Pinna Puissantandwilliam-andre 27a2701ff0 [FIX] account: new journal name sequence on old journal
- Create a new sales journal;
- Start creating a new invoice using the new journal (the name/sequence
    will be editable) and before saving, change the journal to the
    old one;

Before this commit, the invoice will be on the old journal and will have
the new journal name/sequence and after validate the invoice all the new
invoices on the old journal will have the new journal name/sequence.

Now, when you change to the old journal the name of the invoice came
back to 'Draft'.

opw-2415975

closes odoo/odoo#64146

X-original-commit: 3b64640076af472b64a72c7061696772d0e118de
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: william-andre <wan@odoo.com>
2021-01-06 11:39:15 +00:00
Thibault Delavallée 1d86be9baa [FIX] crm: correctly handle won lost at create
Fix typo preventing a correct management of won/lost when creating
multiple leads in a row.

closes odoo/odoo#64149

X-original-commit: 0024b592b2d589138f34e27c724b8d471d213a4d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-06 12:24:37 +00:00
Aaron Bohy 38eac736ec [FIX] web: editable list: can unselect row
Since commit [1], it is no longer possible to unselect a row in a
one2many editable list if there is an html field in the form view.
The reason is that there is a '.modal' element (several actually)
in the DOM of the html field. This element is considered as an
opened dialog by the list renderer, which is wrong. This commit
refines the selector that determines whether there is an opened
dialog or not.

[1] 7d04ec7cca4f355295a06c1ce6f112b6cc533c87

closes odoo/odoo#64134

X-original-commit: 6be8997807e4fbfeeefe273a335d9182490d0ac5
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-01-06 10:14:44 +00:00
Ivan Yelizariev c2f703e208 [FIX] website,portal: set default lang in website
BEFORE it was mistakenly done in portal module, but ``website`` may be not available there

---

original commit https://github.com/odoo/odoo/commit/e9ef98410fa6acba165f3056d9c52f8e68cc768b
opw-2416586

closes odoo/odoo#64129

X-original-commit: 061190123dc21001aaff6b19cf9a417b390a576a
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-01-06 09:13:35 +00:00
Julien Giannone 3528672243 [IMP] mail: use mock server in tests instead of manual create
In this commit, we replaced occurences of manual creations
(using ".create") with the use of "this.data"

task-id:2336360

closes odoo/odoo#64092

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-01-06 09:39:48 +00:00
Ivan Yelizariev 4449e0a0e7 [FIX] account_check_printing: always compute "amount in words"
the field can be used in reports for any payment method

---

opw-2423290

closes odoo/odoo#64105

X-original-commit: c37afdf3e9f680cd186872e509c6ab8e47b70782
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-01-05 17:20:06 +00:00
Guewen BaconnierandRaphael Collet e14b52a56d [FIX] core: marking of stored computed recursive fields during creation
Fixes 3a6ac95 that ignores computation of recursive stored fields during
creation of records.

The problem happens when we have:

* a recursive stored computed field
* an `api.depends` of this field which is a relation to another record

When this "another record" is created and should recompute the recursive
field, it is ignored.

closes odoo/odoo#64117

X-original-commit: 9fe4fe404b73e9ab18ab6b3b913f075c64bb6954
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet (rco) <rco@openerp.com>
2021-01-05 19:09:16 +00:00
Rémy Voet (ryv) c314cb4e98 [REF] stock: clean demo data
Group demo data by models, it implies removing 3 files.

task-2373638

closes odoo/odoo#61027

Related: odoo/upgrade#1998
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-01-05 08:32:58 +00:00
Rémy Voet (ryv) 3d99024325 [REF] stock: clean data
- Remove unused `sequence_tracking`
- Group data by models when it is possible, which implies
to remove `procurement_data.xml` file (data into `stock_sequence_data`).
- Clean messing comments
- Reorder the manifest (when it is possible)

task-2373638
2021-01-05 08:32:58 +00:00
Rémy Voet (ryv) 03cc1e81a8 [REF] stock: remove useless name_get
In the model `stock.quant.package`, the `_compute_complete_name`
and the `name_get` mimics the default one (`_rec_name = "name"`).
Then remove clean it.

task-2373638
2021-01-05 08:32:58 +00:00
Rémy Voet (ryv) e292c3fb53 [REF] mrp: consumption of workorder become related
Avoid duplicate information in DB.

task-2373638
2021-01-05 08:32:58 +00:00
Rémy Voet (ryv) 4d57ce473b [REF] mrp: clean BoM operations
- make `bom_id` required. No sense to have a operation without BoM
- `company_id` of operation is now related
- Clean the multiple `allowed_operation_ids` into related
fields instead.

task-2373638
2021-01-05 08:32:58 +00:00
Rémy Voet (ryv) e4b0f75799 [REF] mrp: clean onchange of mrp.production
Avoid crappy try-except in `onchange_picking_type` and have a coherent
fallback instead.

task-2373638
2021-01-05 08:32:05 +00:00
Rémy Voet (ryv) 48f6b350a7 [REF] stock: clean onchange of stock.move
Clean onchange of `stock.move`: make it private and move in the
right place.
Also remove the action_assign_partner unused method

task-2373638
2021-01-05 08:32:05 +00:00
Rémy Voet (ryv) 515b9a78e6 [REF] stock,mrp: make picking_type_id compute store in stock.move
In order to have always a picking_type_id on a stock move (and
consistent with his parent model), make it compute store.
Then clean the call of picking_type_id without change the behavior
(/!\ `move.picking_id.picking_type_id != move.picking_type_id` because
of mrp). Fix some test where the location(_dest) was unset in moves.

Also:
- Clean the mess in the create of `stock.picking` about that
and add a onchange to keep location(_dest) consistent with moves.
- The move `description_picking` is set when the `picking_type_id`
change, not only at the create method.

task-2373638
2021-01-05 08:32:05 +00:00
fedegobea 56463c2a29 [FIX] point_of_sale: editing customers always asking to change name
Hi i detected an issue on POS, to reproduce just get into a customer on the POS UI, change something else than the name, then try to save changes, this trigger the if in line 47, making the user to mandatory edit the name field then save again and it works.

The only change on the file is on line 47 where I check if the name is already on the prop so that it works as intended.

Its a mild UX issue with a very easy fix. hope you can upload it soon to the repo so that users on Odoo SaaS or users with no code skills dont have this Issue anymore-

Best regards

closes odoo/odoo#64091

X-original-commit: 94a735ec6a9caa334eca6c4d7a4ca89bf3b5eaf9
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-01-05 14:16:10 +00:00
Sébastien Theys 828ea9c523 [FIX] auth_signup: properly grab user lang from context
Follow up on d0a4b20d36

The `lang` at this step is compared to the locale `code` (eg. fr_BE) so the
split is a mistake.

To reproduce the issue:
- change the language of a website to fr_BE only
- allow free signup
- register as a new user

Notice how the language of the user is set to en_US before this PR instead of
fr_BE as it should be.

closes #63616

closes odoo/odoo#64089

X-original-commit: ba21dadf17ba96ecbba917f666a3b385d9b9fd5e
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-01-05 14:04:21 +00:00
Mohammed Shekha 30f2a7f149 [FIX] web: fix optional dropdown hide behind listview table
before this commit: when you have o2m which has optional fields and optional
field dropdown is bigger and o2m does not have records and when you open
optional dropdown it hidden behind o2m table. The reason is optional dropdown
is child of table.

after this commit: put dropdown as child of listview.$el so it is no more child
of table so when it is opened it is displayed on top of listview table, here we
also have to calculate position of optional dropdown as it is no more child of
table element, so we have to set left position based on table width and if
language direction is rtl then dropdown width.

task-2370860
Closes #62681

closes odoo/odoo#64085

X-original-commit: a14c74d926b35dc499914edcbb7b93e638fe3bce
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-01-05 13:29:47 +00:00
Mohammed Shekha 7943c123ce [FIX] web: list: keep line when click in m2o dropdown
Before this commit, in editable list views with a many2one, when
the user clicked inside the many2one dropdown, in the padding above
the first item or below the last item, the dropdown closed itself
and the row was removed (if it wasn't dirty yet). This commit fixes
that issue by ignoring clicks at those specific spots.

Task 2377864

closes odoo/odoo#64084

X-original-commit: 2ddb8e07ab9fcce3427266247069de8546a87fb5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-01-05 13:29:19 +00:00
Ivàn Todorovich 3c1035a2b8 [FIX] Raise QWebException if 'last_path_node' is not set.
closes odoo/odoo#64074

X-original-commit: 91434c79dee96050a614642f494d7dae4d41703e
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-01-05 11:52:06 +00:00