Commit Graph
302 Commits
Author SHA1 Message Date
Nicolas Martinelli d0029f11ce [IMP] account: short code always required
The short code is always required for the following reasons:
- The auto-generated code is useless for search purpose because user
  cannot choose it (BNK or CSH is maybe not meaningful for him)
- If the system cannot generate an unused journal code, the user is
  stuck since the field is read-only in the interface.

However, the code can still be auto-generated, although it is required
in the interface. This is to avoid breaking modules that would expect
this feature. At the same time, the logic has been improved to reduce
the number of search requests.

opw-674485
2016-04-13 16:52:50 +02:00
Christophe Simonis 9b5ba8b238 [MERGE] forward port of branch saas-10 up to 21c7ef8 2016-04-12 12:38:02 +02:00
Christophe Simonis 21c7ef8bf5 [MERGE] forward port of branch saas-9 up to eb44341 2016-04-12 11:56:44 +02:00
Christophe Simonis eb443410ff [MERGE] forward port of branch 9.0 up to afba8ce 2016-04-12 11:12:57 +02:00
Goffin Simon afba8cec23 [FIX] account: partner_id field in account.move
From 94ed4ce8c8

The original issue is the following:
- Go to the journal item creation
- Choose a partner
- Add a line => the partner on the journal item is removed

This is because `partner_id` on the account move is a related to
`partner_id` on the account move lines. This is likely to cause errors
during the manual encoding of a journal item, since the relation will
link the partner of the account move to the partner of the first account
move line only.

opw:672354
2016-04-12 10:54:37 +02:00
Fabien Pinckaers 1fcf76ff1d [IMP] account: difference in bank journals 2016-04-11 23:01:55 -07:00
Fabien Pinckaers 45bde5721a [IMP] account: difference in account journals 2016-04-11 22:58:37 -07:00
qdp-odoo 67c444bb38 [FIX] account: Don't create journals several times with hierarchical account charts. Courtesy of pedrobaeza. PR #11491 2016-04-11 18:18:12 +02:00
qdp-odoo b2a321a878 [FIX] account: Find correctly taxes when using hierarchical charts of accounts. Courtesy of pedrobaeza. PR #11493 2016-04-11 18:18:12 +02:00
qdp-odoo 20381eb33d [FIX] account: get rid of 'cannot create unbalanced entry' on bank reconciliation using a tax on manual entry created. Was ticket 673358 2016-04-08 16:54:54 +02:00
Cedric Snauwaert bec5d2595a [ADD] account_bank_import_statement_csv: add module to import csv bank statement 2016-04-08 14:13:55 +02:00
Yannick Tivisse 536dbc50db [IMP] account,sale,purchase,stock: Add groups to activate warnings 2016-04-07 10:08:20 +02:00
Yannick Tivisse df38cf9502 [MOV] account: Move account part from warning module 2016-04-07 10:08:19 +02:00
Christophe Simonis 658989868c [MERGE] forward port of branch saas-10 up to aa6ebd1 2016-04-05 20:08:50 +02:00
Christophe Simonis aa6ebd146a [MERGE] forward port of branch saas-9 up to 549daaa 2016-04-05 19:27:34 +02:00
Christophe Simonis 549daaaba4 [MERGE] forward port of branch saas-7 up to 3e639f4 2016-04-05 19:08:01 +02:00
Christophe Simonis 3e639f4bea [MERGE] forward port of branch 9.0 up to 9e2de9b 2016-04-05 19:06:25 +02:00
Damien Bouvy 8ae6406a37 [FIX] account: allow forcing company when fetching fpos
The code to fetch the fiscal position of a partner uses ACLs and
ir_rules to select the correct ones, but when calling the function
as admin, multi-company rules flight out the window.

By allowing to force a company in the context, we can get the fpos
as the admin from the pov of any company.
2016-04-04 15:37:22 +02:00
Fabien Pinckaers 218a816149 [FIX] removing write field: statement_line_id is on move 2016-04-03 15:50:44 -07:00
Fabien Pinckaers 9188d01934 [FIX] correct domain for entries selection 2016-04-01 23:36:09 -07:00
Fabien Pinckaers 3d48f2a375 [IMP] Create payment when registered from bank statement 2016-04-01 22:07:42 -07:00
Christophe Simonis 79976bd779 [MERGE] forward port of branch saas-10 up to 6e95659 2016-04-01 19:10:34 +02:00
Christophe Simonis 6e95659a08 [MERGE] forward port of branch saas-9 up to f4d1adc 2016-04-01 18:51:55 +02:00
Christophe Simonis 6c8141a1df [MERGE] forward port of branch saas-10 up to 2483327 2016-04-01 16:15:35 +02:00
qdp-odoo 2b039c7643 [MERGE] forward port of branch 'saas-7' into saas-9 up to revision 7853c9c7bb 2016-04-01 14:50:57 +02:00
qdp-odoo 7853c9c7bb [MERGE] Merge branch '9.0' into saas-7 up to revision 8ba922936b76cb0fb9ab8ddda6ae4b2e5f087067 2016-04-01 14:49:16 +02:00
Denis Ledoux 17f4d22594 [MERGE] forward port of branch saas-7 up to 2d2028a 2016-04-01 11:26:27 +02:00
Denis Ledoux 2d2028a66c [MERGE] forward port of branch 9.0 up to b44cb82 2016-03-31 17:57:22 +02:00
Nicolas Martinelli 2e4777bb32 [FIX] account, purchase: price_unit as Float
The price unit on the account move line is defined as a monetary field.
However, on a Sales Order or on a Purchase Order, the price unit is
defined as a float with precision 'Product Price'. Therefore, when an
invoice is generated from a SO or a PO, inconsistencies arise if the
product price precision is larger than the currency precision.

