Commit Graph
1987 Commits
Author SHA1 Message Date
Yan Victor 7032917771 [IMP] account: Avatax module installation
Auto install AvaTax module for countries that use AvaTax ('US','BR').
Add a checkbox in settings to easily install the module if needed

task ID: 3398637

closes odoo/odoo#136490

Related: odoo/enterprise#47979
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-09-27 17:41:00 +00:00
7e012dd544 [IMP] payment, *: replace providers with payment methods in payment forms
Before this commit, the payment providers (e.g., Stripe, Adyen...)
available for payment were displayed on the payment forms. The customer
had to select one to process their payment. After that, the customer had
to select their preferred payment method (e.g., Credit Card,
Bancontact...) from a list of payment methods supported by the selected
provider over which the website administrator had close to no control.
This was making the payment forms confusing because the payment methods
were displayed sometimes more than once, if at all, in a non-controlled
order, and behind the selection of a payment provider that customers
should not have to deal with.

As the payment method was selected in an iframe or directly on the
provider's website, the information on the selection payment method was
not available in Odoo. This posed many problems, among which were the
impossibility of assessing whether a specific feature (e.g.,
tokenization, refunds, manual capture...) was available, not being able
to easily identify payment tokens through the payment method logo,
listing available payment methods on the website, sorting and
fine-grained configuration of the available payment method, subpar
payment method-specific display on the payment form (e.g., PayPal that
requires displaying a "Pay with PayPal" button), etc.

In this commit, the payment providers are thus replaced by the payment
methods on the payment forms. All contextually available (depending on
the country, currency, requested feature...) payment methods are
displayed one after the other on a single-level list and in the order
configured by the website administrator. Each payment method is
"powered by" (i.e., linked) to a single payment provider: the first one,
by model order, to support it. This allows, for example, offering the
PayPal payment method through Mollie, which charges low processing fees,
while also offering Klarna through Stripe, which supports more payment
methods but charges higher processing fees.

While doing so, the two different payment forms, "Checkout" and
"Manage", are also merged together in a new, configurable case-by-case,
payment form that is entirely redesigned to offer a better user
experience.

After payment, the information on the selected payment method is saved
on the transaction and eventual payment record and updated with the
information received from the provider.

task-2882677

closes odoo/odoo#120446

Related: odoo/upgrade#5103
Related: odoo/documentation#5717
Related: odoo/enterprise#40666
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Anita (anko) <anko@odoo.com>
Co-authored-by: Brieuc-brd <brd@odoo.com>
Co-authored-by: Valeriya (vchu) <vchu@odoo.com>
2023-09-22 13:32:53 +00:00
Antoine Boonen d415d252ad [IMP] account: Add quick search on an amount in the journal items.
Problem
---------
User want to search on journal items based on the amount. This is doable
through custom searches but that is not user-firendly.

Objective
---------
Add a search based on the amount of an journal item (in credit or in
debit) to make it more user-friendly.

*Secondary objective*: Add a similar search for journal entry amounts.

Solution
---------
Declare a computed field for journal entries that the search will be
based on and add this field in the search view of the journal items.

*Secondary solution*: Add amount_total in the search view of the journal
entries.

task-3439520

closes odoo/odoo#129990

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-09-14 15:50:15 +00:00
Ali Alfie (alal) 04be1dff54 [IMP] account: add printed report name for invoices
Before: when attempting to print an invoice, the downloaded file had the generic name "Invoice".

Now: downloaded files have the correct invoice number as names.

task-3477659

closes odoo/odoo#135093

X-original-commit: 6b3555d93221ef6db9e3265a95b127a2bb743469
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Ali Alfie (alal) <alal@odoo.com>
2023-09-12 07:12:40 +00:00
Mahdi Cheikh Rouhou (macr) 9e8b8d1bf7 [FIX] account, web : display monetary and numbers in rtl language
Issue:
======
- Display of monetary values in kanban views is wrong in rtl language
- Pivot display has multiple erros in rtl language: values are left
  aligned and they are supposed to be right aligned like in ltr lang,
  negative numbers has the sign in the wrong place, the (plus/minus)
  icon placement is wrong (it should be before the title and not after)

