Since it is possible to create an operation in the regular list view, it
should also be possible to do it in the kanban mobile view.
opw-1963527
closesodoo/odoo#32907
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
added 5% tax rate for sale and purchase which was missing
was task# 1915454
closesodoo/odoo#33400
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
1) In the settings of project, enable sub-tasks.
2) Create a new project with a sub-task.
3) Create a new product (type service).
4) In the "Sales" tab of the product check the "Create a new project
but no task" in the service tracking options and select the created
project as project template.
5) Create an invoice for that service and confirm it.
The sale order is set on the tasks of the duplicated project but not on
the sub-tasks.
The `write` mechanic is override in project.task to apply modifications
done on the parent task to its sub-tasks. The method
`_subtask_write_values` is used to gather `{field: value}` pairs and
update the sub-tasks. That method is override in `sale_timesheet` in
order to force the `sale_line_id` to `False` when the project is
duplicated because the duplicated project is not attached to the sale
order of the original model.
The fix has been re-write the `sale_line_id` value on sub-tasks.
opw-1985484
closesodoo/odoo#33416
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
The field website_published is not ensured when module portal
is installed because the module portal doesn't depend on module
website_mail.
PS:The module website_mail depends on the module portal because
website_mail depends on website and website depends on portal.
opw:1997478
closesodoo/odoo#33452
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
The rte_translator tour that test translation on the frontend could not
be started from the "[debug menu]" > "Start Tour" for two reasons:
- the start URL is not specified, so the test was started on current
backend page wich is wrong (in python the start url is "/")
- the backend original state (params after #) does not work with ?k=v
inside argument value, so `#return_url=/?debug=true`.
To solve this issue, we encode the return_url value and add a start url
when rte_translator is started manually.
opw-1998623
closes#33443
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
- Create a tour with only one step for Community
`edition: 'community'`
- Install a database in Enterprise
`tip.in_modal` in `_check_for_tooltip` cashes since `tip` is undefined.
opw-1998603
closesodoo/odoo#33430
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Include the Google Error message in the error message showed on screen.
Fine tuning of da13c70484 : missing transiflex translations, empty body,
wrong string format.
opw-1966309
closesodoo/odoo#33216
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
The snippets "Latest Posts - List" and "Latest Posts - Big Images" have
a "Number of columns" options but:
- these snippets are not taking the option into account and are
specifically size (in large "list" => 100% width, "big image" => 50%)
- the snippet content is dynamically generated, so the column sizing
set on preview when saving is lost when content is displayed
- the option "Number of posts" contradicts the option
"Number of columns" and can leads to have several lines that are not
taken into account in "Number of columns" (the column number is the
number of child)
Thus, this changeset disable the option for these snippets.
opw-1984899
closes#33393
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Fine tuning of 5ef86ef6c874ab4dc78402493d05b2460c69e7f6
Steps to reproduce:
Set a custom language settings for date by switching the %m and %d.
Create a sales order
Current behavior:
Invalid date error boxes was raised two times
fixes#33408
opw:1998971
closesodoo/odoo#33415
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
When a leave type is in hours, before this commit:
- in the leaves request list the request duration is shown in days.
- the name of the leave shown duration in days.
- the rounding after the conversion from hours to days, generates some
misunderstandings. If you have a day of 7.5 hours, and you take a leave
of 2 hours, it would be round it to 0.25 days, and not to 0.27 days as
it should be. This occurs because we round to the 1/16 of the day.
Now:
- in the leave request list, the request is shown either with days or
hours depending on the leave type.
- the name of the leave shown duration either with days or hours
depending on the leave type.
- the leaves are shown in the correct unit, there is not more
misunderstandings occurring because of the rounding.
related to commit : 5c33ebef5f and 2c366acbf0
opw-1974691
closes#29804closes#33290closesodoo/odoo#33369
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Activate online payment of invoices
- Activate and configure Stripe
- Create an invoice, access it through the portal
- Pay it with Stripe
The user is redirected to `/my` instead of `/my/invoices/<id>`.
The root cause is because Stripe creates 2 transactions, the second
being created at:
https://github.com/odoo/odoo/blob/43295c2a3741fb98f9c5d1a506652442efed0a82/addons/payment_stripe/static/src/js/stripe.js#L108
This second transaction, which is used to record the payment, doesn't
contain the appropriate `success_url`.
The best fix would probably be to either:
- prevent the creation of the second transaction by refactoring
`stripe.js`
- pass the appropriate `success_url` to the `stripe_form` template
- reuse existing draft transactions instead of creating a new one
None of these solutions is really suitable for stable since it might
require some heavy modification. However, a simple workaround is to
change the fallback `success_url`since we have all the necessary information
to build it.
opw-1997283
closesodoo/odoo#33404
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Go to the website settings and activate the option 'Tax-Included' for
the pricing in the website.
- Go to Sales > Configuration > Delivery methods and create a new method
based on rules. For example:
Price is 10.0 when the weight <= 100
Attach a product (with taxes) to it.
- Publish on website
- Buy a product on the eCommerce
- Checkout, go up to payment step and choose the delivery method created
The 'Delivery:' field on the left shows the delivery price with taxes
excluded although they are included. Funny thing: going back to the
'Address' step show the correct price.
This is because the `delivery_price` field does not take into account
the tax configuration.
We can use the `amount_delivery` field (hum hum) which does it
correctly.
opw-1981808
closesodoo/odoo#33394
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Install discuss, change the general setting in dev mode to disable the
"Show Effect" checkbox. Change the preferences of the user to let odoo
handle notifications. Ask another user to ping you on a chatter then go
to discuss and click the "Mark as Read" button. Traceback.
The `notification_manager` agent has been replaced by another agent in
07cd24b1ec, the code has been updated to use the new agent.
opw-1986844
closesodoo/odoo#33363
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
This reverts commit dbaef7de17 since it
causes issues (unbalanced moves). Temporary revert so we have time to
analyze the issue.
opw-1997794
closesodoo/odoo#33380
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Steps to reproduce the bug:
- Go to any field Date
- Enter wrong date
Bug:
A traceback was raised.
Now a warning is raised and the wrong value is removed.
opw:1974747
closesodoo/odoo#33362
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Before this commit and since 2f7c03d9ca, the admin user has not ID=1
anymore.
Thus, some old condition were not doing what they were expected to.
Firstly, the admin was not considered as such on the forum, and if its karma
points were not high enough, it would not be possible to do anything for the
admin. Note that it was fixed in saas-12.1 with 1dac413130
Secondly, some _search functions would not return a truthy value anymore.
closesodoo/odoo#33359
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Commit 98ee15977a made the Stock Interim accounts reconciliable,
and introduced auto-reconciliation of related entries. This has the
advantage to clean-up entries in these accounts. However, since these
accounts are reconciliable, the entries will show up in the manual
reconciliation widget (expected) and the bank reconciliation widget (not
expected).
There are 2 cases where it causes issues:
- after migration from v11, the entries were not reconciliced. Although
this will be fixed in the near future, it is too late for already
migrated databases
- using MRP. A list of components i costing Xi might be used to create a
finished product of cost Y != sum(Xi). Indeed, the routing cost has to
be taken into account. In this case, the entries are not fully
reconcilied.
The result is that the bank reconciliation widget ends up with an
growing number of unreconcilied lines, and in the end making it
impossible to use.
In order to work around the issue, we prevent any account used as a
stock interim account to be included in the bank reconciliation widget.
For performance reasons, we directly search the `ir.property` table for
the corresponding accounts instead of filtering AML thanks to
`excluded_ids`.
Closes#32611
opw-1963025
opw-1967462
closesodoo/odoo#32957
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When using `sales_team.team_sales_department` as fall back default
team, last condition that checks if such team can be default was
incorrect, because `active` value check was mixed with lead type check.
In other words: True or False and False => True
But intention is: (True or False) and False => False
opw 1997715
closesodoo/odoo#33316
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
The field session_ids is fetched from the server for what seems to be no
good reason at all; for database with a lot of sessions (test case with
40k+ sessions), this can lead to an extremely slow dashboard.
closesodoo/odoo#33303
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Create 2 companies A & B
- For each company, create a website linked to a different URL and
activate 'Free sign up' and 'Specific User Account'.
- As a public user, go to website of company B
- Go to 'Sign in > Don't have an account?' and create an account
The user is created in company A (the company of the user template)
instead of company B (the company of the website).
We set the company of the user based on the company of the website.
opw-1962197
closesodoo/odoo#32823
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Create 2 companies A & B
- For each company, create a website linked to a specific URL
- As a public user, visit website of B
- Buy a product, register your address
The partner is in company A (the company of the superuser) instead of
company B (the company of the website).
opw-1962197
closesodoo/odoo#32822
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
We remove the remaining comparisons to use the precision rounding of the UoM.
opw 1969888
closes#32707closes#32745closesodoo/odoo#32844
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
- When changing the `holiday_type` of a leave allocation while having an
employee set and if this `holiday_type` has as its value `employee`
the field `employee_id` is set to False.
This is not the intended behavior. We want the field `employee_id`
to be filled if the `holiday_type` is set to `employee`.
closesodoo/odoo#32886
Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
Backport of 7bc53ac30e.
Assume an editable list view with a date(time) widget, click to
edit a line, focus the date field (the datepicker opens), press
ESC: there is a crash in the lib, and the datepicker remains open
forever.
This fix is twofold:
- we added a check in the lib to prevent it from crashing (it is
easily reproducible: it crashes when an opened datepicker is
removed from the DOM).
- we added an event handler of ESC keydown event to hide the
datepicker before the field is removed from the DOM.
closesodoo/odoo#32647
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Create a SO with two lines (sol_1, sol_2) selling a given service.
On the corresponding Project/Task, set the partner so that the sale_line_id
can be chosen to one of the lines.
Add an AAL with x hours, save.
This updates the delivered quantity (x) on sol_1.
Edit, change the sale_line_id to the second one:
it updates the delivered quantity on sol_2 (to x) but not on sol_1.
Has a result, the delivered quantity has been doubled.
The issue is that the quantities are only recomputed on the SOL that we write;
instead they should be recomputed on the old one and the new one.
We base ourselves on 371a92fb which solved a similar bug to add the recompute on
both lines.
opw 1959509
11.0-opw1959509-sltmsht-len
closesodoo/odoo#32820
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Fine tuning of ac31252d54
Do not pre-filter on canceled entries since they are used a few lines
below.
opw-1964459
closesodoo/odoo#32835
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Have a SO with a quotation template and some optional products set
Display it on the portal
On an optional product, click on the cart icon
to add it to the SO
Modify the quantity of the optional product
Before this commit, the feature was barely working:
- the total price of the optional product did not change
- negative quantities were allowed
- there was no reaction when directly putting a number in the input
- when decrementing the quantity, it crashed
- untaxed and tax amounts were not dynamic
After this commit:
- the total price of the optional product changes as a function of the quantity input
- negative quantities are not allowed
- it is not possible to manually input the quantity with a keyboard
only +/- buttons are used to change the quantity
- decrementing the quantity works
- untaxed and tax amounts are dynamic
OPW 1947769
closesodoo/odoo#32715
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Commit 1da63f0ab0 removed the
uninstall_hook defined in sale/__init__.py but forgot to remove it from
the __manifest__.py, resulting in a traceback when uninstalling the
`sale` module.
closesodoo/odoo#32804
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
`reserved_availability` is a computed field of a move depending on its
move lines. We access this field at each iteration of the loop over the
moves to assign and then we create a new move line for it. This triggers
an invalidation of this field, The next iteration will again access this
field and prefetch it for all the next records.
We read the field out of the loop and don't access it again to prevent
these prefetch/invalidation issues.
Confirmation of a PO of ~800 lines goes from 5 minutes to 1 minute.
opw-1953398
closesodoo/odoo#32774
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
closesodoo/odoo#32805
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, when the PO was locked:
- the button create bill did not appear on the form view
- on the invoice form view, the field autocomplete did not mention the PO
After this commit, the button create bill is present, and the PO appears in
the auto-complete field of the Vendor bill
OPW 1970537
closesodoo/odoo#32794
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Commit 27d41ccb introduced record rules on resource.calendar.leaves.
However it gave no way to create, edit or delete a global rule.
We grant this right to the group_erp_manager, so that an admin can do it.
opw 1968376
closesodoo/odoo#32832
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
OPW-1967543 on non-trivial multi-level test BOM, MO creation goes from
30s to 13 on my system.
closesodoo/odoo#32819
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
- Install 'quality_mrp_workorder' without demo data
- Go to the General Settings
A warning is raised regarding the uninstallation of 'mrp_workorder'.
This is due to `_onchange_group_mrp_routings`, which assumes that the
installation of 'mrp_workorder' is only linked to the group
`group_mrp_routings`.
This is incorrect: `group_mrp_routings` might not be activated, but it
might be in the dependencies of another module. Therefore, we change the
logic: if we activate `group_mrp_routings`, we install 'mrp_workorder'.
If we deactivate `group_mrp_routings` we do not uninstall
'mrp_workorder' if it is already installed, since it might be required
by a dependancy.
opw-1970910
closesodoo/odoo#32811
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The base_setup.show_effect parameter is created at module installation (with
an external id) and is removed (and its external id) when the option
"Show Effect" is unchecked from the general setting.
When this option is checked again, the ir.config.parameter entry is recreated
but without an external id (as it is user-provided data, not from a data file).
When the module base_setup is updated, the record base_setup.show_effect is
recreated and the unicity constraint on ir.config.parameter is raised.
Set the record as forcecreate="False" to avoid recreating it when the module
is updated.
Anyway, if somebody uncheck the option, it is not expected to get it back when
the module is upgraded.
Fixesodoo/odoo#32806closesodoo/odoo#32808
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
- Set the company currency to USD, activate multi-currency
- Create a rate of 0.5 for EUR
- Create a purchase tax T:
Percentage: 10 %
Included in price
- Create a PO in EUR with the followind line
Quantity: 10.0
Price Unit: 1.0
Tax: T
- Validate the PO, receive the product
The journal entry is composed of 2 lines:
- debit: 18.18; amount currency: 10.0
- credit: 18.18; amount currency: -10.0
This is not correct: the amount currency should not include the tax.
In order to prevent this, we use the subtotal, and divide by the
normalized quantity (yeah, because it was also failing in case of multi
UoM, as one could have expected).
opw-1958287
closesodoo/odoo#32797
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Fine tuning of commit b9e3c153, for the same use-case.
The route may not be passed in values, in which case the bug is still present.
There are two ways to go around that.
We could add the stock.rule in values, which contains the route.
The solution we adopt here is to use the sale_line_id field on the purchase line
If it is present, it was added through _prepare_purchase_order_line,
and thus we want to keep track of the origin.
opw 1957701
closesodoo/odoo#32683
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
It's quite common that the `$().text()` method returns lots of random whitespaces at the beginning and end of the string. They're pretty unpredictable (extension views can add or remove them) and invisible to the end user.
This code chunk should allow to select an `<option>` based on its raw text content, but most of them will just fail without this patch. And most chances are that current ones just work equally with this patch.
This will make frontend tours more pleasant to write.
closesodoo/odoo#32791
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The depends value on picking weight and package_ids of picking are only
set on the move_line_ids, which lead to compute the value of the picking
weight only when move lines are created or deleted and not when a
package is set on a line, quantity done changed and/or unit of measure
changed.
To fix this issue, we've changed the depends, of thos computed fields.
closesodoo/odoo#33114
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
- Set the company currency in USD, activate multi-curency
- Create an invoice in EUR
- Create a payment in EUR for less than the invoice
- Open the payment matching => all amounts are in USD
- Create a write-off, reconcile
The write-off amount is incorrectly converted.
The write-off amount is sent in USD, but considered in EUR in the
server since the currency considered is the one of the line. However,
the currency in the widget is computed based on the account currency:
https://github.com/odoo/odoo/blob/b6f55dac5633d8ccb16568e0c85a5c32072e8846/addons/account/models/account_move.py#L654
Note that this is the opposite of commit 1806ea1859,
introduced in v9. Since the widget was refactored in v11, many changes
have been introduced, and we assume that this change is now justified.
opw-1907332
closesodoo/odoo#32723
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Commit d7a3f39d refactored hr views.
This broke the inheritance of the view in that module.
opw 1971570
closesodoo/odoo#32972
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
The use case is similar to 084dbf9b8f, but
applied to pickings.
When the picking contains many stock move, the manual edition of the
quantitites is quite slow due to the `onchange` call. In the example of
the OPW with 300 stock moves, the modification of the done quantity
triggers an `onchange` which lasts about 1 second.
The reason is the same than in the mentioned commit: the `onchange` is
triggered on all lines in the case of an inline tree view, and there is
not much we can do to optimize the business logic.
Therefore, the solution is the same: add a stat button to access the
stock moves directly in a tree view instead, to avoid this `onchange`.
opw-1965248
closesodoo/odoo#33004
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Create 2 invoices for a customer:
Inv 1: 100
Inv 2: 200
- Register a partial payment of 80 on Inv 1
- Select both invoices and pay the remaining amount (220)
- Print the 'Payment Receipt'
The 'Amount Paid' for Inv 1 is 100, while it should be 20.
This is because the report doesn't take into account which part of the
payment was used in the corresponding invoice.
Closes#32755
opw-1970401
closesodoo/odoo#33012
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Since commit 56645335b7
the subtype `gamification.mt_badge_granted` is not used anymore. Therefore
this method will never return anything.
However, it is very costly on performance, and it is run on every page of the
forum! The problematic performance point is that `needaction` is a computed
field, which implies all existing `mail.message` having the target subtype have
to be fetched to compute this field, which obviously does not scale well at all.
closesodoo/odoo#32861
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>