Commit Graph
1810 Commits
Author SHA1 Message Date
Nicolas Martinelli 3c4f853365 [FIX] account: aged partner report
Let's consider an aged partner balance with a period of 30 days as of
2019-02-08. The specific dates used in the report are:

``` python
bisou = datetime.strptime('2019-02-08', "%Y-%m-%d").date()
for x in [0, 1, 30, 31, 60, 61, 90, 91, 120, 121]:
    print(x, bisou + relativedelta(days=-x))

0   2019-02-08
1   2019-02-07
30  2019-01-09
31  2019-01-08
60  2018-12-10
61  2018-12-09
90  2018-11-10
91  2018-11-09
120 2018-10-11
121 2018-10-10
```

However, the current periods generated are incorrect:

```
{'name': '0-30', 'stop': '2019-02-08', 'start': '2019-01-09'}
{'name': '30-60', 'stop': '2019-01-08', 'start': '2018-12-09'}
{'name': '60-90', 'stop': '2018-12-08', 'start': '2018-11-08'}
{'name': '90-120', 'stop': '2018-11-07', 'start': '2018-10-08'}
{'name': '+120', 'stop': '2018-10-07', 'start': False}
```

There is a clear inconsistency between the name of the period and the
date used. Moreover, the name is misleading: 0-30 includes the -0 date,
while 30-60 doesn't include the -30 date.

After the fix, the name and the periods are consistent. We also change
the first period to 1-30 since including 0 would mean to include amounts
which are not due yet.

```
{'name': '1-30', 'stop': '2019-02-07', 'start': '2019-01-09'}
{'name': '31-60', 'stop': '2019-01-08', 'start': '2018-12-10'}
{'name': '61-90', 'stop': '2018-12-09', 'start': '2018-11-10'}
{'name': '91-120', 'stop': '2018-11-09', 'start': '2018-10-11'}
{'name': '+120', 'stop': '2018-10-10', 'start': False}
```

opw-1886633

closes odoo/odoo#27294
2018-10-10 15:21:24 +00:00
Gustavo Valverde 4ae13e68bf [FIX] account: Show receipt residual amount in invoice currency
When paying an invoice in USD, using EUR as payment. The residual amount was shown in the payment currency instead of the original invoice residual currency.

closes odoo/odoo#26916
2018-09-11 20:07:33 +00:00
Goffin Simon c3812c8e62 [FIX] account: Country in invoice analysis
Steps to reproduce the bug:

- Create a contact without a parent company and set a country on it
- Link this contact to a parent company that has no country defined
- Create an invoice for the contact
- Go to Accounting / Reporting / Management / Invoicing, switch to Pivot view and group by country
=> the invoice for the contact is classified under "Undefined" even though it actually has a
country set when you go see the invoice

opw:1878819
2018-09-05 09:06:52 +02:00
Christophe Simonis 0fd5c70940 [MERGE] forward port branch saas-15 up to 6b1b507deb 2018-08-30 15:56:03 +02:00
Christophe Simonis 6b1b507deb [MERGE] forward port branch saas-14 up to ab8e27382f 2018-08-30 12:43:43 +02:00
Christophe Simonis 50bd9376d7 [MERGE] forward port branch 10.0 up to 90ce4733ae 2018-08-30 11:10:22 +02:00
Goffin Simon 7b87212ea8 [FIX] account: Wrong quantity in Invoices analysis
Steps to reproduce:

Create a customer invoice with 2 product A and refund 1 product A.
Display account.invoice.report for this custumer.

Bug:

The quantity should be 1 not 3.

Fine tuning of this commit: e890682656

opw:1868116
2018-08-29 16:29:34 +02:00
Christophe Simonis c2f220f977 [MERGE] forward port branch saas-14 up to 7836c41763 2018-08-01 12:06:06 +02:00
Christophe Simonis 7836c41763 [MERGE] forward port branch 10.0 up to e372ca5cd8 2018-08-01 11:52:45 +02:00
Lucas Perais (lpe) e372ca5cd8 [FIX] account: aged partner balance report consistent return
Before this commit, the function that computes the aged partner balance
could return a list instead of a dict if no partner were found