Steps to reproduce the error:
=============================
- Install accounting and rlt language (arabic for example)
- Go to accounting (display of monetary fields is wrong)
- Go to accounting/accounting/journal items/pivot view
- Choose residual amount in view (it has some negative values)

Solution:
=========
Kanban Solution:
- I fixed the direction of the display to be ltr always for monetary
  values and added the class to the appropriate tags.
Pivot Solution:
- I fixed the direction and text-align style for the values to always
  display the same like rtl.
- displaying the icon and then the title will always give the desired
  display since the direction will reverse their order itself when it's
  rtl

enterprise fix : https://github.com/odoo/enterprise/pull/46675

opw-3295573

closes odoo/odoo#134296

X-original-commit: 6b7f89b43b6abc970c955760da203a1e41c53652
Related: odoo/enterprise#46900
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-09-07 10:29:43 +00:00
Hung Trinh Ngoc 79e6b96263 [IMP] account: rename statement when journal type is cash
- To avoid confusion with the concept, I propose a modification to the
term "cash" in the journal.

closes odoo/odoo#131986

Signed-off-by: Trịnh Ngọc Hưng <ngochung207@gmail.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-09-07 09:00:23 +00:00
hupo-odoo 8afae04c35 [IMP] account: discount allocation
Provides the possibility for the user to enter defaults accounts for discounts allocation. If provided, discounts on Customer Invoices and Vendor BIlls will be allocation on the specified account instead of the product account.

Example:
Create a journal entry with one product with the following attributes:
quantity: 1
price unit: 100
discount 5

We expect the following account move line:
Without an account set in the settings for discount allocation:
ACCOUNT                                             DEBIT     CREDIT
700000 Sales rendered in Belgium (marchandises)      0         95
400000 Trade debtors within one year - Customer      95        0

With discount allocation account set to "657000 Discount Given":
ACCOUNT                                             DEBIT     CREDIT
700000 Sales rendered in Belgium (marchandises)      0         95
700000 Sales rendered in Belgium (marchandises)      0         5
657000 Discounts Given                               5         0
400000 Trade debtors within one year - Customer      95        0

closes odoo/odoo#133286

Note: the discount is added on another line than the one of the product even though it is the same account because it does not include taxes and analytic distributions.
Task: 3278827
Signed-off-by: William André (wan) <wan@odoo.com>
2023-09-05 12:22:17 +00:00
Dylan Kiss (dyki) 09b8c32e9e [FIX] account: branch management fixes
After feedback on the new branch management feature, there were a few
bugs reported. This commit solves several of them:

- Display the company/branch name of a reconciled payment in the info
  popover when viewing customer invoices and vendor bills. This way you
  can see why you don't have access to the payment e.g.
- Make it possible to select the taxes of the parent company when
  creating moves in a branch.
- Allow users with only access to a branch to open the Accounting app.
  The dashboard would fail with a security error before.

task-3461421

closes odoo/odoo#134000

X-original-commit: 92d261d9a3f64fcbb01023e680d362b598061707
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2023-09-04 10:56:06 +00:00
Claire Bretton (clbr) 05978d603b [FIX] account: Reload chart_template button unexpected unlink
Reload button appeared when no chart_template was set which
could make Odoo delete important data if clicked.
We restrict appearance of the reload button to avoid this situation.
Also adds a short description on the button to notify user of the
irreversability of the action.

Steps to reproduce:
1. Create a company (do not use the default one that has Generic CoA set) with a country set.
2. Create accounts : income, receivable and payable.
3. Create a sale journal with the income account.
4. Go to a partner detail (e.g. Deco addict), tab Accounting and set its receivable/payable accounts to the ones created above.
5. Create an invoice for that partner.
6. Go in Accounting Settings and click the reload button.
=> The invoice is deleted.

Task-3488427
OPW-3448881

closes odoo/odoo#134028

