- Fix typo in accrued_orders.py
- Remove fields.Date.today() from purchase test
- Make more use of common resources
closesodoo/odoo#79159
X-original-commit: 31570e185dcb36145e28e42cda765284dc373294
Signed-off-by: Laurent Smet <las@openerp.com>
Under account.document_tax_totals template the subtotal and total were using the float amounts for printing.
There was the formatted currency returned from _compute_tax_totals_json but not printed.
This commit uses the formatted_amount and formatted_amount_total keys to display the amount with currency on PDF and portal view.
closes#77996closesodoo/odoo#79153
X-original-commit: a2dbc4eb40a868860a7f8448a680a9f0e2ed16f4
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
In case the address of the company is in a different country as its fiscal country, the taxes available as "source tax" on the fiscal position lines were not the right ones (the country of the address was used to fetch them).
closesodoo/odoo#79144
Signed-off-by: Laurent Smet <las@openerp.com>
Make tax field "Base Affected by Previous Taxes" only visible in debug mode.
closesodoo/odoo#78733
Task: 2608764
Signed-off-by: William André (wan) <wan@odoo.com>
Steps to reproduce:
- On bank journal set the outstanding payments accounts and the
outstanding receipts accounts, respectively to 101403 and
101402
- In Accounting > Configuration > Settings > Default Accounts,
let the two outstanding accounts empty.
- Customer > payment > create a payment : payment type "Receive",
amount 5 for example. Save it.
- Edit the payment and change the payment type to "Send".
- Click on Save.
Issue
Got an UserError "Cannot create unbalanced journal entry"
Since the payment_type has changed, the computed outstanding_account_id on the payment is recomputed.
When splitting journal items using the _seek_for_lines() method, odoo is not able to retrieve the liquidity lines since outstanding_account_id has changed.
opw-2620046
closesodoo/odoo#78866
X-original-commit: 865c5d7741ca1bf003b4181d06484cc4ecaf8fcb
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: guva-odoo <guva-odoo@users.noreply.github.com>
For clarity purpose, tooltips for the 3 accounts in Tax Group (Configuration > Tax Group) are added.
task-2602730
closesodoo/odoo#78453
Related: odoo/enterprise#21725
Signed-off-by: William André (wan) <wan@odoo.com>
In case an invoice is already paid it is useless to provide
a QR Code for scanning to pay a residual of zero.
closesodoo/odoo#78437
X-original-commit: bfb5bcc07465240b0952e031522dd513dff8c2ab
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Before this commit the only way to modify the domain is to completely override portal_my_invoices.
Since this function is so big this is not clean/easy to do.
By creating a separate function we can simply override it and we can reuse the function on two places.
closesodoo/odoo#77446
X-original-commit: b7effc442cd7ff47e00718adf5b1af43e9f326ee
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
With bank synchronization, having information about changes done by
the user on the bank statements can be useful when looking into issues.
We'll now log changes in the starting/ending balance as well as the
state of the statement to keep better track of what is happening on
the statements.
Task id #2647224closesodoo/odoo#78264
X-original-commit: 3f2379347dae2482669aded034f3a5249aececa5
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
The only fields added in
`//page[@name='invoicing']//group[@name='accounting']`
are `unspsc_code_id`, `intrastat_id` and `email_template_id`, which
should all be available with only the rights for invoicing.
opw-2665030
closesodoo/odoo#78260
X-original-commit: 1f69445f0a7ed02030f3f16f126e34b0d507ed80
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
- allow editing the date of a carryover line manually
- don't display the tax report line the carryover line is linked to anymore, as the user goes through this line to open the carryover line anyway, and it shouldn't be editable.
- also remove a domain that made no sense on carryover lines: pointing to a related field depending on the field defining the domain
Manual forward-port of https://github.com/odoo/odoo/pull/77718closesodoo/odoo#78213
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Before, when someone with settings rights created a foreign VAT fiscal position for a country in which there was no tax template yet, a banner was displayed, telling that the right l10n module needed to be installed. However, there was no link to the list of modules, and the user had to go back to the app switcher, then to the Apps menu to install the module he needed. We now display a link to this page, only for the users with setting rights. Other users will still see the same thing as before.
Manual forward-port of https://github.com/odoo/odoo/pull/77687closesodoo/odoo#78209
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Purpose of the task is to:
1) Label becomes "Notes" rather than "Terms & Conditions".
2) Fields reorganization from left to right.
So in this commit, Updated Label "Terms & Conditions" to "Notes", Fields
reorganization from left to right in 'account.bank.statement' and
'accont.bank.statement.line' model and make group_by bank statement.
Links
Task - 2613132
closesodoo/odoo#77454
X-original-commit: ce4234c98a701c0071228827187471db167a3bdb
Related: odoo/enterprise#21287
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Create a payment without a partner for a receipt
Go to the form view
Click on the stats button.
=> Error, 'partner_id' is required
In some cases, having the partner not required on the view is needed.
closesodoo/odoo#78124
Task: 2610780
Forward-port-of: https://github.com/odoo/odoo/pull/77727
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
es_BO is not available in Transifex and some translations are different from es.
opw:2571715
closesodoo/odoo#77978
X-original-commit: 2f33bb580c5445b0fd77bd0ed8c55d5d4b298ff9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit removes `Add a column` from Grouped
Kanban view of Journal Items.
Creating new Records from `Add a column` should not be supported
from Journal Items and also it is not working for Journal/Account
as required fields are not set. (and also gives Traceback)
closesodoo/odoo#78074
X-original-commit: 21fe5c65fd3170ebfa01ea9a6b530d158f6c0c8e
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
1. When the diff amount is for "combine" bank payment method, the
account.move record used to represent the combine amount is modified
to contain the diff amount. The journal entry is modified:
FROM:
```
Debit Credit
Outstanding combine_amount
Receivable combine_amount
```
TO:
```
Debit Credit
Outstanding combine_amount - diff_amount
Receivable combine_amount
Diff account diff_amount
```
2. When the diff amount is for "split" bank payment method, an
account.move moving the diff amount from Outstanding to Diff account
is created. The journal entry is like:
```
Debit Credit
Outstanding diff_amount
Diff account diff_amount
```
closesodoo/odoo#77859
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
In older versions, currency_id was left empty on move lines in domestic currency (as well as amount_currency and amount_residual_currency). It's not the case anymore, so we can simplify the code a little bit.
closesodoo/odoo#77260closesodoo/odoo#77801
Related: odoo/enterprise#21354
Related: odoo/enterprise#21437
Signed-off-by: William André (wan) <wan@odoo.com>
- Create a statement line for partner A, amounting to 90€
- Make 5 invoices for partner A, of 10, 50, 100, 500 and 100 €
- create a reconciliation model (make sure it's the only one active for testing), with
>>> "invoice matching" selected
>>> "payment tolerance" disabled
>>> "partner should be set" enabled
>>> "same currency" enabled
>>> "auto-validate" disabled
Try to reconcile your statement. The reconciliation model associates your statement line to the 5 invoices, showing a partial match of 30 for the line of 100€, as only 30€ remain after matching 10 and 50. The following lines (500 and 100) are useless in the reconciliation and confusing for the user. They shouldn't be there.
After this commit, no useless line will be proposed anymore. In our example, only lines 10, 50 and 100 will be proposed.
Task 2652915
Part-of: odoo/odoo#77801
`_deduce_sequence_number_reset` should be used on maximum one record.
That function is called from `_get_sequence_format_param` in
`_is_end_of_seq_chain` but that function was possibly calling it on
multiple ids.
https://runbot.odoo.com/runbot/build/10315612closesodoo/odoo#77811
X-original-commit: 10b880ae999643a4e3e9328d96196a19b0cf7ac6
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
The Italian VAT report is needed to help Italian customers fill in
their VAT report.
Task id #2079462
X-original-commit: 570afc9f237ce6048bd412dd6f3cd7ad38ffb17a
[ADD] Added VAT report for Italy and simplify tax templates
The Italian VAT report is needed to help Italian customers fill in
their VAT report.
Task id #2079462closesodoo/odoo#77565
X-original-commit: 616839df835283b5d682323cf96bbae579d3900a
Related: odoo/enterprise#21330
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Steps to reproduce:
- Go to Accounting -> Cash Registers
- Create a first statement named E, add a line with amount 100,
set the Ending Balance (balance_end) to 100.
- Create a second statement named H, add a line with amount 50,
set the Ending Balance (balance_end) to 150.
- Create a third statement named C, add a line with amount 1,
set the Ending Balance (balance_end) to 151.
- Create a last statement named as you want.
Issue:
The Starting Balance of the last statement is compute from the
Ending Balance of statement H instead of statement C.
Cause:
Because of the _order = 'date desc, name desc, id desc', if several
statements have the same date, the name is taking into account to
classify the statements, which cause issue because the name doesn't
always reflect the chronological order of creation.
Solution:
Change the order to 'date desc, id desc' when we get the previous
statement.
opw-2635092
closesodoo/odoo#77757
X-original-commit: 8a9982856318068f64e5bbdbe2c120e8c6d52097
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: guva-odoo <guva-odoo@users.noreply.github.com>
Having the same VAT fiscal position for the same region multiple times doesn't make sense and is not supported by the report enfinge. We should prevent that.
closesodoo/odoo#77663
X-original-commit: d9dfeeb498dab359df52db87ff601d68fcf0ad7c
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
The 'Country Group' field should be displayed under the 'foreign VAT' one, so that it its grouped together with 'Country' and 'Federal states'.
X-original-commit: 302586c6b35825e19945b92faa48ccc892179ea6
Part-of: odoo/odoo#77663
No menu allowed viewing all tax groups at once before. With the new subtotals features, it could become painful for the user if he wanted to change the groups' sequence in order reorder subtotals on his invoices (he had to change the sequence manually on each group, accessing their form view through taxes using them). It is now possible in the tree view opened by our new menu, with the sequence widget.
X-original-commit: 708899fc0e1a793f29884d82b34ba6c492461737
Part-of: odoo/odoo#77662
This commit removes all the 'extend' initially introduced to avoid code
repetition and ensure visual consistency across Bootstrap and Owl dropdowns.
Despite achieving the desired results, using 'extend' in this context
was seriously impacting the bundle generation time, probably due to an
underestimated amount of Apps' legacy-code applied on these elements.
In order to achieve the same results, the chosen strategy is to add
Bootstrap default classes directly into Owl dropdowns.
Also, it moves code related to bootstrap dropdown in 'webclient.scss',
leaving 'core/dropdown/dropdown.scss' for Owl code only.
Due to the discrepancies between Bootstrap and Owl html
structure, the '.dropdown-item' class could not have been added
directly to Owl's '.o_dropdown_item' itself, without refactoring
the Dropdown component structure.
// ==== Bootstrap 4.6 default Structure ================================
<div class="dropdown-menu">
<button class="dropdown-item" type="button">Action</button>
<a class="dropdown-item" href="#">Another action</a>
</div>
// ==== OWL default Structure before this commit =======================
<ul class="o_dropdown_menu">
<li class="o_dropdown_item">
<span>Action</span>
</li>
<li class="o_dropdown_item">
<a href="#">Another action</a>
</li>
</ul>
// ==== OWL Structure after this commit ================================
<div class="o-dropdown--menu dropdown-menu">
<span class="dropdown-item">Action</span>
<a class="dropdown-item" href="#">Another action</a>
</div>
// ==== web.assets_backend.css Bundle Generation Comparison ============
With all modules installed (enterprise edition over runbot):
Before this commit, bundle took ~2.5s and ~4s to generate and weighted ~322kB (~2.5MB uncompressed)
After this commit, it takes between ~1.2s and ~1.6s and weights ~257kB (~1.6MB uncompressed)
closesodoo/odoo#77649
X-original-commit: 84715436d87bb05b421bc9ccaacda67d07571690
Related: odoo/enterprise#21370
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
Co-authored-by: François Georis <fge@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Armageddon tax being created should include mandatory country_id,
which should be the fiscal country of the test company.
closesodoo/odoo#77295
Related: odoo/enterprise#21208
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
When registering/creating payments, filter out from the selection
the journals that do not have any relevant payment method lines.
Also, always show payment method lines even when there are only
one of them.
closesodoo/odoo#74741
Related: odoo/upgrade#2861
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
The empty string, the forward slash `/` and NULL are all to be
considered as without a sequence set on `account.move`.
While this is just true, it was detected because of non deterministic
bugs at the end of the month because the tax closing move was
explicitly set to an empty string on version 14.3 and higher.
See: https://github.com/odoo/enterprise/commit/4641825daa0ed3b8e407fb3817c582cb541e88a4
Most of the tests posting an entry in the MISC journal could then
randomly fail on the last day of the month.
closesodoo/odoo#77532
X-original-commit: 9ed77eb3eee660a77a90c231258b69968e3b8df2
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
Jinja as a templating engine was problematic in differents respect:
- introduce external dependency to Odoo (less controll)
- add another templating mechanism in the stack
- specific feature in qweb cannot be reused
- difficulty in rendering easily editable templates
- more knowledge required with no betterment
By replacing jinja with qweb we can now build tools to edit a qweb
that will work with the previously jinja encoded document
(essentially `mail.template` records).
There is a catch however. Some email fields (eg. email_to) used jinja
syntax for rendering dynamic variables (ie. ${object.something} and
${object.something_that_should_not_be_escaped | safe}).
We still want user to use dynamic variables for some char fields (eg.
subject, from, to, ...). We made a new rendering engine called
"inline_template" that will render an expression enclosed by `{{` and
`}}`.
To be able to edit the templates from the backend interface, a
plugin to the Odoo editor has been made for seamlessly edit the
document.
This qweb plugin includes:
- make dynamic variables (eg. `<t t-out="variable"/>`) not editable
(for preventing the user to shoot himself in the foot)
- group and hide related logical branching (ie. t-if, t-elif, and t-else)
in order to see only one at once
- a floating select input to switch visibility of a particular logical
branching
Task-27033
X-original-commit: odoo/odoo@68182baff4
Part-of: odoo/odoo#77377
Steps:
- Go to Journal Items
- Switch to Kanban View
- Click on create
Issue:
- Traeback due to unknow currency
Fix:
Journal Items are not created individually so we have disabled
`Create` button in Kanban view.
closesodoo/odoo#77262
Fixes: odoo#76543
X-original-commit: fa29cd974a9d024349e937b547abe5a6ca522c6d
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
Before, the taxes assigned by the reconciliation models in their write-offs weren't mapped by fiscal positions. This could cause confusion, and essentially required the user to always fix by hand the cases that weren't matched.
Task 2645280
closesodoo/odoo#77204
X-original-commit: e75184459a7d47df86aa72efa36c06462d7ee9ea
Related: odoo/enterprise#21187
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
when an account.payment object had no partner and no journal, the computation of is_internal_transfer was wrongly computed as True... and the information banner was displayed accordingly
closesodoo/odoo#77122
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
when removing the bank in an account.payment, the method _get_available_payment_method_lines() was called on an empty recordset which wasn't supported.
Part-of: odoo/odoo#77122
Module `account_check_printing` exist on community edition so
It doesn't makes sense to apply `upgrade_boolean` widget on that.
However, It is necessary to have supported modules installed to
use Check Layout.
closesodoo/odoo#77145
X-original-commit: adc24d9082933f801f972fa93e1866be194c8b7a
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
- add outer shadow to bill in wizard preview
- move address block to right in generated pdf, same as in wizard preview
- set invoice date & due date on one line in pdf, same as in wizard preview
closesodoo/odoo#77093
Task: 2581377
X-original-commit: ecf2bba66782cd8b2455bf656cdf2a41fafecf89
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: jbw-odoo <jbw-odoo@users.noreply.github.com>
Steps to reproduce the bug:
- Let's consider two companies A, B
- Let's consider two contact with the same email E, C1 in A and C2 in B
- Let's create an alias AL for the vendor bill journal of B
- Send a vendor bill VB from E to AL
Bug:
A new bill is created in B with C1 as partner instead of C2
So an access error was raised when trying to open the bill in company B
opw:2495870
closesodoo/odoo#76963
X-original-commit: 1a58be583629af80af00f288dc5925c3940be1ef
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In order to prevent holes in the sequence, a constraint is checking that
only the last number of the chain is removed.
This commit extends that to a batch of records by checking that:
* the last number of the sequence is part of the batch
* the batch is sequential (there are no holes in it)
closesodoo/odoo#76870
X-original-commit: 7883900e3b615c632dab2b02c792f6d8c1045a15
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>