This commit fixes timer related issues on survey flows, for both regulars
surveys and survey sessions.
The timer was unreliable in its completion by a whole second, which had not a
big impact at the user level but could make some tests fail (randomly).
Side changes from this commit:
- Reduced delays in the survey session tests to speed up testing
- Removed some timer flickering on survey views
LINKS
Task 2230526
Runbot error ID 535
closesodoo/odoo#49178
X-original-commit: 15c72aec71d42624685fb0fc9df25279c7855310
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- A tag has been added next to the title of each tab in the profile when the user come from a specific forum. The goal is to indicate to the user that the displayed content is specific to a given forum. The tag can be clicked by the user to remove the applied filter.
- Change label in edit profile page from "real name" to "name"
Task Id: 2214425
closesodoo/odoo#48665
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before 13.0, when there is no salesperson on the customer or company or
website, when a ecommerce sale order is done we get the OdooBot as
salesperson because we update partner on sale order in superuser.
In 13.0, since superuser doesn't change UID, the salesperson will be
assigned to "Public User" or the customer that create this order.
opw-2232201
closes#49141closesodoo/odoo#49161
X-original-commit: 0b6a2569920b6584652c39b3465998649fe305b4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Current Behaviour:
As Admin:
- Install timeoff and enable Multi company
- Create new company and switch to that company
- Go to timeoff > Managers > All > Allocations > Create a record
An AccessError is raised from `_onchange_type` because it try to
access `employee_ids[:1].id` and it may gives employee of another company.
Expected Behaviour:
After this commit, it will not raise the AccessError. if employee of
that company is exist then and then set on leave allocation.
so we have already compute field `employee_id`, it will gives employee
of current company.
closes odoo/odoo#49120
Taskid: 2179571
Closes: #45381
X-original-commit: 73b3d11a0b443116ce91d889397c6d85a13ca1eb
Related: odoo/enterprise#9712
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
There is an alignment issue while browsing courses page in Leaderboard and
Latest achievements panel.
In this commit we simply fix it with no-gutters to have all items aligned
properly.
TaskID - 2227683
closesodoo/odoo#49125
X-original-commit: 84270b8f542313235a35fc0449600a8ff5dc8785
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit:
When a PoS session is closed in anglosaxon accounting with real time stock valuation, the stock moves linked to PoS orders are used to create the stock valuation entry.
When an order is composed of only products of type 'service', there are no picking linked to the order, and so the entry is created with all stock moves having no picking_id.
After this commit:
To avoid this problem, we are checking that the PoS order has a picking before looking for stock moves.
OPW-2206625
closesodoo/odoo#49117
X-original-commit: 0386e1f099bf42a59a79febfa06906dd76bd62e2
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
While installing a module on an existing database, the modification of
groups should reset the `base.user_groups_view` to a dummy view in order
to validate user views. The `user_groups_view` is set to its "right"
value at the end of the installation.
closesodoo/odoo#49114
X-original-commit: 071bd77944484bad6f2c0cb9a7a98785dcc693c6
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Improve the mailing.trace.report search view to help users find their statistics based on specific campaigns, and added some minor changes to mailing views
- Rename "mass mail campaign" to "mailing campaign"
- Rename "create a mass mailing list" to "create a mailing list"
- Add sum footer on bounce
- Add mailing and campaign field to reporting search view
- Hide campaign field in search views when campaign option is not activated
Task ID 2210331
closesodoo/odoo#48711
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, users can't switch Outgoing Mail Server once the mailing has been
sent. This might cause issue some situation. For example, the user has two
Email Servers. He tries sending with the first server and something is wrong
then emails couldn't be sent. So in this case user can not edit the mail
server and instead has to create another mailing with second working server.
This commit improves the behavior by removing the readonly attr on
`Mail Server` field of mass mailing.
Task-Id : 2223141
Closes : #48256
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Create a tax:
Fixed price: 0.355
Included in price
- Assign the tax to product P
- Create a POS order with P and a price 0, pay by bank
- Create a POS order with P and a price 10, pay by bank
- Close the POS session.
The following entry is created:
D C
Tax Received 0.01 0.00
Product Sales 0.00 9.65
Product Sales 0.36 0.00
Receivable 10.00 0.00
Several issues:
- the entry is posted and unbalanced: covered in #48484
- rounding of 0.355 was either 0.36 or 0.35: to fix one day... [1]
- the tax received of 0.36 for the POS order of 0 is booked on the debit
rather than on credit, leading to a difference 0.01.
This happens because the taxes amounts for the POS order of 10 are
positive, while they should be negative for a sale as done in [2].
We set the amounts as negative as done for incoming invoices, and adapt
the tax line creation accordingly.
[1] The use case is weird: a fixed price of 0.355 while we only have 2
digits in the currency?
[2] https://github.com/odoo/odoo/blob/e415cffa2ffb3fe4b5f0e32bd96b3433387a95e3/addons/account/models/account_move.py#L461
opw-2168096
closesodoo/odoo#49104
X-original-commit: 5df8ed72d03de635f3c38ce59c1b3e9c9ce51ed2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Usecase : sell a mto/manufacture product. Confirm the sale order.
Cancel the delivery and the production then
duplicate the delivery.
- if the delivery was cancelled before the production, another
production is created.
- if the delivery was cancelled after the production, no other
production is created.
In the second case, the production cancellation will reset the procure
method of the delivery. The duplication will not trigger the mto
procurement.
This commit will override the procure method of each cancelled moves and
set it to `make_to_stock'. This way, we have the same behavior independently of the flow.
Task : 2212125
closesodoo/odoo#48366
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Followup of
https://github.com/odoo/odoo/commit/58df6c86e06304b2c5f020e0fb93988e9e388fe0.
By default, the create, when not specified as `api.model`, supports
creation in batch (thus the batching opportunity isn't lost here).
BUT, if a create override isn't specified as `api.model` or
`api.model_create_multi`, it won't be accessible in rpc calls (because
the ORM thinks a record in self is needed).
It doesn't look like somebody can create stock move lines from the web
client itself, but it doesn't cost anything to follow the global api
(and it's clearer to clearly specify the create as create_multi).
closesodoo/odoo#48964
X-original-commit: a4fd8f8062046bcea97d9f7cfe300e19020cdecd
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
For the `mrp.routing.workcenter`, removes the help from the `worksheet`
field to set it into the view.
This way, the tooltip doesn't appear each time the user cursor is placed
in front of the pdf in the workorder tablet view (`mpr_workorder`).
task-2225362
closesodoo/odoo#48903
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Adds special taxes used in sales and purchase of alcoholic beverages.
[FIX] l10n_cl: change percentage amount of "retencion de segunda categoría" to the value changed by law in year 2020
closesodoo/odoo#48804
X-original-commit: c7592d614728ded8e6a9faa570a49b370515ecea
Signed-off-by: Josse Colpaert <jco@openerp.com>
When `_synchronize_alias` was introduced into crm.team.write, the write
method become incompatible with batch writes because
`_synchronize_alias` assumes `self` is a recordset of length 1 and
performs attribute accesses directly on self, this makes the __get__
crash because it performs a `self.ensure_one()`
With this commit, crm.team.write will iterate over the self recordset
and call `_synchronize_alias` on every record of the recordset.
This also solves a uninstallation problem in sale_crm because a write is
performed on crm.team in an uninstall_hook.
closesodoo/odoo#49088
X-original-commit: a9511cd42be365e58371d717b8197aac644eaf33
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
This commit concerns tours executed in onboarding mode (the user
manually follows the steps and consumes the tips).
Commit [1] changed the default event type to consume a tip from
'mousedown' to 'click'. This caused an issue when a tip was
attached to an element that had to be dragged and dropped. The
issue has been fixed by [2]. This fix is based on the fact
that draggable elements have classname 'ui-draggable-handle'.
Kanban records are draggable, but their implementation uses the
'sortable' feature of jQuery instead of the 'draggable' one (the
records are also sorted in their column). So [2] isn't enough in
this case. For instance, in the crm tour, the tip telling to drag
and drop a record to another column can't be consumed.
This commit handles the case of sortable elements that have to be
dragged and dropped.
[1] e5bc2e7306251a55ce90adeef992840517c240e6
[2] 3f458fe06e6a629edc72428eab749068c2eba1ba
closesodoo/odoo#49072
X-original-commit: 67335bda1653f592011a57146fb750d7b69cfc27
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
before this commit: from commit: https://github.com/odoo/odoo/commit/d58d6e270f4106d717821438490f60bc4f71306e parent context
was propagated to sub views, propagating whole context to sub view creates
issue as it contains default_* key inside it, there is a chance that sub view
has same field name which matches with default_fieldName in context,
e.g. go to sale order form view and create sale order line, while selecting
product, write in product_id field so that Create and Edit option comes,
select Create and Edit option, so whatever previously written in product_id
field will be added in product.product form's context as default_name,
now go to Purchase tab of product form and try to create Supplier, but note
that Vendors One2many should be editable, if it is not then to produce this
issue, make Vendor o2m list editable top/bottom, as soon as you click on
Vendor o2m's create button traceback generated which comes from name_get of
res.partner, issue raised because vendor o2m has m2o of res.partner and field
name is 'name', when default_get for vendor o2m is called it will propagate context
and context has default_name='typed string in product_id', as name field is
m2o with res.partner it will generate traceback as m2o accepts (id, name) tuple
not string
after this commit: propagate context to sub view but remove default_* keys
from parent context
task-2121161
closesodoo/odoo#49075
X-original-commit: 2e3756e0ce96a9e0c5fa304632a2600cbd832ef5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In case `carrier_tracking_url` is `False`, a `TypeError` is raised and
not catched.
opw-2232268
closesodoo/odoo#49083
X-original-commit: a4b5bd7770bca3f2e4327c65de673e2fcc00e7e5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Activate "Product Packagings" in the Sales Settings
- Define a package on a storable product with a contained Qty of 1.8
- Sell 5.4 units of this product in an SO and use the package.
A warning is raised.
This happens because 5.4 % 1.8 = 2.220446049250313e-16
opw-2228859
closesodoo/odoo#49070
X-original-commit: f1e79c74a5c07d6be3154629f6f381ebaf907fb1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When we uninstall a payment acquirer, its state should be `disabled`
because when we succedingly reinstall it, we want the
required_if_provider fields to possibly be unset (which is only possible
if the state is not in `enabled` or `test`).
opw-2223094
closes#49033closesodoo/odoo#49061
X-original-commit: ddf07ef2d9741d1db546efb1364718ff9e247aaf
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before this commit, the value of the search bar remained when the auto-completion
dropdown was closed (via click out or "Escape"). This was inconsistent with the
behaviour of the search bar which is supposed to show the auto-completion values
related to the search input.
Now, the value is cleared when the dropdown closes.
Task 2227590
closesodoo/odoo#49066
X-original-commit: 1c3e6ef0a5946ce415c9a210546b207011a51b3d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Before, when a session was open, we couldn't change any of the options in the pos config.
Now, we're able to change most of the options except those which would lead to incorrect behavior.
closesodoo/odoo#40500
Task-id: 2086823
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
1. Install the Australian Accounting localization pack.
2. Create a Bill, use the existing pre-defined tax, "GST only on
imports".
3. See that the subtotal of the line will be changed to 0.01.
4. See that at the bottom there will be a GST 100000000% amount showing.
The tax data need a upper percentage to avoid the 0.01 rounding issue.
opw-2226119
closesodoo/odoo#49032
X-original-commit: 5bf911fe3c0d2e461e31ab47b74bba173171dbea
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, There was expected singleton tracback on Archiving multiple Coupons at once.
With this commit, We are passing single Record to process.
This is manual Forward port of https://github.com/odoo/enterprise/pull/9637
(Coupons modules went from OE to OC in saas-12.3)
closesodoo/odoo#48996
X-original-commit: d8c2c7269560920511598414741ad42e1f7a0213
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Iteration methods on LRU were removed because they were not
thread-safe and it's not clear that making them thread-safe is the
correct thing to do, so not providing them seems saner.
I thought I'd looked for usages of the LRU but apparently didn't look
hard enough as I missed that it's used by the cron workers (apparently
using the threaded server we only run crons for dbs currently living
in the registry cache, the more you know).
Convert these to iterating on the LRU's internal mapping, and also
don't iterate on the LRU to clear its entries one by one when we can
just clear the entire thing safely, although Registry.delete_all
really seems completely unused.
closesodoo/odoo#49023
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This JS test file has already been moved to enterprise.
Upgrade note: updating this template is not mandatory for existing
databases, but a nice to have for new ones.
closesodoo/odoo#49020
X-original-commit: 7b00581a249556695fbfc1b21cbe30d4c702787e
Related: odoo/enterprise#9685
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
- The payment link generated by using the wizard
`payment.link.wizard` are overriden to generate
URL linked to sale orders.
If so, we want the payment acquirer displayed to
be in the same company as the sale order.
closesodoo/odoo#49018
X-original-commit: 8c299efb6cb4355cec39cdedd8d7c3134f53d199
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
In this commit,we add a proper reference on credit and debit
because we are referencing an attribute or attributes that
belong to more than one of the tables we are using in the query,
and have not qualified the attribute reference.
closesodoo/odoo#48796
X-original-commit: 9de090926390e2f02dea979347b477e31bc9188f
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
On redirection, werkzeug converts locations from relative to absolute
URLs. Apparently the specific algorithm when given a relative *path*
changed between 0.14 and 0.15, or possibly these paths suddenly became
processed whereas before they were interpreted as absolute?
So in Werkzeug 0.14, `redirect('foo/bar')` was treated as
`redirect('/foo/bar')` but in 0.15 it's first urljoin-ed to the
current path before the redirection is effected.
This is an issue with slides, because survey's get_start_url returns
the url `survey/start/<access_token>` without a leading slash.
The result is that where with 0.14 the certification tour would do this:
GET /slides_survey/slide/get_certification_url?slide_id=39&fullscreen=1
GET /survey/start/<id>?answer_token=<token>
with 0.15 or above it does this:
GET /slides_survey/slide/get_certification_url?slide_id=39&fullscreen=1
GET /slides_survey/slide/survey/start/<id>?answer_token=<token>
Which weirdly enough doesn't work at all.
closesodoo/odoo#48982
X-original-commit: 82a23883748172c05d2562f244ffbc1558ce01fc
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Show the identification type name instead of always show VAT in the customer information on the invoice report
closesodoo/odoo#48801
X-original-commit: 5a7ff2c932ae9abe4207291cc20e52a401a560a2
Signed-off-by: Josse Colpaert <jco@openerp.com>
When printing an invoice using l10n_latam_invoice_document it crashes as res.partner does not have an attribute 'l10n_latam_identification_type_id', keeping the whole xpath is not needed as the VAT label is already considered in the account module: https://github.com/odoo/odoo/blob/13.0/addons/account/views/report_invoice.xml#L10closesodoo/odoo#48800
X-original-commit: 9f0bf9bcaa6c21c36d5abdc5316aa80cef67f12f
Signed-off-by: Josse Colpaert <jco@openerp.com>
On invoices, we had cases where the supplier was added as a follower to
the invoice, and an email was sent to them.
This commit adds tests that reproduce the same follower assignment that
happened in saas-12.3, and fixes the issue for 13.0.
We also treat the case when custom_values is None (the default value),
and call the super method instead of just returning False.
Since saas-13.2, account.move.name is computed, so there is no default
value, and no need to specify it at the invoice creation.
closesodoo/odoo#49004
X-original-commit: 4a32716c0c57fe904e1aeea63926fb5b65e3516b
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
* remove logic of sequences in invoices and use new logic to make it work
* add logic do to not let the user to change the pos number in the document number
* update translations
* remove logic of sequences in invoices and use new logic to set invoices sequences.
* re add l10n_latam_document_number field to make the sequence set possible.
* replace type field with move_type field in model account.move
* add new field l10n_latam_manual_number to know when the document number should be or not set
* update compute highest_name everytime that the journal and document type change.
* implement how we deal with first number
* for customer invoices only compute the name after they has been posted
* be able to search by document type code
* update translations
Unlinking a return line is convenient and should be allowed for stock
user. Note that the same functionality could be achieved by setting the
quantity to 0 on the line.
related to 65530dfd6aclosesodoo/odoo#48988
X-original-commit: dc77519066993ed245ef863cdf42f6c25e10c99c
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Following 889dd9245, there is still a qunit test that randomly crash.
closesodoo/odoo#48977
X-original-commit: cb76a00226cf22d1ed659d736a36fa9b92e0a512
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit improves the "Start tour" dialog accessible via the
DebugManager. It is now possible to reset a tour to its initial
step, so that it can be re-executed (in onboarding mode). The
content of the dialog has been reworked as well:
- testing tours are displayed in another table
- tour sequence is displayed
- tours are sorted by sequence, and by name.
Task 2229909
closesodoo/odoo#48892
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
That's pretty much the entire point of OrderedDict's existence.
Also removed the iteration methods: they're not used and they're not
thread-safe, since they're written as generators they "return"
instantaneously when called immediately unlocking, then the iteration
itself is unprotected, so the entire thing is useless.
They could be reimplemented with explicit locking (a `with self._lock`
internally) if there's ever a use case for it, but that doesn't seem
to be the case at the moment.
closesodoo/odoo#46061
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Unexpectedly, it sometimes happen in runbot tests that sales order lines
are opened in readonly mode when the sales order is in edit mode.
The SO lines modal shouldn't open at all in SO edit mode because the
lines are editable inline.
closesodoo/odoo#48974
X-original-commit: 7cb2e0cc881eabbd1b24afc0b96fa9caa90a26b4
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Purpose of this merge is to call toggle_active or archive / unarchive methods
instead of manually writing on active field. Indeed this allows to trigger
business code related to archive / unarchive which is normally located
in toggle_archive (called by action_archive and action_unarchive).
We also improve some active-related behavior, notably
* correctly cascade channel archive status to its slides;
* cascade survey archive status to its certification badge;
* fix opportunity lost / activated subtype in crm;
See sub commits for more details.
Task ID 2170708
Community PR #46563
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>