opw-673251
2016-03-31 17:08:37 +02:00
Cedric Snauwaert 90650245d0 [FIX] account: update-check should allow aml with debit=credit=0
Problem: if we try to validate an invoice with a line with a discount of 100%,
this will create an aml with debit=credit=0 and reconciled flag as True.
So when trying to cancel invoice, it is not possible because the check tell us
that there is an entry which is reconciled and we can't unreconcile that entry,
so the check should just ignore line with debit-credit=0.
Also add readonly to general_account_id related field on account.analytic.line.
This is to prevent a write while creating the account_move_line in the case of an
invoice with analytic account.
2016-03-31 10:31:29 +02:00
Denis Ledoux 4b6218874a [FIX] account: re-introduce get_formview_id for invoices
`get_formview_id` returns a view id to open
the document with. This method is meant to be
overridden in addons that want to give
specific view ids for example.

A link to an invoice must open a different form view
according if this is a customer or a vendor invoice.

This is handled by overriding `get_formview_id`
and returning the view id that should be used
according to something in the record
(e.g. according to the `type` field).

It was present in 8.0, it was somehow
removed in Odoo 9.0 during the refactoring
of the accounting modules, probably
for a wrong reason.

opw-673246
2016-03-30 13:26:19 +02:00
Kinjal Mehta 1409de5d36 [IMP] Convert UserError into ValidationError when only a message to display
When only a message argument is given to the crash manager, the popup display
"Error while validating constarint" and "None" with the warning message
which does not make any sense for the common user.
2016-03-30 09:17:42 +02:00
Goffin Simon cb435481c0 [FIX] account: _get_counterpart_move_line_vals
When the move_id was not set in the invoice, the field number
is False and making False + a string raised a type Error.
2016-03-25 09:28:33 +01:00
Christophe Simonis ddb0fb2739 [MERGE] forward port of branch saas-9 up to 59d3f63 2016-03-24 16:53:45 +01:00
Christophe Simonis 59d3f63c58 [MERGE] forward port of branch saas-7 up to 9e4157b 2016-03-24 15:12:00 +01:00
Kinjal Mehta a57592abe4 [IMP] analytic: Replaced account_type field by active field
Currently there is a selection field 'account_type' on the
account.analytic.account model with 2 values : Active or Archived

Let's use an active field instead and add a Archive stat button on the
form. That way, we can remove all the domain ('account_type','=','normal')
which are implicit with the generic active field behavior
2016-03-23 16:35:34 +01:00
Nicolas Martinelli 94ed4ce8c8 [FIX] account: manual creation of journal item
The original issue is the following:
- Go to the journal item creation
- Choose a partner
- Add a line => the partner on the journal item is removed

This is because `partner_id` on the account move is a related to
`partner_id` on the account move lines. This is likely to cause errors
during the manual encoding of a journal item, since the relation will
link the partner of the account move to the partner of the first account
move line only.

opw-670661
2016-03-23 15:36:06 +01:00
rmu-odoo 319353dea4 [IMP] account,account_asset:few usability changes
1. Add an accounting configuration option
   "Assets management & Revenue recognition"

2. Deferred revenue account not set by default in product
    - Create new Deferred Revenue Type
    - Create new product and assign this "Deferred Revenue Type"
      you can see in income account there is nothing set. Actually
      when we select revenue type then in income account system
      have to set "Deferred Revenue Account" which we set on revenue type.
      Otherwise, if we create invoice for this product then system will
      by default take the income account from product category.

3. Change word Depreciation to Revenue :
2016-03-23 13:20:12 +01:00
qdp-odoo d8137d35b7 [FIX] [tldr] account: multi-currencies fixes.
[FIX] account: fixed behavior in order to create the exchange rate difference entry at the full reconciliation only.

 This is needed in order to support the use case where an invoice in foreign currency is paid on a bank account in company currency,
 with the user encoding manually the difference due to the currency fluctuation (writeoff in the bank statement reconciliation interface): before
 this patch, Odoo was doing automatically the same, what results in a duplicated currency difference booking). ticket ID: 670876.
 A test has also been added in account/tests/test_reconcilication.py (test_statement_euro_invoice_usd_transaction_euro_full) to ensure that use case
 is now fixed.

