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
closesodoo/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>
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>
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
closesodoo/odoo#70334
X-original-commit: 2b3ad9bfa9459b8e39d769afa8fa61ceef925c75
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/odoo#70328
X-original-commit: 62cd2c0be63738f0bbefd62de5d025990e63824f
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
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
closesodoo/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>
- 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.
closesodoo/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>
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).
closesodoo/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>
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`
closesodoo/odoo#70152
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
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
closesodoo/odoo#68083
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
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
closesodoo/odoo#70280
X-original-commit: 91782fa29ce597d3985221b76a0d16993facb53e
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
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.
closesodoo/odoo#70251
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#70258
X-original-commit: 8c672662c80d0dfaeb06eedfc7136a68734fbdb3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
There are some grammatical mistakes and spelling mistakes in the tour message.
This commit fixes these mistakes.
TaskID : 2508637
closesodoo/odoo#70219
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
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.
closesodoo/odoo#69924
Related: odoo/upgrade#2428
Related: odoo/enterprise#17963
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
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).
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.
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.
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.
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.
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.
closesodoo/odoo#69636
Taskid: 2508642
Related: odoo/enterprise#17865
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
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#68618closesodoo/odoo#70254
X-original-commit: d75905f7acb1e7584d01792b4880fa76e6920d56
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
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
closesodoo/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>
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
closesodoo/odoo#70204
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/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>
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
closesodoo/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>
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.
closesodoo/odoo#70246
X-original-commit: eb332de42a36b7235d5578d39d345a5ff1df7759
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
add the name of argument, if not precision_digits is used.
closesodoo/odoo#70242
X-original-commit: 2e7dfec50e9104adf8efbc64e0342359dc8947a7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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
closesodoo/odoo#70054
X-original-commit: 63acc2b0d1957dedd40af2033722f9ea4ef2e597
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Tom De Caluwé <tdc@odoo.com>
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
closesodoo/odoo#69139
Taskid: 2504659
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
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).
closesodoo/odoo#68994
Taskid: 2491161
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
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
closesodoo/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>
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
closesodoo/odoo#70084
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
- 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
closesodoo/odoo#70036
X-original-commit: 8a8ff03f6111f377bcd9c2b0f584c450b82a4182
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
- 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
closesodoo/odoo#67407
X-original-commit: c813655074b3b83bdf9345ef12399b0b96feaf71
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
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
closesodoo/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>
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.
closesodoo/odoo#70195
X-original-commit: 8fe89c5ebc138cb517938dbd6d975b8bec4eaf4d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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
closesodoo/odoo#70131
X-original-commit: 36582d08dee3688ea6e839bccfeaf8877e812122
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>