Commit Graph
106 Commits
Author SHA1 Message Date
jbw 064edb2223 [IMP] account, sale, purchase: accrued entries from purchase & sales orders.
Accrued liabilities, or accrued expenses, occur when you incur an expense that you haven’t been billed for (aka a debt).
For example, you receive a good now and pay for it later (e.g., when you receive the invoice). The same opposite approach for sales.

Why do accountants need such entries ?
- Accounting must give a fair view of the financial situation of a company. The loss/profit must be booked regarding the effective deliveries of goods/services, not on the paperwork only.
- On a fiscal point of view, if you want to be allowed to deduct a loss from your taxable basis, it has to be in the right period. If you didn't announce it on time, the loss might be rejected by fiscal authorities. Same goes for the augmentation of the taxable basis, it has to reflect real deliveries and not only paperwork.

was Task: 2555642
was PR #73707

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-08-26 11:34:14 +00:00
Nicolas (vin) a60567a659 [IMP] account_accountant : update the account_accountant tour
The current accounting tour is broken, this change will fix it.

Task id #2289610

closes odoo/odoo#55850

Related: odoo/enterprise#12389
Related: odoo/upgrade#1643
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2020-08-17 13:51:41 +00:00
william 0ea9254c81 [IMP] account: fusion wizards for automatic entries
Task 2227389

The wizards for creating Accrual Entries and Transfer Entries are quite
similar. We are merging them as they share code and business logic.

Entries in the future should not be posted for both wizards, but set to
be auto posted instead.
2020-08-05 11:57:10 +00:00
Laurent Smet caeb782841 [IMP] account,*: Improve bank statements/payments workflow
- Create journal entries as soon as bank/cash statement lines are created, temporary booked on a suspense account set on the journal.
- Simplify the management of "blue" lines in the reconciliation widget. A "blue" line is now a journal item using a temporary liquidity account (outstanding payment/receipt accounts, set on the journal).
- Adapt and simplify the bank reconciliation report.
- Remove the bank reconciliation threshold date. The reconciliation report will show the not already reconciled journal entries using a liquidity account and the not already reconciled journal entries using a temporary liquidity account. Without accounting, an account.payment will involve directly the liquidity account and then, will be considered as a statement line directly.
- Remove the post_at bank reconciliation feature. The "paid" state will be set on the invoices only if reconciled with a journal entry involving the journal's liquidity account.
    With invoicing, the payment will do that so the "in_payment" state should never be shown up.
    With accounting, only the statement lines have the power to move an invoice to the "paid" state.
- Fix various corner cases about the management of multi-currency in bank statement lines.
- Fix the conversion dates in multi-currency: Since the bank/cash is always used on the statement lines, it will use always the real "bank" date instead of the fictive payment one.
- Ensure the 'reconcile' method will raise an error if the involved moves are not posted.

related enterprise PR odoo/enterprise#7019

closes odoo/odoo#41301

--task: 2092096
Related: odoo/upgrade#1018
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-04-10 09:47:24 +00:00
wan dfd01b8c5c [IMP] account: rework name sequences
Task 2146469

Rework the name computation:
* It doesn't use ir.sequence anymore
* It is an editable computed field
* Add a renaming tool

This allows the user to tweak the sequences more easily than having to
get through the ir.sequence settings.

The sequence depends on a parameter of the journal: continuous, montly
and yearly restart of the sequence. Everytime a new period is started,
try to make a pattern form another period.

The incrementing is done by taking the previous name, ordered
lexicographically, splitting it by taking the digits at the end, adding
1 and re contstruct with the prefix.

** This means there could be cases where the prefix has a big importance
on the next number. For instance, if you have
INVOICE/2019/0001
INVOICE/2019/0002
and then rename the last one to INV/2019/0002, don't expect the next
number to be INV/2019/0003. It will be INVOICE/2019/0002 (again) because
the highest number was INVOICE/2019/0001.
You will then end up with
INVOICE/2019/0001
INV/2019/0002
INVOICE/2019/0002

closes odoo/odoo#41485

Related: odoo/enterprise#7189
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-05 13:59:43 +00:00
oco-odoo 170eaa4743 [IMP] account: add wizard to perform transfers between accounts
This wizard also reconciles automatically entries done on reconcilable accounts. It can hence for example be used to "move" the balance of a receivable account into a payable account (or the opposite), using the generated transfer entry to do as if the receivable and payable accounts were directly reconciled together.

