Commit Graph
143436 Commits
Author SHA1 Message Date
Victor FeyensandAntoine Vandevenne 0cefdf9d87 [REM] core: remove test_documentation_examples module
The only purpose of the module `test_documentation_examples` is to test
a few of the code examples shown in the developer documentation.

As d4ba3117524 removes the documentation sources from the repository,
the test module is removed as well.

DOC PR: https://github.com/odoo/documentation-user/pull/945

task-2352371

closes odoo/odoo#70256

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Victor Feyens <vfe@odoo.com>
Co-authored-by: Antoine Vandevenne <anv@odoo.com>
2021-05-04 08:25:33 +00:00
Victor FeyensandAntoine Vandevenne 609082da2f [MOV] doc: move documentation to a dedicated repository
In odoo/documentation-user#945, the developer documentation is merged
with the user documentation in a single repository and build config.

This commit then removes source files for the developer documentation
from the odoo/odoo repository.

DOC PR: https://github.com/odoo/documentation-user/pull/945

task-2351938
task-2352371
task-2205684
task-2352544

Co-authored-by: Victor Feyens <vfe@odoo.com>
Co-authored-by: Antoine Vandevenne <anv@odoo.com>
2021-05-04 08:25:12 +00:00
Achraf (abz) 40204d6575 [FIX] mail: Allow to navigate quickly among the different attachments
What are the steps to reproduce your issue ?

    1. Create a record and add two attachments
    2. Navigate quickly between these attachments