X-original-commit: a636b9386f297f9f08a38689911ca111fe597ec3
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-09-04 08:03:43 +00:00
Habib (ayh) 7ef468402d [IMP] account: view journal items impacting a bank (without transaction)
Since the bank reconciliation report was removed, users no longer have a view of the journal items that impact the bank account without having a related transaction (account.bank.statement.line)
Since these cause a difference between the GL balance and the balance displayed on the journal dashboard, it is useful to display a link and the total of these journal items.
Only lines dated after the fiscal closing date, or the last statement date are included.

Task-3431843

closes odoo/odoo#129569

Signed-off-by: William André (wan) <wan@odoo.com>
2023-09-01 15:09:46 +00:00
Pierre Rousseau 234a5e6245 [IMP] account, project: open form view from editable list view
This commit uses the new options of the editable list view to open a
form view when clicking on a line.

Task-id 3063425

Part-of: odoo/odoo#116989
2023-08-29 11:10:42 +00:00
Guillaume (guva) 2ea2f268c2 [FIX] account: don't auto save on boolean widget
When creating a reconciliation model line on
a new record, by activate the boolean toggle on
`force_tax_included` field, the line is save
but as the reco model is not, `check_company`
will raise an error.

Steps:

- Create a new model
- Before saving, create a line, set a tax and
  click on Tax included toggle button
-> Error is raised

opw-3473189

closes odoo/odoo#133233

X-original-commit: 796478445e5bc7da95b8a0aaab4dcbe235bb2957
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-08-28 11:24:42 +00:00
Valentin Vallaeys (vava) f8d351aa43 [FIX] *: fix domain definition (not) in operator
* account, account_peppol, purchase_requisition, stock_delivery, base

There are some conditions in xml that uses `in` or `not in` for a check
with a string. These are replaced by `==` or `!=` operators,
respectively.

closes odoo/odoo#132798

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-08-25 13:58:46 +02:00
hupo-odoo f2964dc02a [FIX] account{,_edi,_ubl_cii}: mass export edi documents
When selecting several invoices from the list view, it is possible to trigger an action to export all edi documents in a zip file. This commit fixes 2 different issues:

a) We want to be able to export edi documents that have not been sent. Therefore, we no longer filter for 'sent' and 'cancelled' edi documents.

b) We want to also export edi documents that have ubl format. These documents are, from 16.2, in another field on account.move and no longer part of edi_document_ids. This is the reason why we had to move the logic from account_edi to account to make it overridable to other modules. This new way of overriding the function will also enable other formats to be included in the export function.

task-3441449 (issue 1)
task-3439427 (issue 2)

closes odoo/odoo#131242

X-original-commit: f8654b3501aca6e5d77ced5f73cb351c61684cd2
Related: odoo/enterprise#45529
Related: odoo/upgrade#5032
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-22 11:47:31 +02:00
MerlinGuillaume ecabd74ed7 [FIX] account_3way_match: correct number of draft bills in dashboard
The number of bills to validate in the accounting dashboard is not the
same as the number of bills displayed when clicking on the button

Steps to reproduce:
1. Install Accounting and module `Vendor Bill: Release to Pay`
2. Go to Accounting > Vendors > Bills, create a new one with a due date
   set to yesterday and save it
3. Go to the accounting dashboard
4. In the 'Vendor Bills' journal, see that there is one bill to validate
5. Open the draft bills (by clicking on the `Bills to Validate` link),
   the number of bills in the view is greater than what was previously
   advertised

Solution:
Modify the context used in the action 'Bills to Validate'

Problem:
The module `account_3way_match` modified the query to get the number of
draft bills so the action should be adapted

opw-3440854

closes odoo/odoo#132483

Related: odoo/enterprise#45987
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2023-08-21 14:15:42 +02:00
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Gorash 1e12f68a1d [REF] base,all: Update modifier syntax: prepare view migration
These changes are made as a result of simplifying attrs and 'states' in
views.

