The commit https://github.com/odoo/enterprise/commit/19a144d6af2974e964c6487170e6bca1b14d3898 has
modified how libraries are loaded at several places and has
introduced a bug in sale_subscription_dashboard where the
libraries are no longer loaded at all. We fix that situation
by calling super in the willStart method of AbstractAction
that inherits from Widget. Abstract actions can now also
benefit from the mechanism present in Widget willStart.
closesodoo/odoo#32209
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Following the changes to the document viewer to make it more flexible
for use in documents (89f20d2c29), the download route wasn't changed accordingly.
This commit fixes this issue so the download route is based on
the model of the viewer.
closesodoo/odoo#32207
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, there was too much space after Many2ManyTags
fields. This was due to the fact that a many2one is embedded in the
many2manytags widget. Therefore, the css rule who add margin-bottom
was applied twice.
e.g.: Tags field in project task form view
To fix this, we remove the margin-bottom from the children widgets.
Note: This bug is not a big deal in previous versions but in 12.2
margins between fields has been increased in mobile and we clearly
saw this issue.
Task ID: 1944884
closesodoo/odoo#32193
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Purpose :
========
Maintain the uniformity between the sales and purchase menus
closesodoo/odoo#31482
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Usecase to reproduce:
- Go on a Mo
- Edit and Unlock
- Produce the MO
- Update a raw move and add a move line
User error you quant write on product_qty fields.
product_qty represent the reserved quantity on move line as quant's UoM.
The system requires to write a product_uom_qty that represent the same
quantity but in the move line UoM.
Fix it by removing the fields from the view, so it's no more save.
Also set the quantity done as readonly if the lines are present in
the view.
closesodoo/odoo#32135
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit ensures the qty_to_consume is always adapted to be the same
as qty_done in the onchange on qty_processing. This patch is needed to
keep the same behaviour before and after the workorder line refactoring
5ef46664a2
In fullcalendar, we have in f5b7ad80f fake moments date with UTC time
that are the local time, thus when we move an event to another day, we
need to set it as:
- the selected year-month-day
- the original utc hours (real local hours) -> local hours
- the original utc minutes (real local minutes) -> local minutes
- the original utc seconds (real local seconds) -> local seconds
When it is sent to server, timezone offset will be removed so we will
transfer to server the expected datetime in UTC.
With this changeset we send server the correct time when a fullcalendar
event is "all_day" but the original event was not (eg. drag and dropping
event on the month view).
Added test without change failed with:
- 4. event moved to 27th nov 16h00 +40 hours timezone
(expected "2016-11-29 08:00:00", result: "2016-11-27 16:00:00")
- 5. expected: "event|6|11/27/2016|16:00:00"
result: "event|1|12/09/2016|08:00:00"
- 6. expected: "event|1|12/09/2016|08:00:00"
result: "event|3|12/10/2016|23:55:05"
opw-1955281
closes#32136
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
When displaying product template list in kanban mode, all the variants
of the product template are loaded but aren't used at all. This causes a
perf issue when loaded product templates have a lot of variants.
This commit removes the field `product_variant_ids` from view
`product_template_kanban_view` to avoid that perf issue.
opw 1951369
closesodoo/odoo#32048
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
closesodoo/odoo#32185
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Do not raise if data have been deleted. Since the fields are not
required, do not fallback.
opw-1959184
closesodoo/odoo#32163
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Now that we don't take into account the legal leaves, it should be hiddden when the number of leaves is equal to 0 instead of 20.0
closesodoo/odoo#32125
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- The method `_is_available_on_website` on `product.pricelist` access to
the field `code` which is limited to the group `base.group_user`.
This causes issues when the method is called by a non internal user.
closesodoo/odoo#32123
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
- Set the 'Public Pricelist' with 'Discount Policy: Discount included
in the price'.
- Go to the shop and search the product 'iPad Retina Display'
- Add product to cart by using the quick add to cart button
The 'Add to Cart' modal show public price & discount to the customer.
Closes#31378
opw-1944362
closesodoo/odoo#32114
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Steps to reproduce:
- Create a clean Odoo 12E database and install Project, Timesheets, Accounting, Sales and Purchase applications
- Create a new project (e.g SO 6) and a new task (e.g milestone 1)
- Create a new user with access rights for Project = user and for Timesheet = user, and nothing else
- Login under this user, enter timesheet app and try to add a timesheet line in grid or kanban view
Bug:
An access rights error was raised but when trying to add a timesheet line from the list view, no
error was raised.
opw:1962126
closesodoo/odoo#32427
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Call super on overridden `_prepare_sellers` method in
purchase_requistion.
Closes#31649
opw-1963883
closesodoo/odoo#32470
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
If we create a package X transfering from location A to location B:
- we create a stock.quant for package X in location B
=> The package is on location "B" (OK)
If then we do a transfer of that package from location B to location A:
- we set the location B / package X quant to 0 size
- we create a stock.quant for package X in location A
=> The package is on location "A" (OK)
If then we do a transfer of that package from location A to location B:
- we set the location A / package X quant to 0 size
- we set the location B / package X quant to package size
=> The package still is on location "A" (wrong)
This is because:
- since c0d7a05730 stock.quant.package field `quant_ids` is a view over
related stock.quant but filtered on domain:
['|', ('quantity', '!=', 0), ('reserved_quantity', '!=', 0)]
- stock.quant.package fields `location_id`, `company_id`, `owner_id` are
updated when a related stock.quant has fields `package_id`,
`location_id`, `company_id`, `owner_id` modified
Thus when the `quant_ids` change by changing quantities, `location_id`
are not updated even if it should be.
opw-1963509
closes#32466
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
If the smtp session was dead, it would lead the whole mail batch to fail.
opw 1949270
closesodoo/odoo#32424
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
We base ourselves on commit f206714af0, which added a check on user groups.
The tax-included and tax excluded displays are meant to be exclusive,
but wily users can add themselves to both groups using the res_users view
in debug mode.
opw 1950833
closesodoo/odoo#32200
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
On a form view:
- we open a modal form view
- in this modal we open a modal form view
- we close that second modal
=> the modal is closed and the first one is still opened, but on mobile
we can't scroll to above or below the modal.
This is because bootstrap remove .modal-open class on body when we close
the second modal, but this class is necessary to scroll (this is not
much an issue on desktop since scroll is often not necessary).
We already had a fix that was weakened in 02a063fd73.
With this changeset, we keep .modal-open as long as a modal is opened.
Without the change, added test failed with:
10. Modal is said opened (expected: true, result: false)
opw-1948423
closes#32106
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before that, the tag set on this tag for its base amount was wrong; it caused it to be reported in the wrong section in l10n_fr_reports.
closesodoo/odoo#32103
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
moment().locale('en').format('YYYY-MM-DD')
"2019-03-25"
moment().locale('ar').format('YYYY-MM-DD')
"٢٠١٩-٠٣-٢٥"
moment().locale('my').format('YYYY-MM-DD')
"၂၀၁၉-၀၃-၂၅"
Was rejected as a valid bug at moment/moment#4448
Apply the same logic than 109b319d64Fixesodoo/odoo#32081closesodoo/odoo#32102
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Onchange to show only the states of an especific country in
opportunities.
Closes#31993
opw-1958170
closesodoo/odoo#32099
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Currently doing a like then dislike does not give a void karma total. Indeed
karma is removed / added only when the vote hits 1 or -1 but does not correctly
take into account the third (void) state. We also avoid adding karma when
upvoting / downvoting an already upvoted / downvoted slide. Interface does
not allow it but avoiding to add karma at model level is always a good idea.
Karma-related tests are improved a bit.
Commit linked to task ID 1958810 and PR #32057
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose is to avoid having to recompute too much stuff. Indeed currently
slide.channel.partner completion field depends on its channel number of
slides. It means adding a slide on a channel having a lot of members will
trigger the recompute of all its slide channel information.
Instead completion on slide.channel.partner is now simply the number of
completed slides. Computed (not stored) field on channel that indicates
current user status is now based on total slide (completion / total slides).
Commit linked to task ID 1958810 and PR #32057
As we always update slide / partner relationship using sudo let us remove
unnecessary sudo in the computed field.
Tests are added to ensure it is effectively working. At least probably.
Commit linked to task ID 1958810 and PR #32057
When displaying product template list in kanban mode, all the variants
of the product template are loaded but aren't used at all. This causes a
perf issue when loaded product templates have a lot of variants.
This commit removes the field `product_variant_ids` from view
`product_template_kanban_view` to avoid that perf issue.
opw 1951369
closesodoo/odoo#32048
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The editor has a tooltip editor wizard "Change media description and
tooltip", but when selecting an image there is also a tooltip:
"Double-click to edit"
added by the editor.
The combination of the two break the functionality, eg:
- if a tooltip is set with editor, then selecting the tooltip: we see
the set tooltip and not "Double-click to edit"
- if a tooltip is set with editor, then selecting the image back, then
opening the tooltip editor => the set tooltip is lost
With this changeset, we just do not show "Double-click to edit" tooltip
if there is a tooltip set on the element.
opw-1946801
closes#32482
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Have the module 'City Addresses' installed.
Open a contact, with the city field and the zip code field filled.
Before this commit, there is a display error, the city and the zip code
are bonded. This occurs because the 'City Addresses' module override all
views with the city field. In this override the city field don't had a
CSS class.
Now, the city and the zip code are display correctly.
opw-1958175
closesodoo/odoo#32455
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before this commit, some constrains rose UserError
Which is not compliant with the api.constrains
After this commit, the constrains raise ValidationError
OPW 1949572
closesodoo/odoo#32444
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
The payment token was created using the partner of the invoice,
not the one really paying the bill.
opw 1938787
closesodoo/odoo#32176
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Creating field indexes might not always be possible. For instance,
adding an index on an existing Char/Text field will fail if the column
contains values longer than 8192 bytes (PostgreSQL limit for BTrees).
Instead of failing miserably during the schema modification, simply log
the problem and continue.
closesodoo/odoo#32416
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
- Set up a stockable product for which the product category is FIFO / Perpetual
- Create a PO for this product with a unit price of 100$
- Confirm the purchase order
- Receive the item in stock
- Create a SO for this product
- Confirm the SO
- Deliver the item
- Unlock the delivery order and change the done quantity to 0
- Unlock the delivery order and change again the done quantity to a positive value
A `ZeroDivisionError` is raised.
Since `move.product_qty` is still zero, we fallback to `quantity`.
opw-1963984
closesodoo/odoo#32421
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>