What is currently happening ?

    Traceback
    TypeError: Cannot read property 'complete' of undefined
        at AttachmentViewer._handleImageLoad (https://www.odoo.com/mail/static/src/components/attachment_viewer/attachment_viewer.js:163:20)

opw-2521901

closes odoo/odoo#70334

X-original-commit: 2b3ad9bfa9459b8e39d769afa8fa61ceef925c75
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-05-04 13:28:14 +00:00
Adrien Widart 0d32ed45ae [FIX] survey: allow to modify a completed survey
Updating a completed survey will raise an error with a traceback.

To reproduce the error:
(Use demo data)
1. Survey > Participations
2. Select a completed form
3. Change one answer, Save

Error: A traceback appears "[...] ValueError: Computing score requires a
question in arguments."

Here is an extract from the method concerned:
```python
@api.model
def _get_answer_score_values(self, vals, compute_speed_score=True):
    """
        [...]
    """
    user_input_id = vals.get('user_input_id')
    answer_type = vals.get('answer_type')
    question_id = vals.get('question_id')
    if not question_id:
        raise ValueError(_('Computing score requires a question in
arguments.'))
```
This method needs some information to work properly.

OPW-2488974

closes odoo/odoo#70328

X-original-commit: 62cd2c0be63738f0bbefd62de5d025990e63824f
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-05-04 12:26:35 +00:00
Philémon van HeldenandNicolas Lempereur 1d3c886b95 [FIX] web: no error on single active_ids state load
In eg. 13.0 when refreshing sales analysis action of a product, we would
get an error because we have a single active_ids which is not expected
by the code.

With this commit, we use .toString() on the jQuery BBQ parsed active_ids
as it was done before 32b8cec5 refactoring (january 2018).

The added test with the fix fails with an error:

  TypeError: state.active_ids.split is not a function
  at Class.loadState (/web/static/src/js/chrome/action_manager_act_window.js)

opw-2471982

closes odoo/odoo#70285

X-original-commit: bf9a985f4b62cc6f1eef4f9fcca2a8dfbd453004
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: pvh-odoo <SwagSamaSempai@users.noreply.github.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
2021-05-03 18:01:10 +00:00
Laurent Smet b80e214780 [FIX] account: Fix price_unit rounding issue with fpos/price included tax
- Create an invoice with an empty fiscal position
- Create a line with a product having 100.0 as sale price and 21.0% price-included tax
=> price_unit equals 99.99

This is because 100 / 1.21 ~= 82.64 but 82.64 * 1.21 ~= 99.99 != 100.0.
The bug only appears when managing a fiscal position because the code is trying to adapt the product price_unit to the newly computed taxes.

closes odoo/odoo#70276

X-original-commit: 3470a3c94e06d92afcd8a8129f80e4dfea14efe4
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-05-04 08:19:17 +00:00
svs-odoo a419272f52 [FIX] stock: don't auto remove 0 quant with user
Before this commit, when quants where automatically unlinked, all empty
quants were took.
Now, quants with a defined `user_id` will not be unlinked because they
can legitimately be to 0 and we should wait inventory was processed
before empty quants were unlinked (as once the inventory is processed,
the `user_id` on quant is removed).

closes odoo/odoo#70275

X-original-commit: 7c5143e95ef1fcceafe5e331c3e8649e08666ae7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
2021-05-03 15:39:15 +00:00
wan efc407cacd [FIX] account: same sequence in different journal clash
When the same sequence is used in different journals (i.e. BNK1 in two
different companies), a clash might happen in the grouping optimization
of the `_compute_name`

closes odoo/odoo#70152

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-05-04 07:45:03 +00:00
wan 5b5e6943eb [REF] account: move sequence tests in a separate file
There are quite some tests related to the `sequence.mixin`.
Add some dosctring too.
2021-05-04 07:45:03 +00:00
yhu-odoo 6414a4847e [FIX] stock_account: wrong account when changing cost method
Previously when changing cost method, we always add debit to Expense
account when empty svl. This results in an unneutral change for process
that should be neutral. In this commit, we change to use stock input
account to make it neutral.

Task 2481563

closes odoo/odoo#68083

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-03-18 08:21:50 +00:00
Antoine Vandevenne (anv) 395b0d2e89 [FIX] payment_ogone: swap SHA-IN key with SHA-OUT in signature check
The key that should be used to check the signature of incoming (Ogone to
Odoo) communication should be `ogone_shakey_out`. For an outgoing
communication, the signature should be generated with `ogone_shakey_in`.

This commit swaps the IN key with the OUT key in signature calculations
to use the appropriate key for a given communication.

The opportunity is also taken to go back to using SHA1 for signature
computation rather than SHA256 that was introduced with 61a02a73 in
order to ease the migration of existing users. Keeping SHA256 would have
required users to make the switch on Ogone's backend.

task-2494916

closes odoo/odoo#70280

X-original-commit: 91782fa29ce597d3985221b76a0d16993facb53e
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-05-03 16:33:30 +00:00
Sébastien Theys 446e20742c [IMP] mail: add update command and use it on thread viewer
Instead of thread viewer having many dependencies, this allows models "having
the thread viewer feature" to keep their own logic for themselves.

The "create or update" part has to be done manually in this case (as opposed to
using "insert") because thread viewer has no clear identifying data, since it
would depend on which model is using it in the first place.

closes odoo/odoo#70251

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-05-03 15:11:07 +00:00
Adrien Widart 6c530f80d5 [FIX] purchase_stock: consider product unit price precision
When changing the product price precision, this can lead to incorrect
stock valuations.

To reproduce the error:
(Enable debug mode)
1. Go to Settings > Technical > Database Strucutre > Decimal Accuracy
2. Edit Product Price:
    - Digits: 4
3. Create a Product Category PC:
    - Costing Method: FIFO
4. Create a Product P:
    - Product Type: Storable Product
    - Product Category: PC
5. Create a RfQ with product P:
    - Quantity: 1000
    - Unit Price: 0.035
6. Confirm Order, Receive Products, Validate
7. Click on Valuation

Error: The total value is equal to $40 instead of $35. The calculation
was done after rounding the unit price: $0.035 becomes $0.04, then
1000*0.04=$40.

When confirming the RfQ, a stock move is created. To do so, the method
`_get_stock_move_price_unit` is called. When validating the delivery, it
recomputes the unit price thanks to method `_get_price_unit`. In both
situation, and if the line has taxes, the method `compute_all` is called
like this:
```python
price_unit = line.taxes_id.with_context(round=False).compute_all(price_unit,
	currency=line.order_id.currency_id, quantity=1.0)['total_void']
```
But here is the problem. In this method, total amount is computed with
this line:
```python
base = currency.round(price_unit * quantity)
```
However, `quantity` is equal to 1 and the multiplication is rounded
using the currency precision. As a result, `base` is equal to $0.04.
Then, all computations will use this value and will be incorrect.

This fix applies the real quantity so `base` will have the correct
value:
```
base = currency.round(price_unit * quantity)
     = currency.round(0.035 * 1000)
     = 35
```

OPW-2472192

closes odoo/odoo#70269

X-original-commit: 77b7a23c3c759b33e26bf91faf14a10f02449a91
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-05-03 14:55:01 +00:00
Arthur Detroux (ard) a7ee7f7cb4 [FIX] website: hide cookie bar when entering edit mode
Previously :
Once a user enabled the cookie bar, it prevented him from dropping
snippets in the main area of the page because the focus was on
the cookie bar. Dropping snippets there has a confusing behavior and
might make the user think the editor is broken.

Reason :
The cookie bar has an oe_structure class and takes over the body
if it's not hidden or dismissed. The oe_structure allows to drop
snippets.

Fix :
Hiding the cookie bar when user enters edit mode to avoid dropping
snippets in it by mistake.

task-2477430

closes odoo/odoo#70258

X-original-commit: 8c672662c80d0dfaeb06eedfc7136a68734fbdb3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-03 12:43:09 +00:00
qsm-odoo 215ae8cadb [FIX] web_editor, *: remove some post new editor dead code
*: website, website_event

Remove some dead code introduced by the new editor merge at [1].

[1]: https://github.com/odoo/odoo/commit/499e8860f194a7eb09a2e224b713a362923d77ac

closes odoo/odoo#70257

X-original-commit: 0a890a353dd89a60fd156f4280d069596b199cc7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-03 12:36:35 +00:00
Urvi Soni 1f53e7ffd7 [FIX] project : onboarding tour message name
There are some grammatical mistakes and spelling mistakes in the tour message.

This commit fixes these mistakes.

TaskID : 2508637

closes odoo/odoo#70219

Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-05-03 04:53:05 +00:00
Odoo's Mergebot e8954596c7 [IMP] core: speed up registry setup
This proposes a new implementation of
* the "discovery" of fields on a given model;
* the setup of fields;
* the sharing of fields across registries.

This new implementation makes the registry loading faster.  Our benchmark is two registries with 296 modules (all community modules).  Both registries have the same models, so we can see how sharing across registries can save time and/or memory.  Here are time measurements for loading both registries (from scratch):

Time | before | after | difference
---|---|---|---
Loading Odoo modules | 1176ms | 1339ms | +14%
Loading registry 1 | 2042ms | 1067ms | -48%
Loading registry 2 | 990ms | 970ms | -2%

As we can see, there is some extra work done when loading Odoo modules, but this extra work is done once for all registries using those modules.  However, this price is largely compensated by the speedup when loading a registry.  Notice also that the net time to load a registry no longer depends whether other registries are present in the server.

Overall, the loading of the first registry goes from 3218ms to 2406ms, which is 25% faster.  In other words, the bootstrapping time of a server is smaller.

closes odoo/odoo#69924

Related: odoo/upgrade#2428
Related: odoo/enterprise#17963
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-05-03 17:30:22 +02:00
Raphael Collet d3a35a2f34 [IMP] core: add magic fields on the class that defines a model
This makes magic fields shareable across registries, and speeds up their
setup.  Also simplify concurrency fields (__last_update).
2021-05-03 12:33:29 +00:00
Raphael Collet f7c9cb2b60 [IMP] core: share fields by not duplicating them on model class
Also speed up the basic setup of fields that are always duplicated
top-level (on the model's registry class).  This saves time and memory,
as we also discard field.args and field._base_fields on toplevel fields
(those values are no longer useful after setup).
2021-05-03 12:33:29 +00:00
Raphael Collet 81ff2717cf [REM] core: remove optimization sharing fields across registries
The optimization will be reintroduced later in a different form.
2021-05-03 12:33:29 +00:00
Raphael Collet 960cd72774 [REF] core: add method get_currency_field() on Monetary to retrieve it
This replaces the setup of the attribute 'currency_field', which depends
on the presence of other fields on the model, and may therefore vary
from one registry to another.  This is necessary to make monetary fields
shareable across registries.
2021-05-03 12:33:29 +00:00
Raphael Collet 34d6f87d54 [REF] core: put field.depends on registry and make field.recursive explicit
The attributes field.depends and field.depends_context are problematic
for sharing fields across registries, because they depend on the model's
registry class, which may vary from one registry to another.  In order
to make computed fields shareable, we have to move those values away
from fields.

For the same reason, field.recursive should not be inferred, because its
value may depend on the registry, although it is generally not the case.
Moreover, the flag recursive=True is set on a field when field triggers
are determined (on the registry).  A compute method may be called before
the flag is set (if no update has been done yet), and that can lead to
incorrect computations.

This happened in test TestUsers2.test_reified_groups in module 'base'.
The user groups view was apparently determined without the flag being
set, and the view depends on the recursive field 'trans_implied_ids',
which was not correctly computed.

We thus force developers to be explicit about recursive computed fields.
The code now logs a warning when the flag is not set up properly.
2021-05-03 12:33:29 +00:00
Raphael Collet 1ca2c7e457 [REF] core: new field setup API
The basic setup of fields is now made in Field.__set_name__(), which
automatically makes this information shared across registries, because
it is done when importing Odoo modules.
2021-05-03 12:33:29 +00:00
Raphael Collet f934b29a8a [REF] core: speed up the retrieval of fields on models
Fields are no longer retrieved with inspect.getmembers(), which is
time-consuming.  Instead, the classes defining models automatically
collect their own fields (via Field.__set_name__()), and the field
retrieval is done by using those collections.  Also, a field no longer
needs to introspect its model class to find its field definitions.

A class that defines a model automatically determines its '_name',
'_inherit' and '_module' upon creation, and the fields determine their
'name', 'model_name' and '_module' via Field.__set_name__().

Loading a registry with 290 modules from scratch is now 25% faster.
2021-05-03 12:33:29 +00:00
Raphael Collet e5ded717f4 [IMP] core: clarify model definition and registry classes 2021-05-03 12:33:29 +00:00
Raphael Collet cc7fbb47ae [TMP] registry actual load time 2021-05-03 12:33:29 +00:00
Barad Mahendra f93e054050 [IMP] project: generic UX improvement for project configuration
Purpose of the task is to do a generic UX improvement in project

Specification:
--------------

1) Stages(project.task.type)

* List view:
  - move the 'folded in kanban' field to the right of the project_ids one
  - remove the description field from the list view
  - make the list view editable in batch
* Form view
  - rename 'stage name' into 'name'
  - move the sequence field below the 'rating email template' one
  - change the copy of the tooltips to: "At each stage, employees can
block tasks or mark them as ready for the next step. You can customize
here the labels for each state."
  - the tags should be colored according to the project's color
  - reduce the space in between the icons and the name of the states
  - add some space in between the legend_done field and the description
  - when creating a new mail template, set 'project.task' as model_id
of the template
* move the 'Stages' menu into below the 'Projects' one
* add the project_ids field to the kanban view
* search: rename 'Tasks Stages' into 'Name'

2) Tags(project.tags):