Before applying the migration script, it is necessary to fix some views.
These views are erroneous and either work by chance or are simply
untested. We have for example wrong domains, elements used by modifiers
but not present in the view, obsolete domain operators, inherit views
not targeting the right views, xpaths using attributes as target, the
use of %(...)s in views, false attribute value types in python.

Part-of: odoo/odoo#104741
2023-08-18 09:49:12 +02:00
Yannick Tivisse 3312657294 [FIX] hr_payroll_acccount: Make default account configurable on journal
Purpose
=======

2 commits were making impossible to define a default account on a
miscellaneous account journal. However, this is used in payroll
to auto-balance unbalanced moves.

After a discussion with the related team, it has been decided to
revert both commits, which were breaking other use cases as well.

Revert "[FIX] account: fix the domain of default_account_id from account_journal"
This reverts commit b09f06f986.

Revert "[IMP] account: remove default account on misc journal form view"
This reverts commit f2c0bc321b.

Part-of: odoo/odoo#124222
2023-08-17 10:32:52 +02:00
Chrysanthe (chgo) 8120fca14f [FIX] account, kanban_dashboard: fix favorite alignment
Commit[1] introduced some changes in order to fix a layout issue in the
accounting dashboard but these changes were applied in a way that affects
a lot of modules and files that should not be modified.

In fact, by removing the padding inside the `kanban_dashboard.scss`
commit[1] is actually removing the padding in every place where
the boolean_favorite widget is used.

There is also a change applied in the Bootstrap library files, which
should remain untouched.

=== AFTER ===

We revert the changes applied by commit[1] and also fix the layout issue
in the accounting dashboard that it aimed to fix.

commit[1]: d4ba0c1

task-3453799
part of task-3326263

closes odoo/odoo#132134

X-original-commit: f78571cec0a5debf78c5dd1859c78b13d33df1ab
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-17 01:04:34 +02:00
Thomas Becquevort (thbe) c025531f06 [FIX] account: resizing the account name in account.account.form view
Currently, the form view of the account.account has a fixed width for the
account name field which can lead to longer account names to not be readable
as they are not displayed entirely.

This PR allows users to resize the width of the name field to the length
they want without letting them exceed the maximum of the page. This makes
the field keep a shorter width for shorter account names while being able
to be longer for accounts which name is longer.

The account name field has now a width which can be adapted by the user so
he can read both sort and long account names.

task-3441547

closes odoo/odoo#131312

X-original-commit: aa536bbf1cecbdc0ffbc3d44c20ed81afa5565b2
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Thomas Becquevort (thbe) <thbe@odoo.com>
2023-08-13 10:57:57 +02:00
Antoine Boonen 76a63358e8 [IMP] account: Make due date invisible for cancelled invoices/bills.
Problem
---------
When an invoice or bill has been canceled, the Due Date for the payment
is still showing, even though this information is not relevant anymore
as no payment is expected. 

Objective
---------
Make due date invisible when the invoice/bill is cancelled.

Solution
---------
Modify the invisible attrs condition of the field in the account_move
tree view by add a condition on the state.

task-3439357

closes odoo/odoo#130028

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-10 18:14:17 +02:00
Matheus Leal Viana (malv) f095b4c390 [FIX] account: display amount due field in boxed layout
Versions:
---------
- 14.0+

Steps to reproduce:
-------------------
1. Settings -> Configure document layout
2. Select the Boxed layout
3. Go to Invoices -> create a new invoice and register payment
4. Click on Preview
5. The field “Amount due” is in the wrong color and barely visible

Issue:
------
The field “Amount due” is in the wrong color and barely visible in
invoice boxed layout

Cause:
------
The issue is happening because we have `<strong>`  before the text
”Amount due” and it changes the font color to gray because of the CSS definitions

Solution:
---------
We need to make the text bold in a different way, to do it we can use the bootstrap
class font-weight-bold, this way we keep it bold and do not break the colors

OPW-3374092

closes odoo/odoo#131459