[FIX] account_full_reconcile: a reconciliation is full as soon as either total_debit = total_credit OR if total_amount_currency is 0
[FIX] account: when registering a payment with a writeoff, always create the writeoff line exactly as entered by the user. Before, it was modified
 by the exchange rate entry, for some reason...
[FIX] account: on invoices, show the payment widget and outstanding payments in the invoice's currency always
[FIX] account: when assigning a payment in company currency on an invoice in foreign currency, save the amount_currency in order to create the correct
 exchange rate.
[FIX] account: show the currency difference entry on the invoice payments widget
[FIX] account: fixed the reconciliation methods in order to work with exchange rate entries that have debit = credit = 0
[FIX] account: fixed reconciled field computation. A line is reconciled only if its amount_residual AND amount_residual_currency are 0
[IMP] display the move name of payments on the invoice payments widget
2016-03-23 09:57:59 +01:00
Martin Trigaux b54b888305 [MERGE] Forwardport of branch 9.0 up to revision 87578177 2016-03-22 14:30:21 +01:00
Denis Ledoux 31eb1438a1 [FIX] account: settings, prevent the re-write of the company currency
When applying the accounting configuration wizard,
the `currency_id` was being re-written on the company,
even if there was no change (if the currency remained the same),
because of the related.

This leaded as well to the re-write of the company currency
on all journal items, because the `company_currency_id` on
`account.move.line` is a related to `company_id.currency_id`as well,
and they were being recomputed due to the above re-write.

Meaning, when you had a bunch of journal items, applying the
accounting configuration wizard could have take a while.

opw-672400
2016-03-18 16:42:36 +01:00
qdp-odoo 4665216331 [FIX] account: when creating an invoice's journal entry, set the invoice_id on tax lines too. That isn't a big deal though, but for the data coherence and to define reports on invoices it'd be easier with that field. 2016-03-18 15:26:00 +01:00
Denis Ledoux f5c5223a10 [MERGE] forward port of branch 9.0 up to 9a2e3c2 2016-03-17 14:02:20 +01:00
Nicolas Martinelli 5c81327a5e [FIX] account: reset date
An issue occurs in the following use case:
- Create an invoice, validate.
- Cancel it, reset to draft.
- Change the invoice date
- Validate the invoice

The date of the account move is still the first date entered. This is
because the accounting date has not been reset on the invoice, and
therefore it is not updated.

opw-671672
2016-03-17 08:52:08 +01:00
qdp-odoo 7a3d63b377 [MERGE] forward port of branch saas-7 up to revision 71d16a369e 2016-03-16 10:27:19 +01:00
qdp-odoo 71d16a369e [MERGE] forward port of branch 9.0 up to revision 083e172dd9 2016-03-16 10:08:49 +01:00
qdp-odoo 0ccb98ca2a [FIX] account: refunds are valid outstanding debits/credits that we can add on bills/invoices. 2016-03-15 14:35:10 +01:00
qdp-odoo 003f2ee9bc [FIX] [tldr] account: multi-currencies fixes.
[FIX] account: fixed behavior in order to create the exchange rate difference entry at the full reconciliation only.

 This is needed in order to support the use case where an invoice in foreign currency is paid on a bank account in company currency,
 with the user encoding manually the difference due to the currency fluctuation (writeoff in the bank statement reconciliation interface): before
 this patch, Odoo was doing automatically the same, what results in a duplicated currency difference booking). ticket ID: 670876.
 A test has also been added in account/tests/test_reconcilication.py (test_statement_euro_invoice_usd_transaction_euro_full) to ensure that use case
 is now fixed.

[FIX] account_full_reconcile: a reconciliation is full as soon as either total_debit = total_credit OR if total_amount_currency is 0
[FIX] account: when registering a payment with a writeoff, always create the writeoff line exactly as entered by the user. Before, it was modified
 by the exchange rate entry, for some reason...
[FIX] account: on invoices, show the payment widget and outstanding payments in the invoice's currency always
[FIX] account: when assigning a payment in company currency on an invoice in foreign currency, save the amount_currency in order to create the correct
 exchange rate.
[FIX] account: show the currency difference entry on the invoice payments widget
[FIX] account: fixed the reconciliation methods in order to work with exchange rate entries that have debit = credit = 0
[FIX] account: fixed reconciled field computation. A line is reconciled only if its amount_residual AND amount_residual_currency are 0
[IMP] display the move name of payments on the invoice payments widget
2016-03-15 11:54:47 +01:00
Denis Ledoux 6e09293b7d [MERGE] forward port of branch 9.0 up to 8e69043 2016-03-11 11:42:43 +01:00
Yannick Tivisse b1b8d0b353 [FIX] account: buggy typo in unused line
it was a tracback prone res
2016-03-09 14:09:37 +01:00