- configuration > tags menu: change the helper to: "Tags are perfect
for categorizing your tasks."
- add an optional list view -> only the color field should be optional
and displayed by default
- new tags should be created at the top of the list

- Also removed some of the unused(deprecated) css which are not applied
anywhere in the project.

closes odoo/odoo#69636

Taskid: 2508642
Related: odoo/enterprise#17865
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-04-28 08:53:48 +00:00
Thibault Delavallée 6c7dd7501a [FIX] crm: do not reset action name in convert wizard each time an option changes
Currently ``name`` field that holds the action type is recomputed each time
duplicated leads are updated. However duplicated leads are often updated
notably each time customer action (create / link / do nothing) and chosen
customer are updated.

As ``name`` compute method is mainly present to replace a default value
its compute method is updated so that it nows compute only when not having
a value. Once having a value user choice is kept.

Task ID-2452777
COM PR odoo/odoo#68618

closes odoo/odoo#70254

X-original-commit: d75905f7acb1e7584d01792b4880fa76e6920d56
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-03 11:51:27 +00:00
Nasreddin (bon) 29398abb4e [FIX] crm: display right partner and action when converting lead
Issue
	- Create a partner with email 'aaa@test.com'
	- In CRM settings, activate 'Leads' feature
	- Go to CRM -> Leads and create a Lead:
	- Set email field to 'aaa@test.com'
	- Click on 'Convert to opportunity'

	Neither the action or partner_id field is set to the right value.