[IMP] account: display 'P' as matching number when account.move.line objects are partially reconciled

For this, we introduce a new matching_number field, used in account.move.line's tree views instead of full_reconcile_id, which used to be shown directly.

Was task: 2037318

closes odoo/odoo#39415

Related: odoo/enterprise#6544
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-01-17 13:34:15 +00:00
wan 60dadc8ecd [IMP] account: acrual expenses/revenues
=======
Purpose
=======
Accruals are revenues and expenses that are incurred during an accounting period for which no invoices or payments were received or made.

=> We suggest a wizard allowing recognizing the Expense/Revenue in a different period keeping tax return in the invoice period.

Example:
A vendor bill received in February which was for the December consumption.
You should recognize the expense in December but the tax return is still due to February.

1) Regular Vendor Bill in february
Account          D          C
600 ACHAT    10000
411 TVA       2100
440 FOUR                12100

2) Action opening a wizard that allows specifying when we have to move the expense.
- Targeted date, accrued account (expense, revenue, taxes, ...)
- Action from account.move.line ?

3) Wizard result
a) The expense account is replaced by the accrued expense account in the original vendor bill journal entry (february)
Compte           D          C
444 FAE      10000
411 TVA       2100
440 FOUR                12100

b) A new accrual journal entry is created for the original expense account in december
Compte           D          C
600 ACHAT    10000
444 FAE                 10000

Was task 2006617

closes odoo/odoo#36053

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-26 12:16:27 +00:00
Julien MougenotandLucas Perais ed18095127 [IMP] base: Configure document layout
The onboarding modal for setting up the few base fields of a company
has now been moved to a wizard
It is accessible from the general settings, but also in the onboarding
section of sale and account modules.

The following company settings are editable with that wizard:

- Set report **layout**:
The user can chose the overall look of the report. The current choices
are : *Standard* (default), *Background*, *Boxed* and *Clean*.

- Set company **logo**:
Changes the company logo.

- Set report **colors**:
The user can set the primary and secondary colors of the report through
a newly added widget allowing to pick a custom color.
When changing the **logo**, colors are automatically set to its most dominant
colors.
> A "Reset colors" button also triggers the color calculation.

- Set report **font**:
Changes the overall font of the report. Only Google Fonts are used
for enhanced compatibility.

- Company **tagline**, also called "header"
- **Footer**
- **Paper format**
- Report **preview**:
A mockup of a final report
Automatically updates when changing **layout**, **logo**, **colors** or **font**

Co-authored by: Julien Mougenot <jum@odoo.com>

closes odoo/odoo#33863

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>


Co-authored-by: Lucas Perais <lpe@odoo.com>
2019-07-29 08:29:26 +00:00
wan f722ef0cb0 [IMP] account, _facturx, l10n[be,it]_edi: remove account.invoice.import.wizard
Since the wizard is not shown anymore (skipped to go right to file selection), we can remove it. Small refactoring had to be done for l10n_it in order to upload files with multiple invoices inside and to detect format

closes odoo/odoo#34145

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-07-19 09:34:59 +00:00
Laurent Smet bc131c0cfb [MERGE] manual forward port of accounting-pocalypse (beaa30a3d1)
This commit merges the following models
 * account.invoice and account.move
 * account.invoice.line and account.move.line
 * account.voucher and account.move
 * account.voucher.line and account.move.line

It was the opportunity for a big cleanup of the code, so it also restructures the whole account module, its different models/fields, the tests etc. for a better world and a better code readability.

==== Rationale ====
The rationale of this huge change is that we want journal entries / invoices to be easily edited, and changes reflected in the other model. It's a HUGE feature and very strategic for the fiduciary companies. For example, changing the account of a journal entry needs to be automatically reflected on the related invoice.

The same reasoning applies to sale/purchase vouchers.

==== Changes made in features =====
When creating an invoice, you are now creating a journal entry directly.
--> The object account.invoice no longer exists.
In the same fashion when creating an invoice line, you're now adding journal items directly in the journal entry representing the invoice. If this invoice line has some tax, it may create additional journal items as well.
--> The models account.invoice.line & account.invoice.tax no longer exist

Identically, when creating a sale/purchase receipt with its lines, you are now creating a journal entry directly and there's no more usability difference between encoding a receipt or an invoice.
--> The object account.voucher no longer exists.
--> The object account.voucher.line no longer exists.
--> The whole account_voucher module no longer exists.