X-original-commit: 6e1b3f2fc36831a94c164ab281c7a6fde535cebf
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Matheus Leal Viana (malv) <malv@odoo.com>
2023-08-10 10:39:12 +02:00
Thomas Becquevort (thbe) 7d58a634da [IMP] account: invoice date column in journal entries/items addition
Description of the issue/feature this PR addresses:

When an accountant adds an invoice at another date than the date of the
said invoice, it is that date that is shown on the journal entries and
items views. This makes it impossible to order the lines by invoice date
as the only date field available on those views does not give the proper
piece of information.

Current behavior before the PR:

Prior to this commit, the Journal Entries and Journal Items views show no
column giving the date of the document for every line but only for those
that have been added the same day.

Desired behavior after the PR is merged:

Adding this, the Journal Entries and Journal Items views show a "Document
Date" column which represent the date of the document. The bank
reconciliation widget presents this column too. In each of these three
locations, filters, groups and ordering have been setup to be able to be
applied on this new column.

This allows to search and filter lines using that piece of information.

The column is hidden by default.

task-3388309

closes odoo/odoo#129040

Related: odoo/enterprise#44545
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-08-10 09:11:49 +02:00
Daniel Kosky (dako) 51a00391a5 [FIX] account: hide inactive tax_ids in aml dropdown
The "test_active": False context of the field specifies that this field
will ignore whether a record is active or not when fetching it.

Due to recent changes in the javascript, the "test_active": False
context of the tax_ids field on the account move model is propagated
through into the name_search query. This means that inactive taxes
appear in the dropdown when selecting a tax.

This is an issue as there are a few localisations that hide a number of
their taxes by default (by making them "inactive").

The solution is to add the key, value pair "active_test":False to the
context of the field on the view, effectively overriding the context
that gets used in the name_search query, thus only retrieving active
taxes.

closes odoo/odoo#131212

Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-08-10 02:39:45 +02:00
Maximilien (malb) 16488e5603 [IMP] l10n_sk,l10n_cz: invoice layout legal imp
before this PR, some legal information were missing from our invoice layout,
for the l10n_cz and l10n_sk localization.

For l10n_cz:
- On move we add a taxable supply date
- On the company we add a trade registry field
- On report template we add the company_registry, the vat number

For l10n_sk:
- On move we add a taxable supply date
- On the company we add a trade registry field and income tax id
- On report template we add the company_registry, the vat number and income tax
id

closes odoo/odoo#126837

Task: 3374969
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-08-08 22:41:00 +02:00
John Laterre (jol) d94a3087be [IMP] account,analytic: UI/UX improvements
Miscellaneous improvements:
1. In analytic tags, the percentage is now a prefix.
2. In the widget, 0% accounts are now hidden.
3. In the analytic items list/pivot views, it is now possible to search by:
- Financial Account.
- Cross by.
4. By default, the pivot view is now grouped by plans and then analytic accounts.
5. An "Analytic Reporting" menuitem that opens the pivot view is added in Reporting > Management.

task-3446504

closes odoo/odoo#130971

X-original-commit: adb8ec875c9b4e299147c46dc60a87fd26fff91f
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-08-06 20:27:15 +02:00
moerradi ee578df21b [IMP] account: Exclude Off Balance Accounts from Account Mapping
Implemented domain exclusion to remove Off Balance Accounts from Account
Mapping in Belgian CoA. This decision was motivated by the rarity of use
of these accounts by our target audience, and their potentially
confusing placement at the top of the list due to their prefix '0'. Now,
the Account on Product and Account to use instead fields will not
display these seldom-used accounts, improving usability and efficiency.

closes odoo/odoo#129576

Task-id: 3431420
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-03 19:31:18 +02:00
Megaaaaaa fd77702cb7 [IMP] account: No currency creation from account.move form
Prior to this, when searching for a currency in an invoice or journal entry,
"create" and "create and edit" options would show up to propose the creation
of the currency to the user although the currency already exists but is
inactive by default. This could lead to currency duplicates.

This implementation makes it now impossible to create a currency when
searching in a currency field and forces the user to go through the
settings to activate the currency he wants. In addition, we show the
inactive currencies as well in all journal entries that aren't
a miscellaneous operation.