Cause

	Due to missing 'lead_id' field in template, the partner_id field
	is not recomputed since action is not recomputed.

Solution

	Add 'lead_id' field as invisible in form.

opw-2439722
Task ID-2452777
COM PR odoo/odoo#68618

X-original-commit: 6915d17f5f10737c03c820b69eded3a7c0151907
2021-05-03 11:51:26 +00:00
Sébastien Mottet (oms) 094c94fcd3 [IMP] website: change some wordings in configurator features screen
Some feature descriptions and titles have been reworded.
A sentence has been added below the title to indicate
that choices made on this screen are not definitive.

Task ID: 2451965

closes odoo/odoo#70252

X-original-commit: 63195ba03ccc1bf40b4682fc7c9aa4a1a55f1e43
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-05-03 11:40:09 +00:00
Sébastien Theys 7de0a02980 [IMP] mail: flag JS "on change" fields as such
There is currently a limitation with required fields because an "on change"
compute might trigger the check for "required" before all the actual computes
have been done, leading to the required field check incorrectly failing.

The main goal is to ensure the "on change" computes are done after all the other
computes and after the check for required fields.

A check has also been added to ensure no "real" compute can trigger update cycle
side-effects anymore.

Opportunity is also taken to prevent from checking for required fields on a
record that was deleted as part of the same update cycle.