After this commit, we make the function's signature consistent
closes #26095
2018-08-01 11:23:31 +02:00
Christophe Simonis bda926034a [MERGE] forward port branch saas-14 up to c9a01ab30a 2018-06-26 13:13:05 +02:00
Christophe Simonis c9a01ab30a [MERGE] forward port branch 10.0 up to 58c92d9374 2018-06-26 12:57:31 +02:00
Lucas Perais (lpe) 5de096dbf2 [FIX] account: aged balance shouldn't display fully reconciled on a period
Backport of 5f105d144d from v11.0

Commit 45c5a07d89 deals with displaying on the aged balance reports
the lines that zero out each other: an invoice and a payment of the same amount for the same partner
However, that commit overlooked that when there is a chain of reconciliation
that puts the report line to zero, it was displayed as well.

This present commit corrects this by making sure there are amls that detail the report lines

OPW 1857860

closes #25421
2018-06-22 13:23:59 +02:00
Christophe Simonis f9e0f6663f [MERGE] forward port branch saas-15 up to c2f220f977 2018-08-01 12:49:01 +02:00
Lucas Perais (lpe) 5f105d144d [FIX] account: aged balance shouldn't display fully reconciled on a period
Commit 45c5a07d89 deals with displaying on the aged balance reports
the lines that zero out each other: an invoice and a payment of the same amount for the same partner
However, that commit overlooked that when there is a chain of reconciliation
that puts the report line to zero, it was displayed as well.

This present commit corrects this by making sure there are amls that detail the report lines

OPW 1858963

closes #25359
2018-06-21 09:36:58 +02:00
Martin Trigaux 8439202915 [FIX] account: initial balance has a 0 amount_currency
amount_currency is a field that is expected in multi-currency
The general ledger report has a line
    <span t-esc="line['amount_currency'] if line['amount_currency'] > 0.00 else ''"/>
which crashes if amount_currency is None

opw-1859122

