Steps to reproduce the bug:
- Create a consumable or storable final product A with invoicing policy
in "delivered quantity"
- Create two storable products B and C
- Create a BOM kit for A with 1 B and 1 C
- Create a SO with 5 qty of A and confirm it
- Deliver 3 B and 2 C and either on "No backorder" or "With backorder"
Bug:
The delivered_qty on the SO line is of course not automatically updated
(as in this case, a right value is not computable) but the delivered_qty
was not updatable manually and then it was possible to invoice the SO.
Co-authored-by: nim-odoo <nim@odoo.com>
DO NOT FORWARD-PORT
opw:1966170
closesodoo/odoo#32583
Signed-off-by: Simon Goffin (sig) <sig@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
When a user register a payment for multiple invoices,
the communication field is populated using all invoices.
However the payment should use the communication individually for each invoice.
This is a behaviour closer to what is done in 74b6f84cc8 for v12.
opw 1954887
closesodoo/odoo#32143
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Commit 1be873d removed the modification of the reference field
from the _onchange_origin.
The reasoning was that since this is an onchange on invoice_line_ids, it was
applied too often, which annoyed users in the case they overwrote that field.
However when using the "Autocomplete" field (purchase_id),
then the user expects values to by modified.
Before, it worked by setting the origin field, which trickled down
to the reference.
Since that commit removed this, we re-add it explicitly in that case.
opw 1962364
closesodoo/odoo#32656
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
The field `order_mail_template`'s purpose is to provide a shortcut to
help the configuration. When `website_quote` is installed, it points to
a template which is actually never used anywhere.
opw-1961866
closesodoo/odoo#32543
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
To comply with Mexican laws, this l10n_mx_edi should always be installed when
both l10n_mx and the accounting modules are installed.
It should ease the onboarding process a bit too.
opw-1960982
closes#32566
Signed-off-by: Christophe Simonis <chs@odoo.com>
Before this fix there was no check if there was already a decimal point
in the value when using the onscreen keypad.
Fixes#32034
Steps to reproduce:
* Open up POS interface
* Add an item
* Press the decimal point button multiple times (2 or more)
* Note that pressing additional number keys do not display
* Backspace must be pressed for the number of digits entered,
plus the multiple decimal points, to clear
all the hidden characters in the value buffer
* Same behavior occurs with the Discount and Price
values
Current behavior:
Multiple decimal point characters can be
"entered" and are inserted into value buffer
(Qty, Disc, or Price), but do not display on
screen.
Additional digits entered after multiple decimal
point presses are inserted into buffer, but do
not display on screen.
Additional digits entered after the last valid
digit on the screen are also inserted into the
buffer.
Backspace must be used to remove the invisible
characters from the value buffer.
Expected behavior:
The value buffer for Qty, Disc, or Price should
more closely match what is displayed on the
screen.
Characters which are invalid and aren't
displayed on the screen, should not be inserted
into the value buffer, including the decimal
point button.
closesodoo/odoo#32089
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
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>