Somewhat part of task-2278551

closes odoo/odoo#70204

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-05-03 11:52:26 +00:00
Adrien Widart d448db602a [FIX] point_of_sale: use lot's location for SML's location source
When selling a tracked product that comes from a specific place in the
warehouse, the module will ignore this information and set the parent
warehouse as source location.

To reproduce the error:
(Use demo data)
1. In Settings, enable "Multi-Warehouses"
2. Create a product P:
    - Product Type: Storable Product
    - Available in Pos: True
    - Tracking: By Unique Serial Number
3. Update its quantity:
    - Location: WH/Stock/Shelf 1
    - Serial Number: USN01
    - Qty: 1
4. Start a POS session
5. Sell P
    - Enter the same serial number
6. Go back to quantity update page for product P

Error: The quantity for "WH/Stock/Shelf 1, USN01" is still 1, it should
be 0. Moreover, a new line appeared: "WH/Stock, USN01, -1" which is
incorrect. The POS module considered that the product sold came from
WH/Stock instead of WH/Stock/Shelf 1.

OPW-2473002

closes odoo/odoo#70194

X-original-commit: 02a68278a9af2c477cc9a30716feabb0b533b7e7
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-04-30 15:22:10 +00:00
Djamel (otd) d413524dc8 [FIX] stock_landed_costs: use the correct split method landed cost
Steps to follow to reproduce the bug:
- Install Inventory and Purchase
- In the inventory settings, Enable the "Landed Costs" option
- Go to Purchase > create a Service type product
- In the Purchase tab > Enable "is landed cost" option and choose "by quantity" in the default split method
- Go to Orders > Requests for quotation > Create a new RFQ > add Any product and confirm the order
- Validate receipt of the product
- Create a bill > add the Service you created at the beginning
- Create Landed Costs

Problem:
we do not use the split method landed cost of the product, we automatically set it to "equal"

opw-2465753

closes odoo/odoo#70247

X-original-commit: 5da8c593353edcae4540bec696e259031f2d60f5
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-05-03 11:00:22 +00:00
Swapnesh Shah 2511100232 [FIX] mrp: allow to select product w/o bom
Without this commit, User was not allowed to create Unbuild Order
for the product without BoMs from Unbuild Orders menu.
But User was able to create Unbuild Order using 'Unbuild Order' button
on MO.