Positive side-effects coming from these changes are
* draft invoices/bills/sale or purchase receipts now create a draft accounting entry. Validate these objects now simply post its journal entry. That means that draft invoices/bills/sale or purchase receipt can straightforwardly be included in reporting or budgets.
* opening a journal entry in form view will now always open the correct view: if it's a sale/purchase journal entry we will have a customer invoice/vendor bill view or a sale/purchase receipt view, whatever the menu we're coming from.
* code & business logic simplification. It is also condensed in a single place instead of being partially duplicated on invoices, vouchers and journal entries.

There should be no feature loss, except the one allowing to group multiple journal items together based on the same product during the invoice validation.

==== Changes made in models =====
* account.invoice: model removed. Instead, now use account.move with following mapping

field (account.invoice) 		field (account.move)
-----------------------			--------------------
name 					invoice_payment_ref
number 					name
reference 				ref
comment 				narration
user_id 				invoice_user_id
amount_					total_company_signed amount_total_signed
residual 				amount_residual
state 					state + invoice_payment_state 		/!\ selection changed
date_invoice 				invoice_date
date_due 				invoice_date_due
sent 					invoice_sent
origin 					invoice_origin
payment_term_id 			invoice_payment_term_id
partner_bank_id 			invoice_partner_bank_id
incoterm_id 				invoice_incoterm_id
vendor_bill_id 				invoice_vendor_bill_id
source_email 				invoice_source_email
vendor_display_name 			invoice_vendor_display_name
invoice_icon 				invoice_vendor_icon
cash_rounding_id 			invoice_cash_rounding_id
sequence_number_next 			invoice_sequence_number_next
sequence_number_next_prefix 		invoice_sequence_number_next_prefix

'invoices' subset of account.move can be accessed by using the selection field 'type' or one of the many helpers like is_invoice()

* account.move: now has a valid state 'cancel' that has to be excluded from all business logic
* account.move: field 'amount' renamed into 'amount_total'
* account.move: field 'reverse_entry_id' renamed into 'reversed_entry_id'
* account.move.line: now has a field 'display_type' that has to be excluded from all business logic, in order to support invoice layouting
* account.invoice.line: model removed. Instead, now use account.move.line with following mapping

field (account.invoice.line) 		field (account.move.line)
----------------------------		-------------------------
invoice_id 				move_id
uom_id 					product_uom_id
invoice_line_tax_ids 			tax_ids
account_analytic_id 			analytic_account_id

'invoice lines' subset of all account.move.line from a journal entry can be accessed by using the boolean field 'exclude_from_invoice_tab'

* account.invoice.tax: model removed. Instead, now use account.move.line with following mapping

field (account.invoice.tax) 		field (account.move.line)
---------------------------		-------------------------
invoice_id 				move_id
account_analytic_id 			analytic_account_id
amount 					price_unit
base 					tax_base_amount

'tax lines' subset of all account.move.line from a journal entry can be accessed by using the relational field 'tax_line_id'