task-3383375

closes odoo/odoo#127707

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-08-03 18:02:51 +02:00
Maximilien (malb) e3f4651c52 [FIX] * : Display improvement
This PR will introduce multiple display improvements. Here is the list:

- In the accounting settings, the fiscal localization section has a button that
was oddly placed. This PR solves that issue.

- On the dashboard, when clicking the three dots on a card, the options "remove
from favorites" and "configuration" were not aligned.

- In ir_attachment, the label and field of "datas" will be aligned, and a gap
will be added between the icons.

- In the settings, the button links were inconsistent in terms of padding. This
PR resolves that.

- In the payment providers, two button links had text wrapping issues. By adding
 Bootstrap classes, this has been resolved.

closes odoo/odoo#130522

Task-id: 3342969
X-original-commit: d4ba0c1f69212bfb0030036951c2888e935bbdf0
Related: odoo/enterprise#45060
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-08-02 17:29:27 +02:00
hupo-odoo 58e4baf66f [FIX] account: invoice layout left section
Fix a minor issue introduced in this commit: https://github.com/odoo/odoo/commit/60465047df56c07e61623c1f7304fede28232581
The issue is that the left bottom section of the invoice layout is constraint on the left side, even if nothing is present on the right part. This caused an issue for example with the Mexican Localization where the text beside a QR code can not reach the full width of the page, making the QR code and the text on top of eachother.

task-3444692

closes odoo/odoo#130456

X-original-commit: 1bbd89cacbbd4fc600eb2da20577d6688392485b
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Hugo Poncelet (hupo) <hupo@odoo.com>
2023-08-02 17:29:18 +02:00
Aaron Bohy 9d81cff6fd [REF] *: remove always_reload many2one option from archs
This option is no longer necessary since [1] as the value is now
reloaded by default.

[1] odoo/odoo#114024
Part of task~3179751

closes odoo/odoo#130169

Related: odoo/enterprise#44838
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-01 09:40:55 +02:00
Claire Bretton (clbr) 417268bef8 [IMP] account: Send & Print shows warning banner while async sending
When you select multiple invoices in List view and use the Send & Print, the invoices
will be sent asynchronously using a cron trigger. This can take some time.
If the user opens one of the to-be-sent invoices, there is nothing telling the
user that this invoice is part of a running batch and will be sent eventually.
This might cause cases where the user will try to trigger the send & print
manually again, causing some concurrency issue.
To at least mitigate the issue, we will display something on the
invoices that are part of a running batch of a Send & Print

task-3360179

closes odoo/odoo#129854

X-original-commit: 9349ae9d44e09f5282f4719c73c3f6b12b04e99c
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-07-27 13:25:07 +02:00
niyasraphy ff1b3427fb [FIX] account: remove upgrade widget from total amount in report
before this commit, upgrade widget was added to the field
display_invoice_amount_total_words in accounting settings,
which decides whether the total amount has to be shown
in words in invoice report.

all its functionality and code is available in community
edition.

after this commit, the upgrade widget which request to
upgrade enterprise edition to access the feature will
be removed from the display_invoice_amount_total_words
field.

closes odoo/odoo#129609

X-original-commit: 94256de52a44273c5ba1653770dd98aa14d9e334
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-07-25 21:22:53 +02:00
Damien Bouvy c8367dd53c [FIX] account,l10n_ch: report inheritance
make the qr code section easier to modify in the base report for the
swiss localization

X-original-commit: 105557cc817fc9d21837ee50ba4fbc502926d059
Part-of: odoo/odoo#129492
2023-07-25 00:54:54 +02:00
Damien Bouvy 2fbf17d235 [IMP] account: adapt reports to studio report editor
Includes several modifications to better work with the new editor:
- add placeholders on t-field/t-out nodes
- add several div.oe_structure containers in key places for easier user
edition
- add branching options for several t-if directives without a t-else to
display for users (e.g. displaying the payment QR code if the value is
set vs. when the value is not set). These branching options are set to a
default value (the t-if node) which is what users see by default in the
report editor; the t-else node is a version they can manually toggle if
they wish)
- avoiding 'naked' t nodes as child of table/thead/tbody/tr elements, as
these break the table layout in chomium-based engines (that we know of);
instead, try to have foreach loops on tr or td nodes directly, or hoist
t-set directives above the table node