With this commit, We are allowing user to select Products without BoMs
to make this behavior consistent so user can create Unbuild Order from
Unbuild Orders menu.

closes odoo/odoo#70246

X-original-commit: eb332de42a36b7235d5578d39d345a5ff1df7759
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-03 10:58:11 +00:00
Florent de Labarre b6ad74e956 [FIX] stock : wrong float_compare
add the name of argument, if not precision_digits is used.

closes odoo/odoo#70242

X-original-commit: 2e7dfec50e9104adf8efbc64e0342359dc8947a7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-03 10:24:45 +00:00
Samuel DegueldreandTom De Caluwé 2cfb8658bf [FIX] web_editor: fix default shapes not reacting to palette changes
Previously, when toggling on background shapes, they always had the
default colours. In [1] we made it so that when you toggle on a shape on
a section, it would automatically reuse the colors of the surrounding
shapes if any.

Unfortunately, when the "implicit" colors were also the default colors,
they were still marked on the shape, and it got an explicit background
image that would no longer react to changes in the palette.

This was caused by the fact that the call to _getDefaultColors returns
an empty object when the section doesn't already have a shape-container,
this was not a problem before since we were not passing in any colors
when creating the initial shape previously, the the aforementioned
change made it so that we did.

This commit fixes the issue by creating the shape-container before
calling the method that will set the colors on the shape, this way
getDefaultColors works as expected, and the colors are not marked on the
section when they are the default ones, restoring the ability of the
shape colors to adapt to the palette

[1]: https://github.com/odoo/odoo/commit/875aca63f7dab287c61485ebe999b3b8dd89d91c

task-2500607

closes odoo/odoo#70054

X-original-commit: 63acc2b0d1957dedd40af2033722f9ea4ef2e597
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
2021-05-03 09:27:44 +00:00
Chong Wang (cwg) be2981324c [FIX] Calendar: fix avatar preview on hover
delete redundant '}' added by accident

The redundant '}' might be added by accident.
It makes the the correct avatar image cannot be found and shown as a default camera image when the user
* Open calendar
* Hover on on of the responsibles listed in the right side panel of the calendar view

closes odoo/odoo#69139

Taskid: 2504659
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-04-16 09:14:24 +00:00
Chong Wang (cwg) 85e1c447df [IMP] base: specify placeholder for company partners
set the specify placeholder for company partners from 'placeholder.png' to 'company_image.png'

After this commit, in the res.partner kanban view, if the company image of an individual is not set,
it will be shown as the 'company_image.png'(a company logo) rather than the 'plaeholder.png'(a camera logo).

closes odoo/odoo#68994

Taskid: 2491161
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-04-16 09:01:46 +00:00
Sébastien Geelen (sge) ed12ad006a [FIX] web_editor: update toolbar position on scroll
closes odoo/odoo#70221

X-original-commit: 044c047cee83c915b33d21aeddb08d1096ab8060
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-05-03 07:48:18 +00:00
Sébastien Geelen (sge) 7845a77c61 [FIX] web_editor: update odoo-editor lib to commit 77a1e98
X-original-commit: ea86110cc781b603a6665523cd4359a405f5babd
2021-05-03 07:48:18 +00:00
Pratima Gupta 0626ad78ef [FIX] mrp: suggest the qty to produce instead of 0 in workorders
Before this commit, if any workorder is stared to produce, qty
producing was 0. After this commit, if product tracking is none
then system will suggest the remaining qty of workorder to produce
when user is start it.

TaskId - 2480775

closes odoo/odoo#70207

X-original-commit: 5bbc234d43a415be18fcfa42dad33b1577644719
Related: odoo/enterprise#18086
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-04-30 17:48:13 +00:00
tsb-odoo 27ad0755b6 [FIX] l10n_fr: assets update on account.account.template.csv
425000 current assets rather than current liabilities.

closes odoo/odoo#70200

X-original-commit: 60b97ff46a790c2c6c490d78f6d1be103ff3182f
Related: odoo/enterprise#18081
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-04-30 16:07:40 +00:00
Samuel Degueldre 557a24e4f4 [IMP] web: allow lazy-loading asset bundles' templates
Previously, lazy-loading xml templates was only possible by fetching the
xml file directly, this meant that it was impossible to lazy-load an
entire bundle's templates with a single request. Additionally,
requesting the xml files directly meant that no inheritance was applied,
causing the need for a separate inheritance system using t-jquery on the
client-side.