Replaces and closes #25240
2018-06-20 13:18:16 +02:00
Christophe Simonis c921d94236 [MERGE] forward port branch saas-15 up to 3730a0d2df 2018-03-13 12:05:36 +01:00
Christophe Simonis 3730a0d2df [MERGE] forward port branch saas-14 up to 0e898eae35 2018-03-12 18:48:15 +01:00
Christophe Simonis 0e898eae35 [MERGE] forward port branch 10.0 up to 0440e25380 2018-03-12 18:16:02 +01:00
Christophe Simonis 0440e25380 [MERGE] forward port branch 9.0 up to 7c6da3e076 2018-03-12 14:33:58 +01:00
Olivier Colson 7c6da3e076 [FIX] account: display partial payments in overdue report
Before that, partial payments on open invoices were ignored by the query, due to the fact we used checked "reconciled=false" instead of "full_reconcile_id is not null".
2018-03-09 14:14:54 +01:00
Olivier Colson 6f35d859c5 [FIX] account: show partial payments into partner ledger
Before that, partial payments of invoices were not shown into the partner ledger unless the option to show reconciled entries was activated. This was due to the fact we checked full reconciliation with the field "reconciled" instead of the full_reconcile_id, so the query did not return the partial payments (which have reconciled=True, but don't have any full_reconcile_id unless the invoice is fully paid).
2018-03-09 14:02:19 +01:00
Lucas Perais (lpe) 45c5a07d89 [FIX] account: allow to include zero amount lines in aged partner balance
Make an invoice
Make a payment
Unreconcile them

Before this commit:
The invoice and the payment weren't display in the aged partner balance

After this commit:
Both payment and invoice *can* be included in the balance

OPW 1819359
2018-03-09 09:07:33 +01:00
Christophe Simonis 0017902733 [MERGE] forward port branch saas-16 up to 675a876347 2018-02-16 13:58:16 +01:00
Christophe Simonis 675a876347 [MERGE] forward port branch saas-15 up to 3a25ff6ccd 2018-02-16 13:57:38 +01:00
Christophe Simonis 3a25ff6ccd [MERGE] forward port branch saas-14 up to 67cc7a7c26 2018-02-16 13:57:03 +01:00
David Arnold fcaf459a89 [FIX] account: aged partner report in multi-company.
Was PR #23074. Courtesy of David Arnold
2018-02-16 10:03:30 +01:00
Christophe Simonis 6c2ab192ea [MERGE] forward port branch saas-16 up to 88a9980b0c 2017-10-10 16:49:59 +02:00
Christophe Simonis 88a9980b0c [MERGE] forward port branch saas-15 up to 66945d3427 2017-10-10 14:15:24 +02:00
Christophe Simonis 66945d3427 [MERGE] forward port branch saas-14 up to 68d1ad5b7a 2017-10-10 13:27:29 +02:00
Christophe Simonis 68d1ad5b7a [MERGE] forward port branch 10.0 up to b1ce2dd6c1 2017-10-10 13:00:48 +02:00
Nicolas Martinelli e890682656 [FIX] account: invoice analysis
- Create a customer invoice of 100, validate
- Refund the invoice
- Go to Accounting > Reports > Business Intelligence > Invoices
- A total of 200 is shown, while it should be 0.
- The same occurs with a vendor bill (-200 instead of 0)

The invoice lines have their sign modified at two places when used in
the report:
- in method `_compute_price` of `account.invoice.line`
- in method `_from` of `account.invoice.report`

The signs are computed with the following combination:

|Invoice type|`_compute_price`|`_from`|Report sign|
|------------|----------------|-------|-----------|
|out_invoice |              +1|     +1|         +1|
|in_invoice  |              +1|     -1|         -1|
|out_refund  |              -1|     -1|         +1|
|in_refund   |              -1|     +1|         -1|

This is not correct: out_invoice and out_refund should have opposite
signs. Same applies to in_invoice and in_refund.

opw-772479
Closes #19954
2017-10-10 12:31:25 +02:00
Christophe Simonis 66ca687324 [MERGE] forward port branch saas-17 up to ed901bedcb 2017-09-15 18:09:39 +02:00
Christophe Simonis ed901bedcb [MERGE] forward port branch saas-16 up to 80f916e8e0 2017-09-15 17:20:01 +02:00
Christophe Simonis 80f916e8e0 [MERGE] forward port branch saas-15 up to 27cd03e032 2017-09-15 16:45:53 +02:00
Christophe Simonis 27cd03e032 [MERGE] forward port branch saas-14 up to 82aaf1aa17 2017-09-15 16:21:03 +02:00
Christophe Simonis 82aaf1aa17 [MERGE] forward port branch 10.0 up to bf8f701032 2017-09-15 15:47:58 +02:00
Prakash Prajapati 0c04aaa303 [IMP] account: generic PDF tax report for community.
Was PR #19097. Was task 35751.
2017-09-14 17:49:01 +02:00
Lucas Perais ecc7509277 [FIX] account, invoice analysis: negative amounts for in_invoice-like
Before this commit, the invoice analysis report summed the amount of invoices regardless of whether they were in or out,
as if it were an absolute sum.

This commit corrects the behavior back to v9's, where in_invoice have the minus sign and are hence subtracted

opw 769409. Was PR  #19413
2017-09-14 09:56:07 +02:00
Christophe Simonis 017ee5eab3 [MERGE] forward port branch saas-17 up to 877e709871 2017-08-24 13:17:53 +02:00
Olivier Dony 695716efb0 [FIX] P3: remove pycompat.{keys,items,values} helpers
Now that we're closer to switching to P3 for good, these helpers have
outlived their usefulness, and mostly add noise.

All remaining dict.iter*() or dict.view*() must be converted to the
normal keys(), values() or items() calls.

Whenever the result is likely to be used for more than the scope of a
loop, or when the dict needs to be modified during iteration, the calls
must be wrapped in a ``list()``, to protect the new P3 semantics.
Those cases are very exceptional.

Also removed some dead code or improved the API to remove unnecessary
conversions.
2017-08-20 23:25:54 +02:00
Xavier Morel a4ada695e1 [FIX] P3: absolute ordering removed 2017-08-19 02:34:21 +02:00
Yannick Tivisse 8cc216b659 [IMP] account: Split clearly the accounting & invoicing applications
PURPOSE
=======

1) Have a clear split between the invoicing and the accounting apps
2) Have a clear split between the community and the enterprise version (no accounting in community)