X-original-commit: 60465047df56c07e61623c1f7304fede28232581
Part-of: odoo/odoo#129492
2023-07-25 00:54:52 +02:00
Laurent Smet 48c5f72ab3 [FIX] account,l10n_*: Fix custom invoice PDF report in studio
Since https://github.com/odoo/odoo/commit/fc0464427f268ed58d5f800dfcf40404640c6676
customizing an invoice PDF report leads to a white page.

This is because the dynamic t-call in PDF report in not supported by Studio
on the customization screen.

closes odoo/odoo#129484

X-original-commit: a252fe6c9d0c5fd7ff5e93af9f1ff9d86adac651
Related: odoo/enterprise#44519
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-07-24 23:04:20 +02:00
Laurent Smet 4345ba088d [IMP] account: Improve PDF reports to ease the overrides
closes odoo/odoo#128395

Task: 3069324
Related: odoo/enterprise#44052
Related: odoo/upgrade#4942
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-07-20 20:53:06 +02:00
Laurent Smet fc0464427f [IMP] account: Allow custom invoice PDF template/values for localizations in send & print
The logic of the send & print wizard is to generate all EDI documents and PDF at the same time
to ensure the consistency between all business documents.
In some localizations, we need custom references to the generated EDI documents inside the PDF.
The problem is the current PDF engine is not designed to easily extend such PDF template and provide
custom values to render it. Also, you absolutely need an ir.actions.report to use the PDF rendering.
To make such customizations less paintful, this commit adds a hook on the send & print wizard allowing
to provide a custom template inheriting the standard one and custom values for the rendering.

Task: 3069324
Part-of: odoo/odoo#128395
2023-07-20 20:53:06 +02:00
Laurent Smet 1de5c98c3a [IMP] account: Add 'Request Cancel' step in invoice workflow
Allow localizations having an EDI to prevent resetting to draft an invoice already
sent to a government. By law, in some countries, if you want to cancel an invoice,
you need to ask an authorization from the government.

Task: 3069324
Part-of: odoo/odoo#128395
2023-07-20 20:53:05 +02:00
Lucas Perais e792eb10f0 [IMP] *: sale order report: add demo data
Add Demo data in the Sale Order report to make edition more natural.

*: account, sale, sale_management, web

Part-of: odoo/odoo#128228
2023-07-20 17:01:31 +02:00
william-andre 0479b2b594 [IMP] account,*: manage subsidiary companies
Allow sharing records between company
* accounts
* taxes
* fiscal positions
* products
* ...and some related models

These records can be read and used in children companies.

This can be used to
* have different branding for different businesses
* allow more complex security rules
* consolidate branches differently
* manage different tax reports with different tax ids in the same
  country

task-3371677

closes odoo/odoo#125642

Related: odoo/enterprise#43215
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-07-20 11:49:06 +02:00
Julien Carion (juca) 6c412be2ea [IMP] *: coherent hotkey uses
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.

task-3370463

closes odoo/odoo#127469

Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:15 +02:00
Sohail Jaidi (soja) 9e0b1b5210 [REV] account: reverting warning on duplicate invoices
The aim of this commit is to revert a previous commit that introduced a warning on duplicate invoice.
This revert is done because actually different invoices can share the same reference which is not the case for the bills. The field reference was used as a trigger for the detection of the duplication, which causes issues for many cases for example for subscriptions, where the reference stay the same for all the invoices of the same subscription.

Previous to this commit:
warning for vendor bills and invoices

After this commit:
When uploading duplicate vendor bill -> Warning
When uploading duplicate invoice -> NO Warning

closes odoo/odoo#128848