This commit alters the /web/webclient/qweb route so that it now takes a
bundle id, meaning that it is now possible to lazy-load the xml from
arbitrary bundles.

task-2497943

closes odoo/odoo#70084

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-05-03 07:25:20 +00:00
Andrea Grazioso (agr-odoo) 830a28b6ad [FIX] sale_margin: avoid purchase price reset on order confirm
- Create a service product with cost 0
- Create a sales quotation
- Add the service product, change the cost to a positive quantity
- Save and Confirm.

Purchase Price (cost) will be reset to 0

opw-2481564

closes odoo/odoo#70036

X-original-commit: 8a8ff03f6111f377bcd9c2b0f584c450b82a4182
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-04-28 14:50:22 +00:00
Francois (fge) c1abb1841e [DOC] web: export an object containing a comment is not supported
closes odoo/odoo#69407

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-04-23 10:01:41 +00:00
Andrea Grazioso (agr-odoo) cfdd7c3b5e [FIX] stock: allow destination address change in transfer
- Create SO with deliverable product, confirm
- Change delivery Address on SO and on Transfer
- Inventory > Stock moves (debug mode)
- Group by > Picking and Destination address

The address shows is the original and not the updated one.

opw-2429018

closes odoo/odoo#67407

X-original-commit: c813655074b3b83bdf9345ef12399b0b96feaf71
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-03-08 10:49:02 +00:00
Djamel (otd) 92d87907e8 [FIX]repair: fix invoice deletion
Steps to follow to reproduce the bug :
- Install the Repairs and Accounting application
- Create a new user and give him only access to Accounting
- Connect with this user
- Create a draft invoice
- Try to delete it
- Access rights error is triggered.

Problem:
When we delete an invoice and the Repairs app is installed, we check if it is not an invoice related to a repair.
But the user does not have access to “repair.order”, so we can not check the field "repair_ids".

opw-2507867

closes odoo/odoo#70095

X-original-commit: b5588246a0e032c92b8443e67875ff4146858fe8
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-04-29 10:59:14 +00:00
Antoine Guenet a502bb7223 [FIX] web_editor, note: autofocus the editor on load note form view edit
On creating a new note, the focus was automatically set into the "tags"
field. This was inconvenient and was replaced with an autofocus on the
note itself so we the user can immediately start typing.

closes odoo/odoo#70195

X-original-commit: 8fe89c5ebc138cb517938dbd6d975b8bec4eaf4d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-30 15:23:36 +00:00
Achraf (abz) 5b3010a3a0 [FIX] l10n_in_sale: Set automatically GST Treatment on invoice creation
What are the steps to reproduce your issue ?

    1. Create a contact and set 'VAT' to "20AAACT2803M2ZO". The 'GST Treatment' will be automatically set correctly.
    2. Create a sale order for this new contact. GST Treatment is automatically filled in correctly.
    3. Confirm the order.
    4. Create an invoice.

What is currently happening ?

    The related invoice does not fetch the 'GST Treatment' automatically

What are you expecting to happen ?

    The related invoice must set the 'GST Treatment' automatically.

opw-2499503

closes odoo/odoo#70131

X-original-commit: 36582d08dee3688ea6e839bccfeaf8877e812122
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2021-04-29 17:16:19 +00:00
Ivan Yelizariev adec68caa7 [FIX] attachment_indexation: fix error "cannot contain NUL (0x00)"
To reproduce:

* install python package ``pdfminer.six``
* install module attachment_indexation
* upload special attachment

BEFORE:

Error in client:

> TypeError: relatedTemporaryAttachments is not iterable

Error in logs:

> ValueError: A string literal cannot contain NUL (0x00) characters.

AFTER:

No errors

---

opw-2506038

closes odoo/odoo#70205

X-original-commit: 172b88fdd955ba591a9bdd5a93bf7285ce0e6520
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-04-30 17:04:38 +00:00