* account.invoice.confirm: model removed. Instead, now use the 'post()' function of account.move
* account.invoice.refund: model removed. Instead, now use account.move.reversal to reverse the entries with the same options as we had for invoices
* account.voucher: model removed. Instead, now use account.move of type in ['out_receipt', 'in_receipt]
* account.voucher.line: model removed. Instead, now use account.move.line

==== Changes made in functions ====
* on account.move, method _run_post_draft_to_post() renamed into _autopost_draft_entries()
* on account.move, method action_account_invoice_payment() renamed into action_invoice_register_payment()
* on account.move, method action_invoice_reconcile_to_check() renamed into action_open_matching_suspense_moves()
* on account.move, method _get_domain_edition_mode_available() renamed into _get_domain_matching_supsense_moves()
* on account.move, method _get_intrastat_country_id() renamed into _get_invoice_intrastat_country_id()
* on account.move.line, method _get_domain_for_edition_mode() renamed into _get_suspense_moves_domain()
* in account.bank.statement, contextual key 'edition_mode' renamed into 'suspense_moves_mode'

Was task 1917430
2019-07-01 13:45:57 +02:00
Laurent Smet 1a871d7243 [ADD] l10n_be_edi: allow import of XMLs as Vendor Bills
Task 1823110
New module to import bills in the belgian e-invoice format.

Author: las@odoo.com
Co-Author: wan@odoo.com

closes odoo/odoo#24303

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-05 09:08:09 +00:00
Antony Lesuisse e51b4f659f [REM] account: Remove deprecated pdf reports 2018-10-01 16:37:59 +02:00
Rémi Rahir 53cdd68e7c [IMP] account,snailmail: support batch calls
- reworked the multi.compose.message model to manage
   several documents simultaneously
 - Added a letter model for asynchronous processing
 - usability improvement of the modal
2018-08-10 18:41:00 +02:00
Cedric Snauwaert cf4d4a05fd [FIX] account: the account.move.line.reconcile is not used anymore so remove it 2018-08-10 16:10:37 +02:00
Rémi Rahir 4cb9194275 [ADD] snailmail: new iap module to send letters by post 2018-07-19 15:54:00 +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
Olivier Colson 2d1b8e9f34 [IMP] account: new setup bar
Add a setup bar on account's dashboard, so that the user can more easily enter the initial data of his Odoo installation, following the steps that are proposed to him.

Was PR #16864
Was task 32119
2017-08-31 15:58:22 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
qdp-odoo 0d42c6e604 [MERGE] account: merge of account_tax_adjustment module as a core feature of account module. Added a boolean 'tax adjustment' on account.tax to define taxes that can be used in the wizard instead of taxes with fixed amount of 0 2016-05-12 17:18:01 +02:00
qdp-odoo 8dd9b25a62 [MOV] account: moving reports from account_extra_reports to account 2016-02-19 17:37:46 +01:00
Foram Katharotiya 453adf434f [IMP] account: put back old PDF reports for people using only the community version 2015-09-10 17:52:51 +02:00
Thibault Delavallée 19a252d578 [REM] account: unnecessary code
Removed a code that allows to write a message, using a subtype that
does not exist. This is probably critical for some business, but
as I don't know which ones, let's remove it.

Chatter is sufficient.
2015-08-14 09:48:19 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02:00
qdp-odoo c04065abd8 [IMP] accounting v9. Yeeeeaah 2015-05-05 17:28:04 +02:00
Leonardo Donelli 4a0b13ed92 [REF] remove vim modelines and resulting trailing blank lines
Let 2015 be a year without modelines!
cf #4174
2014-12-31 15:52:13 +01:00
qdp-odoo e3491ccb71 [IMP] account: bank statement reconciliation widget (part 2) 2014-05-30 18:47:50 +02:00
dle@openerp.com 8acb5e3d4a [DEL]Journal items wizard
bzr revid: dle@openerp.com-20121129164442-i50abrcy2ejvavee
2012-11-29 17:44:42 +01:00
Stephane Wirtel ec308a08e7 [IMP] account: Add new wizard for the cash register "Take Money Out", "Put Money In"
[FIX] point_of_sale: Fix some bugs

bzr revid: stw@openerp.com-20120504125158-p45qfzo8mif6x9xe
2012-05-04 14:51:58 +02:00
Quentin (OpenERP) 8ec0108649 [REM] account: removal of deprecated account reports for balance sheet and profit/loss
bzr revid: qdp-launchpad@openerp.com-20111209162558-xigtewgren97xuk5
2011-12-09 17:25:58 +01:00
Ujjvala Collins (OpenERP) be08728a43 [IMP] account:
* Moved 'sign' field from account type to financial report object.
* Changed and added demo data as per the new requirements.
* Replaced the 'Balance Sheet' and 'Profit and Loss' reports with Financial report.

bzr revid: uco@tinyerp.com-20111201115521-g8npi3igpq8dvthu
2011-12-01 17:25:21 +05:30
Olivier Dony b4d35641bd [MERGE] sync with latest trunk
bzr revid: odo@openerp.com-20110929110856-tto1jwqaievdr3d4
2011-09-29 13:08:56 +02:00
Ujjvala Collins (OpenERP) d75e8e130b [REF] account: Renamed the object account.low.level.report to account.financial.report.
bzr revid: uco@tinyerp.com-20110909055456-f4s8yh6nzyrxoo3z
2011-09-09 11:24:56 +05:30
Quentin (OpenERP) cfab7f39f0 [IMP] account: account_report improvements. BTW, now it's called 'low level report'
bzr revid: qdp-launchpad@openerp.com-20110824124908-nz0j00v7s6qka0o1
2011-08-24 14:49:08 +02:00
Ujjvala Collins (OpenERP) 27a0a2c059 [ADD] account: Added new object account.report for printing reports.
bzr revid: uco@tinyerp.com-20110811110847-telg63rtz0bshdry
2011-08-11 16:38:47 +05:30
Amit Parmar (OpenERP) e26ae4e800 [EDI] refactor code of specific import
bzr revid: aar@tinyerp.com-20110621132925-95jijdbuml3st9bo
2011-06-21 18:59:25 +05:30
vra 8ba08a76bc [REM] account: removed compare account balance report from account module.
bzr revid: vra@tinyerp.com-20100924051812-0z62syveozpcjy05
2010-09-24 10:48:12 +05:30
Mustufa Rangwala 23f99c1681 [ADD] Account_voucher: import invoice from bank statements moved from account module
bzr revid: mra@mra-laptop-20100922062308-859tbohs0ne09hj0
2010-09-22 11:53:08 +05:30
Mustufa Rangwala f3ed9fb055 [REM] Account: on invoice, remove completely the pay invoice wizard... this feature will not be needed anymore. The account_voucher module will add something similar => just remove the wizard)
bzr revid: mra@mra-laptop-20100830061334-tv8nex0jkdomotx0
2010-08-30 11:43:34 +05:30
Mustufa Rangwala 19380a87a0 [IMP] Tax chart by wizard: * the menuitem Accounting \ Chart \ Chart of taxes, have to ask for a period, by default filled with the current period. Then opening the chart of tax using that period in context to have the sum period and sum years completed. It should also ask if we want to include the draft account moves or not
* the company_id field should be hidden in that chart, if the user doesn't have the useabilty / multi company group

    * the chart should display the period sum before the year sum