Task: no_task_id
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-07-18 14:30:13 +02:00
Hubert Van de Walle (huvw) 15cf748478 [FIX] account: invoice report compatible with studio
Steps to reproduce
==================

- Open studio
- Go to reports
- Click on invoices
- Try do drag a text block at the end of the page after the table with
  the total

  Studio doesn't place a drop hook after the table.

Cause of the issue
==================

Studio only adds hooks before and after each direct child of the element
with a 'page' class.

Since [commit], the `#right-elements` and `#payment_term` elements are
outside the page and thus we can't place an element after.

Solution
========

- Move the `#right-elements` and `#payment_term` inside a new div since
  they are part of the same line and we don't want to put an element
  between them.
- Move that div inside the page.
- Add a clearfix class in order to have it's height correctly computed.

[commit]: https://github.com/odoo/odoo/pull/107714/commits/66373a538e123b29b983a8e02f302e7e258e084d

opw-3345430

closes odoo/odoo#127771

Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-07-17 09:20:45 +02:00
Sohail JAIDI (soja) 5a51816415 [IMP] account_move: Adding a warning when uploading duplicate invoice
The aim of this commit is to add a warning when an invoice is uploaded and a duplicate of this invoice already exists in db.
It is the same behaviour that we already have for vendor bills

Previous to this commit:
When uploading duplicate vendor bill -> Warning
When uploading duplicate invoice -> NO Warning

After this commit:

Warning in both cases

closes odoo/odoo#126096

Task: 3378169
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-07-13 14:47:21 +02:00
Maximilien (malb) 9ddc128d7b [IMP] sale, purchase, account: incoterm location
Before this PR, the incoterm location was not present in the account module.

This pr does multiple things:
- Add the Incoterm Location field in Accounting on Customer Invoices and Vendor
Bills. The field already exists on Sale Orders and Purchase Orders. When you
create an Invoice from a Sales Order, or a Vendor Bill from a PO, copy the value
of the field on the invoices.

- Update the PDF to display the field value if present, and remove the useless
duplication

- Remove incoterm setting on sale

- Remove useless xpath since now it is displayed directly on invoice when
incoterm field is fill.

Task-id: 3273460
Part-of: odoo/odoo#118954
2023-07-12 21:45:44 +02:00
Habib (ayh) 9299f81f19 [IMP] account: statement management 2.1
In the process of making bank statements optional, the usability of bank statement was reduced.
This PR aims improve that, by providing the ability to view and manage bank statements on the bank reconciliation widget.
See the Enterprise PR.

Task-3270046

Part-of: odoo/odoo#127630
2023-07-12 16:52:58 +02:00
Lucas Perais 26ea33bc64 [FIX] account: report invoice Rounding should be in a table row
Commit ee6e560415 probably forgot to wrap the
rounding data of the document_tax_totals_template in a table row `<tr />`

This commit corrects it

Part-of: odoo/odoo#126963
2023-07-12 03:48:49 +02:00
Ivàn Todorovich 858943c47d [IMP] *: remove deprecated use of mail widgets
They have been removed in 3fea5b213, these must be left overs.
They don't really do any harm besides providing a bad example for devs.

closes odoo/odoo#127767

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-11 21:21:04 +02:00
det a5801a12b5 [IMP] l10n_hu, l10n_sa, account: delivery date + hu brush up
In this pr, we have improved the l10n_hu localization by adding a Tax rounding
(global) by default.

Also, a lot of localization will need a delivery date on invoices. We added a
field in account that can be overridden if needed. In this pr, we did an
override on l10n_sa and l10n_hu.

When creating a sale order and that the effective date is fill, we take this
value for the delivery date.

The delivery date field will always be displayed in the other info tab, and if
there is a delivery data, the field is also display in the header of the form
view. Exception for l10n_sa and l10n_hu where the delivery date is always
present.

Also for l10n_sa company there was a problem with the vat number, it was not in
the right format.

Task-id: 3191530
Part-of: odoo/odoo#116643
2023-07-10 15:32:07 +02:00