SPECIFICATION
=============

(1) When only invoicing installed, we shouldn't see accounts (for community and enterprise)
(a) Perpetual Inventory Valuation:
     - Hide the field inventory valuation from the product category
(b) Taxes
- No accounts
- No cash basis option
- No tax adjustment

(2) Remove from Community, modules:
- Accounting
- Budgets
- Assets

(3) No account_report in community, keep PDF reports for
- sale/purchase journal
- Aged partner balance
- Partner Ledger

(4) Clean split between invoicing and accounting in enterprise
(a) When installing invoicing, I shouldn't have access to accounting just by changing my access right to adviser
(b) Menus (when only invoicing installed)
- Sales
    - Customer Invoices
    - Customer Credit Notes
    - Payments
    - Customer Statements
    - Customers
    - Sellable Products
- Purchases
    - Vendor Bills
    - Vendor Credit Notes
    - Payments
    - Vendors
    - Purchasable Products
- Reporting
    - Partner Reports
        - Partner Ledger
        - Aged Receivable
        - Aged Payable
    - Audit Reports
        - Tax report
    - Management
        - Invoices
        - Product Margins
- Configuration
    - Settings
    - Products
        - Products
    - Accounting
        - Taxes
        - Fiscal Positions
        - Bank Accounts
        - Journals
    - Management
        - Payment Terms
        - Follow-up levels
    - Payments
        - Payment Acquirers
(c) Settings (when only invoicing installed)
- Fiscal Localization
- Taxes
    - Default Taxes
    - Rounding Method
    - TaxCloud connection
    - TaxCloud Categories
    - EU Digital Goods VAT
    - VIES VAT CHECK
- Currencies
    - Main currency
    - Multi-currencies
- Invoicing
    - Warnings
    - Docsaway
- Customer Payments
    - Follow-up levels
    - Payment Followup
- Bills Payment
- Bank & Cash
- Analytics
    - Margin
- Automated Entries

Remarks
- Test with the different access rights
2017-08-11 13:57:30 +02:00
Christophe Simonis 8a1311bca1 [MERGE] forward port branch saas-17 up to 3d4238f71e 2017-07-26 23:35:06 +02:00
Christophe Simonis 4f501348c4 [MERGE] forward port branch saas-16 up to 46e1104ce1 2017-07-26 19:55:44 +02:00
Christophe Simonis 46e1104ce1 [MERGE] forward port branch saas-15 up to 681f03e309 2017-07-26 19:41:57 +02:00
Christophe Simonis 681f03e309 [MERGE] forward port branch saas-14 up to c4e9b854ff 2017-07-26 18:47:54 +02:00
Christophe Simonis e8d4a11e6e [MERGE] forward port branch 10.0 up to 0a089f87fb 2017-07-26 16:56:57 +02:00
Pragnesh Mistry faf7225022 [IMP] account,...: Improve accounting menuitems
A little bit a reorganization, typo correction, menuitems uniformization between localizations, useless menuitems removal.
2017-07-26 16:35:53 +02:00
Nicolas Martinelli 8354efde0a [FIX] account: missing dependency
Introduced by 1e4f4299bc

opw-756270
2017-07-24 15:10:11 +02:00