Attribute Error: 'frozendict' object has no attribute 'default_product_id'
traceback that occurs in stock/stock_quant: action_inventory_at_date
was caught by a sentry.
steps to produce:-
- Install inventory module
- Select any product from the menu item/reporting/stock
- Click replenish button & from that replenish wizard, select the product again
- Then click the forecasted stat button and in forecast click the On Hand button
- Then click Inventory At Date.
At this moment you find a traceback.
Because default_product_id is not getting from the context in inventory.
Applying these changes will resolve this issue.
sentry:-4148733813
closesodoo/odoo#122741
X-original-commit: ca58b13d63702ac2ec8d74b855b90058bf18eb7b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Steps to reproduce the bug :
- Add the same google font twice with the font family selector in the
option tab of the editor panel.
- The font will be displayed only once in the font selector menu but 2
trash icons will be added, one for the added font and one for the font
that was already there.
This commit fix this and allows now the user to add the same font twice,
but only to replace a served font by a local font. The opposite does not
make sense, but if the user really wants to replace a local font with a
served, it is always possible by deleting the locale beforehand.
In addition, this commit adds a cloud icon next to the default fonts of
the theme. Since these fonts are served by Google, it is logical to have
the cloud icon. This is consistent with the cloud icon that is present
when the user adds a font served by Google.
task-2998689
closesodoo/odoo#122652
X-original-commit: 948ff01e64e5d71d60d209d074dd6be6510fe794
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
The 'frontend_lang' cookie is used to 'cache' the user's preferred lang.
We want to make sure that this language preference is preserved for a
longer period of time than just the life of the browser. This means that
even if you quit your browser and come back into the year, your
preferred language will be used, until you choose to remove your cookies.
The 'utm_*' cookies are used to 'track' where you are coming from on the
instance. The purpose of these cookies is to know the tracking value
to improve the overall user experience or compute the profitability of
some campaigns. Now we keep these cookies for 1 month.
closesodoo/odoo#122573
X-original-commit: 058e0abcf621796bf23d8dcaaf3b2297f632b5fd
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
The draft state should only allows setting the initial demand
This commit also allow editing the reserve quantity at the move line
creation
closesodoo/odoo#122445
Task: 3256447
Related: odoo/enterprise#41548
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Usecase:
- Create a picking and a move without quantity
- Click or the show detail or save
The picking goes into the state draft while it shouldn't.
It happens because when a quantity done is set, it will
goes to process_increase that will assign the move. With
0 qty, it's not assign and stay in draft (default value)
The picking state is then computed based on the move state.
To fix it, force the state to assign on stock.move in immediate
transfer without quantity.
Part-of: odoo/odoo#122445
In case package and consignment settings are activated, choosing a
quant to create a move line is easier if the package/owner is in the
quant name.
Task: 3256447
Part-of: odoo/odoo#122445
If no stock quant are founded in the list when adding a new move line in
the detailed operation. The `new` button opened a form view on
stock.move.line model instead of stock quant.
Task: 3256447
Part-of: odoo/odoo#122445
CHEVRONS
Add chevrons to the event booth front-end process. A template is added
to be called in booth choice and form views, and the one called from js
is also updated with chevrons. The code is minimized, and fits for the
three current steps only.
- Booth Selection
- Contact Details
- Confirmed / Payment
CLICKABLE + REMEMBER BOOTH CHOICE
To ease the process of changing booth / booking another one, the
"Booth Selection" chevron is clickable and highlighted on hovering.
Also, it will keep booth_ids and booth_category_id url parameters.
From that, the category will be selected and the booth_ids checked
(if available), the first time the selection screen is loaded (once
the user goes between booth categories, it will not remember booths
any more and not preselect any) In order to do so, the arguments are
added to the appropriate methods in controller (and overrides), with
particular attention to match format. (string vs int...)
SCSS
Styling is added in website_event_booth.scss. Cautions are taken to
ensure proper chevrons coloring even with edited theme colors.
DYNAMIC WORDING
Instead of 'confirmed', 'payment' is used in chevrons, and "Go to
payment" instead of "Book my Booths" in the contact details form,
if one of the following is true (~ new boolean value 'use_payment_step'):
- In selection screen: at least one category is not free
- In Contact Details screen: the chosen booth is not free
- In both Selection and Contact screens: if cart has non null total
amount. (this is the current logic used to redirect to payment)
CONTROLLER REORGANIZATION
In order to add the "use_payment_step" to the rendering values,
the routes of those views now have their value preparation methods,
making them easily overriden (done while maintaining guidelines)
OTHER CHANGES
- Some wording on the form
- Hide sponsors in the booth booking flow
- All views have the same space between chevrons and content (48px)
- Tour is updated to match new wording.
- New map icon and simple link button to display the map of booths.
- No more justify content for display of booth categories
- unglue the rows of booths vertically
- Remove the use of jquery where possible in worked areas.
- Rename activeType to clearer activeBoothCategoryId in JS
Task-2821962
closesodoo/odoo#114052
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Adjust pivot view to match new web client redesign: Set top-left empty
header cell background-color to match view background (+ borders).
task-3329794
part of task-3326263
closesodoo/odoo#122750
X-original-commit: 34f001e119c873272f9c4c90b1128f02c8ef88d0
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Fix a sign error in reconciliation that happened when
reconciling items in foreign currency and a not fully
matched credit, causing inconsistent partial amounts.
closesodoo/odoo#122674
X-original-commit: 8cdc874b4a826b022930ef8e03bda1afae4e4ba6
Related: odoo/enterprise#41580
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Claire Bretton <clbr@odoo.com>
before this commit, on creating a new payment method
will show traceback.
* using studio add a menu for payment method
* create a payment method and hit on create
* traceback is shown
after this commit, no traceback wont be shown.
closesodoo/odoo#122181
X-original-commit: f8918c9ea14fc35a5baf0824bd320c749d881fc6
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The goal of this PR is to improve the structure (alignments, font sizes...) of the two modules as it was clumsy and not appealing.
A specific mobile view for the filters was implemented off canvas as the current one was not optimized.
All these changes were made to make these modules more consistent with the rest of the front-end modules.
task-3083706
upgrade pr : **https://github.com/odoo/upgrade/pull/4690**
closesodoo/odoo#109752
Related: odoo/upgrade#4690
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit:
- Unifies the SCSS code for the off canvas filters used in
website_sale and website_crm_partner_assign
- Removes the custom width of 80% on small devices that made it
possible for the user to click outside of the `.offcanvas` to close it
- Adds a close button in the website_sale `offcanvas` as the default
`.offcanvas` width is 100% on small devices and the user needs an exit
button as he can't click outside of the canvas anymore
task-3083706
Part-of: odoo/odoo#109752
The structure of this module was adapted
as it was broken and not appealing:
- Text alignments and font sizes were improved
- Card structure instead of a list
- Filters and search are now grouped on top and take less space in
the page
A specific mobile view for the filters was implemented off canvas as
the current one was not optimized.
All these changes were made to make this module more consistent with
the rest of the front-end modules.
The option to show the map is now visible/not visible depending on if
the database contains a google maps API
task-3083706
Part-of: odoo/odoo#109752
This commit:
- Improves the structure of this module as it was broken and
not appealing:
* Text alignments and font sizes were improved
* Card structure instead of a list
* Filters and search are now grouped on top and take less space in
the page
- Adds a specific mobile view for the filters was implemented offcanvas
as the current mobile filtering was not optimized.
- Adds an option to show/hide address in the resellers/partners list
- Makes the option to show the map visible/not visible depending if the
database contains a google maps API
- Makes this module more consistent with the rest of the front-end
modules.
task-3083706
Part-of: odoo/odoo#109752
When working on an operation in workcenter that requires login, we can add multiple timers.
However, if multiple timers do not have an `end_date` and have different `loss_id`, we will get a traceback (expected singleton) when computing the interval duration.
After this fix, `_convert_to_duration` can be called with multiple productivity loss.
OPW-3292374
closesodoo/odoo#122740
X-original-commit: d9fa0d1554ad51128b33ceae5b43f4c521ff6e11
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Nogueira Cabaço Pedro Filipe (pno) <pno@odoo.com>
Failing use case: While having purchase_stock installed, create and confirm a request for quotation, received some products but no bill for it. Now select the PO is the list, click on 'Action > Accrued Expense Entry'. Make sure the wizard will effectively create an accrued expense entry (it should be the case if you have some product received and not billed).
Upon confirmation of the wizard, the system will recompute the received quantity on the original PO, logging notes that pollutes, confuses and spams its followers.
The reason is that we use a new record to compute the difference between the received and billed quantities at a given date in the past, and even if track_qty_received is called on a newid, it will find back the original PO where doing line.order_id.
The solution is to check in the context if we're in such use case before logging, because we know that calling the accrued expense entry wizard aims not to change the received quantity in any wase
closesodoo/odoo#122720
X-original-commit: b31f1ad789e92c84f85654b67e6730e413f0e06b
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Followup cleanup of https://github.com/odoo/odoo/pull/106620 where
Datamatrix of pylibdmtx was replaced with built-in reportlab
ECC200DataMatrix option. For stable compatibility, some parts could
only be deleted in master, so let's delete them now.
closesodoo/odoo#122704
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When we create a public time off,
we save the start date and the end date in utc.
Unfortunately, to calculate the utc, we don't use
the calendar timezone linked to these public time off.
Issue:
For example, with the "timesheet_grid" module,
the timesheets created for these time offs
will not be correct for employees who have a calendar
in a different timezone than the user who creates the public time off.
Solution:
Convert the dates received in the calendar timezone.
opw-3302925
closesodoo/odoo#122755
X-original-commit: 63688d31c036a7d1421444134169681924f8a12a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Before: in the accounting dashboard setup, an opening move was created in step 1 (accounting periods) and step 4 (chart of accounts)
Now: the opening move is only created in step 4 only when a first opening debit/credit is entered manually by our user.
Task-ID #3177315closesodoo/odoo#122818
X-original-commit: c3793357d823273cb4297b0eb31308ad73a9dff8
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
The foreign currency should not be computed if it has already been set.
In cases where the transactions were imported with a foreign currency amount, it should not be changed when the user modifies the date.
Fix for
Task-3338560
closesodoo/odoo#122780
X-original-commit: c31af99542493ca10604688dc2782a0aa41f5294
Signed-off-by: Laurent Smet <las@odoo.com>
If applied, this commit will solve the expected singleton error when the product
has multiple taxes, and the user tries to print sales details in point of sale.
To reproduce this error, follow the steps:
- Open point of sale.
- Products > Open any product > Add multiple customer taxes
- Open Session > make the order for that product with discount > Validate
> Close Session
- Reporting > Sales details > Print
sentry - 4148645094
closesodoo/odoo#122182
X-original-commit: 2d58de7adcae9b035607ff6a2ca59fc46ce32506
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Renilkumar Kajavadra (reka) <reka@odoo.com>
Since [this other commit], a traceback is displayed when the user wants
to see the pages of his site when he has only one site. Steps to
reproduce the bug fixed by this commit:
- Launch Odoo without any app installed and without demo data
- Connect to the DB
- Activate the Website module
- Skip the configurator
- Choose a theme
- Discard edit mode
- Go to Site > Pages
- Go to kanban view
=> An error is displayed because the record has no website_id.
[this other commit]: https://github.com/odoo/odoo/commit/f23399db1dfb816a68ecf1be4367234b6e9a28bc
task-3316267
closesodoo/odoo#122754
X-original-commit: 322f0882e9fc0b33c90a2e22fdffa01b5d4345e4
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit fixes the issue of having duplicate iframes when dropping a
custom "s_map" snippet that has been saved by the user.
This issue was introduced by this commit [1].
Steps to reproduce the bug:
- Drag and drop a "s_map" snippet onto the page.
- Save this "s_map" snippet by clicking on the custom snippet "save"
button.
- Drag and drop the saved snippet onto the page.
- Observe that a duplicate iframe is created in the snippet.
This commit adds a check to verify if an iframe already exists before
adding it when dropping a "s_map" snippet.
[1]: https://github.com/odoo/odoo/commit/88194dd94182ad1bbdcb9aa8f855f30f6369d148
task-3340644
closesodoo/odoo#122739
X-original-commit: 34b8c2e0578b56b87c50c222564582ed4fa7051f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
- create an invoice with a CABA tax
- full refund it using 'add credit note', 'cancel' mode.
=> No CABA entry generated but an exchange difference journal entry
has been created.
This is because the CABA entry is not generated in case of full refund
thanks to the 'move_reverse_cancel' context key. However, this key is not
preventing the generation of the exchange journal entry for CABA.
opw-3321897
X-original-commit: 01799569bb3d450719968c77c1d4bb4c9ff31fdb
[FIX] account: Fix 'reverse_move_cancel' context key in reversal wizard
When reversing an invoice using the reversal wizard, the reverse_move_cancel is not passed to
the reconciliation and then, we are not able to prevent the generation of the cash basis entry.
This is because the reversal wizard 1) posts the credit note and 2) reconcile it with the invoice.
However, the reconciliation is done directly during the post but forcing the 'reverse_move_cancel'
key to 'False'. Then, at step 2), there is nothing left to reconcile.
So the reconciliation is never called using the 'reverse_move_cancel' context key set to true.
closesodoo/odoo#122732
X-original-commit: 42a8b091c4085c5caa97c838342a1ca0748c403c
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
- rounded avatar in member list and invitation link
- improved color in selectable users in invitation link
- show "Add Users" action in DM chat window
- no border on panels in chat windows
- slight header style adjusments on emoji picker
- improved borders on chat window (shared between content and header)
closesodoo/odoo#122731
X-original-commit: 0f7f858514126a6898c01bb6a8389d0b066b8a3f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
=== ISSUE ===
With the new Milk design, we introduced `.border-radius` on buttons.
Most of the time the render looks great, but in some cases, it would break
the layout.
This is due to the fact that old design sometimes used two buttons
next to each other.
This worked fine because they did not have any radius but now it looks
like they are compressed and squished.
=== AFTER ===
This commit tracks some of these cases to improve the global render
of these buttons.
task-3329612
part of task-332626
closesodoo/odoo#122705
X-original-commit: 90c2ba3eb0bf74d675c574b13cedb90235398773
Related: odoo/enterprise#41590
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
before this commit, on changing the product from bom is
not clearing the product variant field, if the product
variant feature is not activated in the database.
* activate the product variant in the db
* create a product and variants
* open bill of material, and set the created
product as product and set any variant in product
variant field
* now go to settings and disable product variant feature
* come back to same bom and change the product
* the product variant field will still have the other
product
onchange_product_tmpl_id is written to clear the
product variant field value, but as the product
variant field has group the onchange value is
not getting updated.
after this commit, on changing the product the product
variant field will get cleared even if the product
variant feature is not activated.
closesodoo/odoo#122681
X-original-commit: 5808fc898ecbbf23d93693f7d957a6700de144c6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
ZeroDivsionError: float division to Zero is generated because for assigning
value to 'factor' of uom in method '_set_ratio', it tries to divide value by
Zero for uom_type 'Bigger'.
Steps to reproduce:
1) Install 'Inventory' module.
2) Click on 'Configuration' > 'Settings'.
3) Activate 'Units of Measure' > click on 'Units of Measure' button under it.
4) Click on 'Create' button to create new uom category.
5) Give any name > in 'Units of Measure' page, click on 'Add a line'.
6) Enter name and select type as 'Reference unit of measure for this category'.
7) Now, add another line and select type as 'Bigger than the the Reference unit
of measure' and set the 'ratio' value to Zero, Error will be generated.
By applying this,it will check for the value of 'ratio' to prevent division by 0
sentry - 4174584503
closesodoo/odoo#122680
X-original-commit: b79e5afeba7f9517e0325a7a4f9b2373bf5317ed
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
- Add group bys, columns, and filters to Bank Reconciliation models for better navigation and organization
- Trigger auto-validate cron on saving Reconciliation model with auto-validate enabled
- Restore pre-filled elements when creating Reconciliation model through bank reconciliation widget (V15.2 functionality)
- Remove text ellipsis from Reconciliation model buttons in bank reconciliation widget for better readability
closesodoo/odoo#122657
Task-id: 3253304
X-original-commit: 6d0ffce1390d9c73042e39ab637c4c88ccb0e711
Related: odoo/enterprise#41570
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Erradi Mohammed (moer) <moer@odoo.com>
It takes 70s to generate a receipt with 2000 serial numbers.
It happens because during the first part of the loop
(model `stock.move.line` in the `create` method).
It will update the initial demand of the move based on the new
stock.move.line and their qty_done.
Writing the initial demand of the `stock.move` will try to reassign
it (useless in our case) and rewrite the same value on its state's field.
The consequence is the invalidation of the field on
the `stock.move.line` because it's a related to the `stock.move`.
In the second part of the loop, it check the sml state. Since it
was invalidate upper, it recompute it. That prevent a correct prefetch
and cause a performance issue.
We fix it by writing only once the information by move. And it
prevent the recompute later since the state is not write during the
loop.
closesodoo/odoo#122651
X-original-commit: 9dbc374fb89550444fc6f1c9445cb57067af214c
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Since commit [1], the state of the editor in the html field is only set
to dirty when the user triggers an input event. This means that if the
user uses the mouse to change the content of the field (eg, drag and
dropping snippets), the editor is not marked as dirty so the save button
will not appear and autosave will not work.
This commit fixes this by checking the editor's dirty state whenever a
history step event is triggered. Since this reverts commit [1], we need
to ensure the bug it fixed does not reappear. This is done by ensuring
we don't check the saved value against the modified editing value when
it's empty (namely, the editor doesn't allow an empty string as a value
and replaces it with `<p><br></p>`, which we need to undo in
`_isDirty`).
task-3263653
task-3288416
opw-3274329
[1]: https://github.com/odoo/odoo/pull/113088/commits/095bbb93d6c3b9b0b099b7ed1a6a15e8ad914e9fclosesodoo/odoo#122628
X-original-commit: db0c092973f480f3336a44e5f6868dc5a79f0e3a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
Current behaviour:
When activating "Prevent Sale of Zero Priced Product",
zero priced products could still be added to cart,
using the wishlist.
Expected behaviour:
Zero priced products should not be added to cart
Steps to reproduce:
1. Activate the setting "Prevent Sale of Zero Priced Product"
2. Create a product with a sales price of zero
3. Go on the product selling page, cannot be added to cart
4. Add the product to your wishlist
5. Go in the wishlist
6. The product can be added to the cart
Cause of the issue:
add_to_cart_button was overriden
Fix:
Added condition on override
opw-3283057
closesodoo/odoo#122618
X-original-commit: 37ae328e34a964e6daa31193e856322ccd59f597
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
The discuss app uses an url regex in order to find links and
transform them to html before posting a message.
Before this commit, some unsafe url characters were missing
from this regex, resulting in incorrectly parsed url.
This commit adds missing characters in order to match RFC1738
[1].
However the dot, comma and semicolon character won't be matched
if they are at the end of the url since those can be used as
punctuation.
[1]: https://www.ietf.org/rfc/rfc1738.txtclosesodoo/odoo#122621
Forward-port-of: 0dc68dc, 9302a23
X-original-commit: 80da20092b42d927ce8b09eb3b45de7216695263
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
This commit improves the behavior of the signature dialog. Now, we don't
force the display of the dialog to the draw tab after a click has been
made on a field with the signature widget. The dialog has already supported
the management of the default tab when no defaultName props is given.
A test has been adapted to test this new behavior. This test used the full_name
attribute to verify the presence of the 'Auto' button. Now, this button is
selected by default.
task-3259468
closesodoo/odoo#122600
Signed-off-by: Georis François (fge) <fge@odoo.com>
before this commit, in the warehouse form view
the name field was short and name cannot be read
fully without scrolling
after this commit, the field will utilize the full
available space and end users can read the name
easily.
closesodoo/odoo#121858
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Since MILK, the `bg-*` classes which used to set an appropriate
text color have turned into `text-bg-*`. Some were missed which resulted
in elements with low contrast between the text and the background.
This commit fixes this issue.
closesodoo/odoo#122606
X-original-commit: 15a2192c4fed0be7a62dbb6e0ab9eaadaecc10ce
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Signed-off-by: Thanh Dodeur (tso) <tso@odoo.com>
During the refactoring of discuss in 16.3, the setting to filter
the videos was wrongly observed on the settings instead of the channel.
This commit fixes this issue.
closesodoo/odoo#122605
X-original-commit: 00f55c6f925fa02cd292549498643f5415392a9f
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Signed-off-by: Thanh Dodeur (tso) <tso@odoo.com>