Steps to reproduce the bug:
An account with the type "Credit Card" can not be chosen for the
creation
of a journal with the type "Bank" as the domain for bank account filter
only for accounts with the type "Bank and Cash"
As the filter on the `user_type_id` is too restrictive we remove it in
case the journal is bank or cash
Bug:
Impossible to select the correct account.
opw-2394959
closesodoo/odoo#64288
X-original-commit: f4e67d8ae174d7e2ee75a1de1083b31a6ff2af8b
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Before that, write-offs were simply never created in this case ; only an open balance. This was (obviously) wrong.
Also, the partner set on the statement line was not modified, and kept empty. We fix that so that, when a statement line without is reconciled with lines sharing the same partner, this partner is also assigned to the statement line.
Task 2423231
closesodoo/odoo#64253
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
- Create an invoice for 100
- Create a bank statement for 95
- Setup your reconciliation model so that it will match them and create a write-off for the remaining 5. Make it auto_reconciled.
=> Doing that, we expect the bank journal move to be created like this:
- 100 on payable/receivable, reconciled with the invoice
- 95 on the bank account
- 5 on the write-off account
This wasn't the case. Instead, Odoo created the following (correct from an accounting point of view, but weird):
- 95 on payable/receivable, reconciled with the invoice
- 5 on payable/receivable, not reconciled
- 95 on the bank account
- 5 on the write-off account
=> So an open balance of 5 was actually created. This was weird, and also caused an additional bug, as only the first payable/receivable line was reconciled with the invoice, making it only partially paid.
This commit restores the expected behavior.
Issue
- add a new language with locale code KUR (for Kurdish)
- print any report with a datetime on it (RFQ for example)
Cause
Babel (version < 2.7.0) does not handle locale "KUR".
Solution
If wrong locale or not managed by Babel, try to fallback
on server default locale.
If still wrong locale or not managed, then fallback on "en_US" as locale.
opw-2416482
closesodoo/odoo#64304
X-original-commit: e6ccdb397792db62c3b08d96435b3c1667c1aa9d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Steps:
- Install eCommerce
- Go to "Website" > "Go to Website"
- Click Edit
- Add the Dynamic Products block with a template and a category
- Save
- Switch to mobile view
Bug:
The right arrow of the block overflows and makes it possible to scroll
the entire view sideways.
Explanation:
This commit puts back prev and next arrows onto the carousel. It also
changes their design to be more visible over the content. The arrows are
now smaller and displayed in clickable gray circles.
opw:2415187
closesodoo/odoo#64274
X-original-commit: a5d7a1a6f3cf82610802ad84a9ae1baaa3f58e15
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
In the context of bug #43365, the fix merged in #48031 introduced an
override of `ir.translation._load_module_terms()`, which calls `super()`
then does some extra stuff.
This was forward-ported to later versions, unfortunately the
forward-ports missed the fact that the method signature changed at some
point (circa saas-13.2) and the `overwrite` flag which used to be passed
in the `context` had become an explicit method argument.
As a result, that argument is lost in the `super()` call and the
`website` module entirely disables the "overwrite" mode for the
translation loading wizard.
The fwd-port that seems to introduce the issue is odoo/odoo#50477 (998987f8ee148235f4025eb97a424e838ac6fc9f)
closesodoo/odoo#64251
X-original-commit: 26355a6bf83a194c2e398e859e49920da1f415b8
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Some of the feature of the "My Activities" list view of the crm app were not
available on the regular crm tree view.
This commit aligns the 2 views by sharing these features, notably:
- You can "snooze" your next activity if there is one
- You can contact the lead by email with a direct button on the row/list header
- You can contact the lead by sms with a direct button on the row/list header
The "team_id" column is now optional="hide" since not required most of the time
when you go to check your own leads (and can be activated in a few clicks if
needed).
Finally, the "Email" action at the end of the tree row is now in "single" mode
to allow adding contacts on the fly. This implied re-introducing an action that
was recently removed in 8c65d7c5f7
Further demonstrating that R&D is just an eternal loop.
UPG PR odoo/upgrade#2064
Task-2390500
closesodoo/odoo#62289
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This takes a former patch one step further.
Assume you recompute a field on two records, and the computation assigns
the first record but not the second one. Before this patch, the
recomputation process was accessing the field on both records. When
accessing the first record, both records are recomputed, and the value
of the first one is found in cache. When accessing the second record,
no recomputation is made (it has been done already), and the cache is
empty. The field is thus fetched from database, and this crashes because
of insufficient access rights.
This scenario was causing some obscure nondeterministic crashes in
tests. The nondeterminism comes from the choice of the environment for
flushing (it should not be in superuser mode); the order of records in
the set to compute; the order in which records are assigned in the
compute method; the fact that the compute method should assign some
records and some not.
The fix consists in adding a method that processes pending computations,
without doing anything special for unassigned records. The method is
used in field accessors (__get__ and mapped) and in method recompute().
The access error is gone because the recomputation no longer tries to
get the value of a field to compute.
closesodoo/odoo#64264
X-original-commit: b7676ec33172e6196b5fd1eda4df730ebf90eb6b
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Steps:
- Install Invoicing and load French
- Go to Invoicing
- Click an invoice due in the future
- Click Preview
- Switch the preview to French by modifying the URL like this: example.com/my/invoices/6 -> example.com/fr_FR/my/invoices/6
Bug:
"Due in %d days" is still displayed in English. The rest of the page is in French.
Explanation:
This is due to two things:
1. `mail` and `portal` are both installed and we cannot have more than one `code` translation of a source [1]. Since `mail` is loaded before, alphabetically, `portal` doesn't add the duplicated translations with its own module name. When loading a web page, only the modules returned by `_get_translation_frontend_modules_domain()` are sent to the frontend. `mail` is not one of them and the duplicated translations are not sent. Since sending all the `mail` translations is overkill, this commit is modifying the format string. This won't change the text outcome, but will make the new sources unique and make the backend send these translations to the frontend.
2. Translations in `portal_sidebar.js` are queried before the translation DB [2] is made. This results in an empty array and `_t()` returns the source. `session.is_bound` will wait until the app is fully loaded before querying.
[1] https://github.com/odoo/odoo/blob/ad2d96db8ad3e1fd7af2edda218fc34c0c1d259a/odoo/addons/base/models/ir_translation.py#L290
[2] https://github.com/odoo/odoo/blob/0de069b8ca9fb005ba5b076984f5677de25889ee/addons/web/static/src/js/core/translation.js#L51
opw:2421501
closesodoo/odoo#64263
X-original-commit: 118d79192cf0fc923a121745c78e6dd0da563df0
Signed-off-by: backspac <backspac@users.noreply.github.com>
Create two differnt journals for two different bank accounts (A, B).
Create an Internal Transfer in bank A to send money, then reconcile.
Create an Internal Transfer in bank B to receive money, then try to
reconcile
Internal transfers are labeled 'Customer Reimbursement' and 'Customer
Payment' even if no external partner is involved in the process,
opw-2423161
closesodoo/odoo#64258
X-original-commit: 4fcacfac8967a3facbe751f748faff02033ce0ae
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
In the bank reconciliation widget, allow matching a payment (blue lines) owned by another bank journal as the statement line one if both journal are sharing the same outstanding account.
It implies to remove the constraint preventing such accounts sharing.
The purpose is the following.
Suppose you are working with payment acquirers generating payments on a bank journal A.
At the end of the month, the bank journal B is debited to pay the payment acquirer.
At this point, you get a statement line on journal B you need to match with payments generated on A.
closesodoo/odoo#64115
X-original-commit: 8d34e1606f930deaa148563ffd40c69457650305
Related: odoo/enterprise#15577
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
The Australian equivalent of a VAT number is an ABN number.
In Australia TFN are private and not meant to be entered into
systems or publicly displayed.
ABN numbers are the public facing number that legally must be displayed
on all tax invoices and legal documents.
This fix will override the 'tfn' check done via stdnum for AU companies
with 'abn' check
opw-2415142
closesodoo/odoo#64221
X-original-commit: a72f7222c9f5987a20461be9c837e3de73801ff7
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
commit 38711e9f9c prevent multi company issues.
But it goes a litle too far in restriction and prevent to put a service
in the repair fee. Which is a feature since user would like to register
and invoice human ressources in maintenance cost.
closesodoo/odoo#64033
X-original-commit: 64de68b4420eb4d82ff2130dfaa310e40775a0b7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
PURPOSE
Notification may be sent using a generic mail.thread record, notably when
sending user notifications. In that case links to view document are
incorrect.
HOW TO REPRODUCE
Issue
- Install "Approvals"
- Submit new approval with you as "Request Owner"
- Click on "View Approval Request" in your mailbox
The link redirects to a 505 error
Cause
The model is not the correct one and the res_id is undefined
Solution
Specify the model and the res_id to _notify_get_action_link
when creating the link with kwargs
SPECIFICATIONS
Propagate message value through various notification sub methods. That way
we can rely on them if model seems void.
Also limit values given as URL parameters to some white listed values.
LINKS
opw-2358846
Task ID-2379766
Followup of odoo/odoo#60998
Followup of odoo/odoo#61545Closesodoo/odoo#63292Closesodoo/enterprise#15585closesodoo/odoo#64229
X-original-commit: 58bac5d242d6548d54f0163328fa64b319852e40
Related: odoo/enterprise#15634
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Achraf Ben Azzouz <abz@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
In `run_scheduler`, we are running certain functions as super user to
avoid inter company and access rights issues. This commit adds a
`sudo()` call to the `action_assign()` call, in case some objects
related to the retrieved moves are not accessible.
In addition a commit call is moved up to apply after the
`procure_orderpoint_confirm` call (as it was, it was applied after the
`_action_assign` loop, but there is in fact already a commit in that
loop, this lead to a somewhat random behavior where the replenish rules
were sometimes rolled back and sometimes not, depending on whether the
first iteration of the loop errored out or not)
opw-2394706
closesodoo/odoo#64041
X-original-commit: 592ee14d7fe81e7e5afd23f2bbbdac344eae6060
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
Before, there was no support of nolabel in tree view but now we
added it.
So in this commit, Replace the empty string with nolabel True.
closesodoo/odoo#64212
Taskid: 2414124
X-original-commit: 4286f2f90258a5c1f97d42f7c2aee1e964723ca0
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Now the size is displayed in a badge in a better location.
Also, the size is now always displayed even if the user did not just
apply a modification (so that if the user saves then reopens edit mode
and clicks on an image, he can inspect the image size).
task-2424917
closesodoo/odoo#64036
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
PURPOSE
Prepare sales team membership and lead assignment improvements by
reorganizing and cleaning some code bits.
SPECIFICATIONS
Reorganize sales team tests to ease addition and modifications of tests
when adding multi-membership and lead assignment features.
Separate business methods from tool methods. It eases their discovering and
their re-use through various other methods and models. Moreover it helps
reading business oriented methods without being disturbed by tools.
Tools methods should be private by default to indicate those are not part of
official convert or merge API for leads. In this commit we make convert and
merge tool methods private, keeping only main API methods public.
LINKS
Task ID-2428882
Prepares Task ID-2086889
COM PR odoo/odoo#64196
ENT PT odoo/enterprise#15610
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Prepare sales team membership and lead assignment improvements by
reorganizing and cleaning some code bits.
SPECIFICATIONS
Tools methods should be private by default to indicate those are not part of
official convert or merge API for leads. In this commit we make convert and
merge tool methods private, keeping only main API methods public.
LINKS
Task ID-2428882
Prepares Task ID-2086889
COM PR odoo/odoo#64196
ENT PT odoo/enterprise#15610
PURPOSE
Prepare sales team membership and lead assignment improvements by
reorganizing and cleaning some code bits.
SPECIFICATIONS
Separate business methods from tool methods. It eases their discovering and
their re-use through various other methods and models. Moreover it helps
reading business oriented methods without being disturbed by tools.
LINKS
Task ID-2428882
Prepares Task ID-2086889
COM PR odoo/odoo#64196
ENT PT odoo/enterprise#15610
PURPOSE
Prepare sales team membership and lead assignment improvements by
reorganizing and cleaning some code bits.
SPECIFICATIONS
Reorganize sales team tests to ease addition and modifications of tests
when adding multi-membership and lead assignment features.
LINKS
Task ID-2428882
Prepares Task ID-2086889
COM PR odoo/odoo#64196
ENT PT odoo/enterprise#15610
Purpose of the task is the Automatic Kanban Status field present without
any importance in view of stages of a project.
So in this commit, we remove the auto_validation_kanban_state field from
the stages of a project.
closesodoo/odoo#63727
Taskid: 2378811
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
revert commit 72c36aaf90 due to commit 47219e96e1
First commit is now useless and on top of that it ignores the putaway
strategies.
opw-2412699
closesodoo/odoo#64200
X-original-commit: a8db48244f069f9f29ee1120862bdf2c03ec26dd
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Steps to reproduce the bug:
- Let's consider a re-invoicable and expensable product P at 100€
- Let's consider a pricelist PL with 20% of visible discount on every product
- Let's consider a confirmed sale order SO with PL set on it
- Create an expense E with P at 100€ and reinvoice customer set to SO
- Generate the entries of E
Bug:
A new sale order line was created with 80€ as unit price and no discount instead of
20% discount.
opw:2423147
closesodoo/odoo#64194
X-original-commit: 8815f4d9ab8620428d50abbe603c7f6c63076d6c
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Observed Behavior:
Open Vehicles > Contracts and going to use the filter,
there are two filters with the same name 'Archived'
This commit solves this issue and we have only one filter named 'Archived'
task - 2413755
closesodoo/odoo#64175
X-original-commit: 1ecc79992cf9842777883c7ea4ba8f477fea7b0f
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Percentage is not used when change_account is selected. Then, the constraint must not be triggered in that case.
closesodoo/odoo#64112
X-original-commit: a23a47457d98aba4ec643f4422f3735d98fab2b4
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Disabled in odoo/odoo@b992619840
by mistake.
Also, restore the "failfast" for the QUnit tests (disabled in the same
commit...).
X-original-commit: 7f8e0fe4d2a47968bdcb136fd7e6d96a184f9eae
The normal flow to render a template is now to use `render_public_asset`
which bypasses the read access rights if the user matches the groups
the view declares.
For public users, we still cannot use that as they do not have access
to calling model methods at all. The route `public_render_template` is
thus still needed, but it should use the `render_public_asset` util.
Related to task-2412544
closesodoo/odoo#64167
X-original-commit: 3fd40ba2030fef7dccf4046a932e3b3a172dc53f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Purpose of the task, is to prevent users from inadvertently
creation/opening countries from country_id fields.
Countries should be managed from their dedicated menu item.
so in this commit, we have set both no_open and no_create to True
so user should not update and create a country from the many2X fields.
closesodoo/odoo#63773
Taskid: 2241677
Related: odoo/enterprise#15464
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Previously, when saving a custom snippet, the outerHTML of the snippet
was naively read directly and saved as a new custom snippet.
Unfortunately this completely bypasses all cleanup mechanisms that we
have before saving, such as stopping the public widgets, or creating
attachments for cropped or optimized images. This would result in weird
bugs, where public widgets would appear twice when dropping a custom
snippet containing one, as well as the creating a new attachment for any
image that was optimized or cropped before saving the custom snippet
every time it was dropped in the page again.
Unfortunately there is no good mechanism for an option to ask the editor
to clean the DOM without actually saving it, as a temporary measure, the
snippet-save option will instead save the whole page (which will clean
up the DOM) and save the custom snippet after the save, before
refreshing the page and reopening the editor, not unlike some theme
options.
task-2341612
closesodoo/odoo#64166
X-original-commit: 38569777935a7939182f49ca978d98f4079e8f2f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Issue
- Install "Ecommerce" app
- Go to 'Shop' page and edit it
- Add a "Dynamic Products" block
- Click on it to edit it :
- Select any template
- Select `Desks` as product category
- Save
- Go to "Website -> Configuration -> eCommerce Categories"
- Delete the "Desks" category
- Go back to Shop page
Error : "Record does not exist or has been deleted".
Cause
The search domain is looking for child categories of dataset.productCategoryId
(who does not exist anymore in the above case).
`child_of` do a browse() to fetch the records, and therefore generate
an error if category not found.
Solution
Check if dataset.productCategoryId exist before updating domain.
opw-2416231
closesodoo/odoo#64157
X-original-commit: 0de069b8ca9fb005ba5b076984f5677de25889ee
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Do not switch to text tools if the cursor is in an empty oe_structure
(to encourage using snippets there and actually avoid breaking tours
which suppose the snippet list is visible).
Part of https://github.com/odoo/odoo/pull/64088
Related to task-2352339
This commit has been merged twice as it was lost during JW revert.
closesodoo/odoo#64104
X-original-commit: 455f4ec1c5d60d1868f181075ce97a24ee6bc62e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
On editor start, "the cursor enters editable text" at a "random" time
thus switching immediately to text tools or not depending on the fact
text tools switching was initialized or not. We now only allow to do so
after some fixed delay after the editor is ready, to prevent any
automatic switching on editor start (which may break tours).
Part of https://github.com/odoo/odoo/pull/64088
task-2352339
This commit has been merged twice as it was lost during JW revert.
X-original-commit: 8e0efcd42b6254343aae8faf402e3d8dc630dd14
*: web_editor, website
In stable versions, [1] was made as a fix to allow access to read
the colorpicker template for mass mailing users when they do not have
the read access right on ir.ui.view records.
This commit, for master, remove the need of using the confusing
read_template method by using render_public_asset instead (thus turning
the read into a render, which is the same for our colorpicker but might
be a change for potential custo). At the same time, this allows to
remove the read_template public method entirely.
Related to task-2412544
[1]: 8af75e00bdcda3d5ff4facd2f5f146e1d6bf79e4
closesodoo/odoo#64100
Related: odoo/enterprise#15580
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- Create a new sales journal;
- Start creating a new invoice using the new journal (the name/sequence
will be editable) and before saving, change the journal to the
old one;
Before this commit, the invoice will be on the old journal and will have
the new journal name/sequence and after validate the invoice all the new
invoices on the old journal will have the new journal name/sequence.
Now, when you change to the old journal the name of the invoice came
back to 'Draft'.
opw-2415975
closesodoo/odoo#64146
X-original-commit: 3b64640076af472b64a72c7061696772d0e118de
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: william-andre <wan@odoo.com>
Fix typo preventing a correct management of won/lost when creating
multiple leads in a row.
closesodoo/odoo#64149
X-original-commit: 0024b592b2d589138f34e27c724b8d471d213a4d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Since commit [1], it is no longer possible to unselect a row in a
one2many editable list if there is an html field in the form view.
The reason is that there is a '.modal' element (several actually)
in the DOM of the html field. This element is considered as an
opened dialog by the list renderer, which is wrong. This commit
refines the selector that determines whether there is an opened
dialog or not.
[1] 7d04ec7cca4f355295a06c1ce6f112b6cc533c87
closesodoo/odoo#64134
X-original-commit: 6be8997807e4fbfeeefe273a335d9182490d0ac5
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In this commit, we replaced occurences of manual creations
(using ".create") with the use of "this.data"
task-id:2336360
closesodoo/odoo#64092
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
the field can be used in reports for any payment method
---
opw-2423290
closesodoo/odoo#64105
X-original-commit: c37afdf3e9f680cd186872e509c6ab8e47b70782
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
Fixes 3a6ac95 that ignores computation of recursive stored fields during
creation of records.
The problem happens when we have:
* a recursive stored computed field
* an `api.depends` of this field which is a relation to another record
When this "another record" is created and should recompute the recursive
field, it is ignored.
closesodoo/odoo#64117
X-original-commit: 9fe4fe404b73e9ab18ab6b3b913f075c64bb6954
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet (rco) <rco@openerp.com>
- Remove unused `sequence_tracking`
- Group data by models when it is possible, which implies
to remove `procurement_data.xml` file (data into `stock_sequence_data`).
- Clean messing comments
- Reorder the manifest (when it is possible)
task-2373638