Create a new quotation, add a row with product Customizable desk.
The product configurator dialog opens. Click on 'Add'. A second
dialog opens (to select optional products).
Before this commit, the second dialog was displayed behind the
first one.
This bug is present since the introduction of Owl dialogs
(34bbdd8). It is due to an override of the 'open' function that
doesn't call _super (and thus, doesn't go through the code that
makes the last opened dialog active).
closesodoo/odoo#43424
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
*sale,sale_product_configurator
Let's assume a form view containing a many2one with an onchange
that updates the value of a one2many. Do a quick create in the
many2one. While the name_create request is pending, add a row to
the one2many but do not leave it. When the name_create returns, and
the onchange has been performed, the one2many is reset, and the row
is no longer in edition (worse, it could be invalid, i.e. in a state
that the user could not have reached in a normal situation).
This commit fixes this issue by considering the whole [name_create +
onchange] operation as one. This operation is executed in the mutex
of the model, so the other request (adding a row to the one2many) is
delayed until the many2one value has been correctly set.
This fixes an issue with the sale and rental tours (on sale_order),
that had been deactivated for a while.
This commit changes ControllerAdapter to a mixin that inherits
WidgetAdapterMixin and RendererWrapper now extends ComponentWrapper.
This commit also changes PivotController base class/mixin and uses
the Odoo legacy custom_events because of the adapter.
closesodoo/odoo#43256
Related: odoo/enterprise#7744
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
This commit adds the ComponentAdapter, an Owl component meant to
be used as universal adapter for Owl components that embed Odoo
legacy widgets.
This component will be a precious tool during the transition phase
of converting our JS codebase from the legacy (widget) framework to
Owl.
The use of 'this' to call other utils adds a restriction on the
way utils are called from the outside:
utils.patch(...); // works fine
const patch = utils.patch;
patch(...); // doesn't work
PURPOSE
As Certification PDF can be called on failed user input, generate a
certification of failure in that case.
SPECIFICATIONS
In the survey_report_templates.xml, when user_input.quizz_passed is
false, a certification of failure can be generated.
This commit is actually about applying again 57fef7c11c that has been lost
while performing major cleaning in survey templates.
LINKS
PR #42811
Task ID 2148449closesodoo/odoo#43274
X-original-commit: 6206e0e6213be14a977db028b8f4dc4f755bf11c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
1- create a group payment (10 ~ 15 invoices);
2- Open the created journal entry.
The first issue we see is that the breadcrumb is too big to the size of
the screen.
3- Open the 'Reconciled Entries'.
Before this commit, the screen was completely shifted and not visible.
This occurs also because the breadcrumb is too big.
Now, the references added to the name of the entry is limited to 50
characters.
opw-2166551
closesodoo/odoo#43644
X-original-commit: d679c75bbeaf3e41dcdb8c91996a89ea5080669f
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Bug in 13.0 regarding company_id field of partners when creating them from
their parent contact or when setting their parent.
The field 'company_id' of res.partner is set by an onchange on 'parent_id'
to that of it's parent; unfortunately the field is readonly if parent_id
is set and not set to force_save.
Furthermore, creating a child partner from the main one (in the 'Contact'
tab of the main partner form view) does not follow the same behaviour
(company_id is unset in that case, meaning that children don't have
the same company as their parent).
Since the company_id is already set by an onchange when we change 'parent_id'
and set to readonly in that case, I assume the expected behaviour is actually
that children partners should have the same company as their parent by default.
Fine tuning of 7b49f5836c
opw:2176384,2167106
closesodoo/odoo#43621
X-original-commit: 92737f21acf9b044df99e111fceffc08e05abe65
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Add documentation about the new gantt parameter, `dynamic_range`,
The parameters were added in enterprise (odoo/enterprise#7640).
Task #2168740closesodoo/odoo#43052
Related: odoo/enterprise#7640
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The discount_amount didn't consider the quantity on Sales Order Line.
e.g:
100€ | 10% discount | 8 products
--> discount_amount was 10 € instead of 80€
Fixes#43242closesodoo/odoo#43624
X-original-commit: b8a1370c7bebe71b968555a6c9e5137c4e7cda8b
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
1/ When the new database is created without demo data, the admin has a
'silhouette' as a default picture. When a new user is created without
picture given by the current user, the new user will have a 'silhouette'
as a default profile picture.
2/ web: image for fa-user-slash. This image will be used when a record is
unassigned.
3/ web, *: Change placeholder by default when record is unassigned.
We want to have a fa-user-slash icon when a record is unassigned instead
of 'placeholder.png'. A method is created in the BaseModel to have a
generic method to change easily the placeholder for other models.
4/ Adapt kanban test to keep the same behaviour. Attention the behaviour is
a bit different. Because, now the default image is given by the server to
change easily the default image when a record doesn't have an image.
Thus, we don't say if it's the default placeholder, but we can say it's
not the same image of the record (in this test, the record, it's the
partner).
5/ misc: display 'Unassigned' in the hover on kanban cards if record is unassigned
closesodoo/odoo#41356
Taskid: 2060206
Related: odoo/enterprise#7758
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: jdoutreloux <jud@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
Computing the `cache_key` turned out to be a big factor during the
lifespan of a `BaseModel.mapped` call and a lot of this time is spent
computing the same `cache_key` over and over.
These unnecessary computations can be easily reduced to a couple by
moving the `cache_key` method on the environment (instead of the field)
and by implementing a memo for that method. The rationale is that the
`cache_key` of a field does not change for a given environment.
The result of this patch is up to 50% faster `Field.__get__` which in
turn means a GLOBAL gain in performance, especially for methods /
functions that rely heavily on `__get__` such as `BaseModel.mapped`.
closesodoo/odoo#42674
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Instead of polluting an existing environment, use the method that was
intended for changing the company `with_company` which returns a brand
new environment and leaves the existing one unchanged.
A new tax of 10% has been introduced in October 2019 in Japan.
Add this tax and relative tax group, fiscal position, etc.
Conserve the 8% tax as some sale could use it as a reduced tax rate.
closesodoo/odoo#42538closesodoo/odoo#42629
X-original-commit: 18925d7fcadac7f30f29d46f7c45e87b083e9e5e
Original-signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
Steps to reproduce the bug:
- Let's consider a delivery method DM with fixed price of 10€ and a margin of 20%
- Let's consider a storable product P
- Create a SO for P and get the rate (12€) but don't add it on the SO
- Confirm the SO and process the delivery
Bug:
A SO line was created for the freight cost without the margin. So it was 10€
instead of 12€.
opw:2144894
closesodoo/odoo#43279
X-original-commit: 621dac802ddddc3a4dd58f7370250386e1031598
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
- Create a new Product
- Add a BOM to this product
- Set the BOM to be a kit
- Add components to the BOM
- Create a PO for the components for a qty of 5
- Confirm the PO but don't transfer the products
- Check the phantom kits outgoing_qty and incoming_qty they will match
A Phantom Kit Products outgoing_qty and incoming_qty are identical
Closes#43447closesodoo/odoo#43584
X-original-commit: 4b2e235be6cab947ce2e0b3b17b54530f984ce72
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When writting number on the point of sale keypad, if you click on the
"+/-" button, you will get 0 (with buffer "-0"), but then you need to
backspace 2 times to remove "-".
This seems odd since this mean that:
=> "+/-" "backspace" "backspace" "5" will get 5.0 units
=> "+/-" "backspace" "backspace" "backspace" will remove line
instead of what would be expected:
=> "+/-" "backspace" "5" will get 5.0 units
=> "+/-" "backspace" "backspace" will remove the line
opw-2169157
closes#43495closesodoo/odoo#43507
X-original-commit: d3489146e9e1e20903bf8775527cb8b32a2ba383
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before create_multi, in case of invalid syntax used in an XPath, only
the problematic record was displayed. It was not ideal for long
definition but still usable.
Since the views are created using create_multi, the whole file content
is displayed in the error traceback, making it almost impossible to
locate on files with multiple records.
closesodoo/odoo#43590
X-original-commit: 8622469e1fdd4789cc45ed52093d0f329abca14e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
The handling of unhandledrejection in the frontend was done with
dedicated code since the crashmanager was not in the frontend. This is
the case now so that dedicated code became useless.
closesodoo/odoo#42927
Signed-off-by: fja-odoo <fja-odoo@users.noreply.github.com>
Show the Post Inventory button to manufacturing users,
also if they are not in debug mode.
task-1887035
closesodoo/odoo#43294
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
- move all the constrains at the same place, make sure they are private
- move all the onchanges at the same place, make sure they are private
- move `_get_similar_move_lines` helper at the bottom of the file with
the other helpers
We optimize the search on domains like `[('line_ids', 'in', ids)]`.
The condition is rewritten `('id', 'in', ids1)` where `ids1` is the
result of
SELECT <many2one_field> FROM <comodel_table> WHERE id IN <ids>
The issue is that the latter potentially returns many duplicate values.
The fix consists in having as few duplicates as possible in `ids1`.
Note that domains like `[('line_ids.foo', '=', 42)]` implicitly benefit
from the optimization, as they are rewritten as the one above with
ids = comodel.search([('foo', '=', 42)]).ids
closesodoo/odoo#43574
X-original-commit: a13c05fa5df9c98504e8e1cdb09d8d4a8d13ea91
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Payment information for terminal transactions (payment_status,
transaction_id & card_type) was lost when going back to the floor
plan in pos_restaurant. Validated transactions were then considered as
not processed yet.
closesodoo/odoo#43550
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This was incorrectly reverted during 116057b26e71db4692280463669f3e80d813ddcc
closesodoo/odoo#43564
X-original-commit: 73e3afca18fae954552d8cbecb6afddf1b08539b
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Create multiple tax and assign them to the same tax group.
Create an invoice, with two lines, each one with one tax of the group.
Save and click on "Preview" or print invoice.
The tax group will be reported applied on just the first line
This append because of 4d62a94a31c3967bfd34396a3448a3e925422634.
Reverting commit to restore the former behavior in which the tax base
amount is added for every line in which the tax group component is
found. While this other behavior could be an issue for some user the
behavior is more consistent accounting-wise and the template could easily
be changed to adapt to user needs.
opw-2170069
closesodoo/odoo#43553
X-original-commit: 43de214bf2d0da20b7609e392d800b49465b483d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Unfortunately caught in a really wide try/except clause where it was
completely silenced, causing a lot of stuff to be archived instead of
deleted.
closesodoo/odoo#43543
X-original-commit: cfa2993615150416b801ce942f18339065678648
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Left panel widgets can define the widgets they depend on to be visible.
Up to now, if such a dependency was defined but that the related widget
was not found, the dependency was considered as not met. Now, it acts
as if that particular dependency was not defined at all.
This is useful for controlling the visibility of a generic option in the
case of a specific snippet without having to duplicate and restrict that
generic option.
E.g. There is a generic "color" option on all snippets. For my snippet
"hello" I only want that generic "color" option to be visible if my
"world" option is enabled. I then add `data-dependencies="world"` on the
generic "color" option. In the case, any other snippet than "hello" is
used, since the "world" option does not exist there, the "color" option
acts as if it had no dependency.
closesodoo/odoo#43511
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- In general settings:
- Sales:
- Activate discount
- Activate Multiple Sale Prices with option computed from formula
- Point of sale:
- Activate Multiple Sale Prices with option computed from formula
- Accounting:
- Set show price tax-included
- Modify the Public Pricelist: Set to Global, price discount 50%
- Modify the sale tax to be included in price
- Create a 0% tax included in price
- Open fiscal position: Set auto-detect, replace sale 15% by 0%
- Open a product and set customer tax to sale 15%
- Open POS session configuration
- Set fiscal position, tax included in price and public pricelist
- Add product "Pedal Bin"
You will see in strikethough text the original selling price with tax included,
while taxes should have been removed from the tax mapping.
Note that this is purely aesthetical, the total amount calculated is correct.
Fixing by calculating the price from the original selling price.
opw-2155779
closesodoo/odoo#43284
X-original-commit: 7de221c04133d37c23783fd6232eb23fd91cefe7
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Install Projects, documents, calendar, website, crm.
Under Settings enable "File Centralization"
Now go to Projects, enter in a Task, click on "schedule activity".
On the activity form under "Activity Type" choose Meeting, click on
"Open Calendar" button.
Choose a slot, edit the event, add a contact type individual, save
Error will popup.
This is caused by the whole flow of creating a new document for the
invitation.ics generated for the meetings which has to be sent via email
but get detected as an attachment to be sent into the document app as
well.
Disabling the document creation since it is not a relevant attachment
opw-2150770
closesodoo/odoo#43537
X-original-commit: 4e30db33938d4d740d847cfbc6a29b4013be964d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Do not crash if the commercial partner doesn't have a name.
opw-2158809
closesodoo/odoo#43533
X-original-commit: 90b55325894a248b0386d2f8c4b8568d278963f9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Allow to easily find product and partners related to subcontracting
closesodoo/odoo#43046
Task: 2158126
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
As Mitchell Admin:
- Install Leaves
- General Settings > Multi Company
- Create companies A (YourCompany) and B
- Mitchell Admin should be an employee of A, not B
- Switch to company B
- Go to Leaves > Managers > All > Allocations
An AccessError is raised in `_compute_number_of_hours_display` because
we try to access `employee_id.resource_calendar_id.hours_per_day`.
After this AccessError is solved, several others are raised when
accessing a record. They are solved in this commit.
opw-2160542
closesodoo/odoo#43529
X-original-commit: 97085bf16e009ea563719385c8c7073436a1aa7e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Issue
- Install Accounting
- Upload XML bill (tried with a MX one)
No decoder was found.
Cause
The _create_invoice_from_xml method gets decoders from overrides of
_get_xml_decoders. There is only 2 overrides: Belgium & Italy.
All others countries are not handled. So, this error blocks
the user.
Solution
Log the error instead raising it. (Reproduce V12 behavior)
OPW-2170516
closesodoo/odoo#43503
X-original-commit: 592d2a296e4aa6a0c96bb1e56119965cd066ea0f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
PURPOSE
=========
In 3 words, make survey beautiful.
SPECIFICATIONS
==============
- Center the question in Question per page mode
- When last question or page of the survey, Continue becomes Finish
- Add Press key capabilities to speed up the survey completion
- ENTER : go to next question (or next page)
- A to Z : to select answers in choice and matrix question type
(only in question per page mode to avoid mismatch and complexity with multiple questions
- New layout for single / multiple choice
- Custom radio buttons and checkboxes. Unified style for both except we keep circle icon for
simple choice and square icon for multiple choice.
- Add a progress bar (2 modes : % and number)
- Add Background image
- Re-do quiz correction mode that were removed from controller during survey refactoring.
- Review breadcrumb style (make it more integrated to the new design)
See sub commits for more details.
LINKS
=====
Follow the survey refactoring done in #42908.
Task ID: '2150291'
closesodoo/odoo#43237
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In this commit, all the questions type have been redesigned to look more fancy.
(impacted question types : radio and checkboxes, text boxes (textarea and text
inputs, date and datetime inputs and matrix)
For radio and checkboxes, both design have been aligned to work the same way
(except checkboxes can still have more than one selected option).
Selection by key have been applied on those two question types if the number of
option is under 26 (to use all the alphabeat character for selection). This
selection by key is only available on page per question layout.
Tests have been adapted accordingly to the redesign (typically for choice and
matrix inputs)
* Progress Bar
This commit adds a progress bar to the survey to inform the user
where he is in the survey filling process.
There are two progress modes:
- Number : will display the number of the current page on the total number
of pages (or questions if layout mode is question_per_page)
- Percentage : will display the percentage of page or question already done
So this leads to, on last page:
- in Number mode :
the progress bar div is 100% filled 3 / 3 pages [===]
- in percentage mode :
the progress bar is aligned to percentage 66% completed [== ]
* Print Widget
A widget is added for survey print mode in order to resize all textarea to fit
their content, instead of showing a scroll bar. This can be usefull if user
wants to print the results. He will get the entire content of the 'textarea
answers' instead of only the two first lines.
* Misc
This commit also :
- adds background image to survey.
- redo quizz correction and add some data to illustrate non scored
questions rendering in print template
- review breadcrumb style
Note : readonly data option on survey form widget is not set anywhere yet but
the usage is done in prevention of the future work on presenter view for survey
session mode.
Task ID: '2150291'
PR #43237
This commit moves the flex rules of #wrapwrap div to web so it can be used in
survey.
This is needed to make the survey footer stick to the bottom of the screen
even if main has not enough content to fill the page.
This commit prepares survey redesign.
Task ID: '2150291'
PR #43237
This commit splits the _content_image method to allow to call the
get response part individually.
This is needed because _content_image call binary_content using current user
access. But in some cases, we need to render a binary content even if the user
does not have access to the target model (typically for public users).
The binary_content is gotten in sudo mode where needed and the result can be
given to the _content_image_get_response.
This will avoid code duplication where the sudo use case is met.
Usage :
This commit prepare the redesign of survey. This _content_image_get_response
method will be called to grant access of background image even for public
users. Other modules will use this new method like elearning (website_slides)
to display karma ranking, etc.
Task ID: '2150291'
PR #43237
In a website form, when "Email cc" field is added,
an i icon will be displayed besides the field label to
guide user about multiple email addresses support.
task-2074045
closesodoo/odoo#37116
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Prevent the use of the point of sale when the cash control is used and there is no
profit and loss account on cash jornals linked to payment method.
closesodoo/odoo#43493
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Fix the prefetching mechanism to never consider a recordset with
duplicates.
closesodoo/odoo#43426
X-original-commit: c312e1e5e5e23d1d8dc172aa6e5f8f07f5638792
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
The faulty code modifies a dictionary in-place to apply a formatting
function to each value. In this case, the formatting is `browse`, and
the issue occurs when `ids` contain duplicates:
for id in ids:
result[id] = format(result.get(id, default))
Fix it by returning a new dictionary based on `result`.
X-original-commit: bd4565e227c7196604af9c5c51ce136a2beac088
This wizard also reconciles automatically entries done on reconcilable accounts. It can hence for example be used to "move" the balance of a receivable account into a payable account (or the opposite), using the generated transfer entry to do as if the receivable and payable accounts were directly reconciled together.
[IMP] account: display 'P' as matching number when account.move.line objects are partially reconciled
For this, we introduce a new matching_number field, used in account.move.line's tree views instead of full_reconcile_id, which used to be shown directly.
Was task: 2037318
closesodoo/odoo#39415
Related: odoo/enterprise#6544
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>