bzr revid: mra@mra-laptop-20100827103013-ppj8y6loadpw8oz4
2010-08-27 16:00:13 +05:30
RHA (Open ERP) d5ad0b8ff1 [CLEAN]: Removed commented codes, unnecessary spaces.
bzr revid: uco@tinyerp.com-20100819115157-sfsmbnjdgpp4wl12
2010-08-19 17:21:57 +05:30
Mustufa Rangwala e994145041 [ADD] Account: Common class for account type report where account print in reports
[IMP] change accoridingly with new class for account reports (display_account field)

bzr revid: mra@mra-laptop-20100728093332-opdxooergv1fqiyn
2010-07-28 15:03:32 +05:30
Mustufa Rangwala aa11e3d434 [MERGE] Merge with main branch
bzr revid: mra@mra-laptop-20100728061306-j5ysfgfb09k8sbjj
2010-07-28 11:43:06 +05:30
Mantavya Gajjar 08855162c6 [IMP]: improvement in to the account
* invoice
* journal
* account move
* accout move lines

bzr revid: mga@tinyerp.com-20100727143307-sz4f7tb86mkzfs8g
2010-07-27 20:03:07 +05:30
Mustufa Rangwala 6f1350e838 [RENAME] rename common report files
bzr revid: mra@mra-laptop-20100716124615-vw1yspuokgcq5fmz
2010-07-16 18:16:15 +05:30
Mustufa Rangwala 0b3ea590dd Rename files
bzr revid: mra@mra-laptop-20100716123057-00vg1v8litpapn4v
2010-07-16 18:00:57 +05:30
Mustufa Rangwala cb9caacb96 [RENAME] rename third party ledger
bzr revid: mra@mra-laptop-20100716090706-opdxsharfh2qarbx
2010-07-16 14:37:06 +05:30
Mustufa Rangwala d0cab17eba [IMP] Rename some files on report folder and change common report result_initial_bal => with day=-1 with from date
bzr revid: mra@mra-laptop-20100716072144-23il6f8qd3xazfmy
2010-07-16 12:51:44 +05:30
Mustufa Rangwala a39f8a5736 [IMP] Account: Partner balance: improve with new class added common partner report
bzr revid: mra@mra-laptop-20100713094157-f1s520efs0hirmf1
2010-07-13 15:11:57 +05:30
qdp-launchpad@tinyerp.com 2dc549c3b6 [REF] account: changing name of account balance wizard files
bzr revid: qdp-launchpad@tinyerp.com-20100706121855-7cme6902l02bj1fl
2010-07-06 14:18:55 +02:00
qdp-launchpad@tinyerp.com 13241bca58 [IMP] account: journals report - more refactoring
bzr revid: qdp-launchpad@tinyerp.com-20100629160516-67e1toe81fjky759
2010-06-29 18:05:16 +02:00