Error in account_anglo_saxon when using foreign currency

Bug #438717 reported by Grzegorz Grzelak (OpenGLOBE.pl)
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

Sorry I have to remind the Bug #388145

In new module account_anglo_saxon you will be surprised with wrong account move to cost of sale account.
It is when you sale in currency other than home one. Let say own currency is EUR. And you created invoice in USD.
I marked it with asterisks.

Product purchase = 10 EUR, Tax = 22% =2.20 EUR
Product sale = 26 USD, tax = 22% = 5,72 USD
Stock location configured with account 3000

Purchase a product
In the general ledger nothing is booked, there is packing line generated in Stock management to receive the goods

Receive the products
account 3000 = D 10 ← Type balance – Stock account, defined in location
account 2800 = C 10 ← Type balance – Interim account, Goods received, awaiting invoice

Receive the purchase invoice
account 2800 = D 10
account 1612 = D 2,20 ← Type balance – Vat account to receive
account 1500 = C 12,20 ← Type balance – Creditor account

Sell product
In the general ledger nothing is booked, there is packing line generated in Stock management to send the goods

Deliver product
account 3000 = C 10 Stock account
account 2801 = D 10 Type balance – Interim account, Goods send, to invoice - account defined in "Stock Output Account" in product category

Invoice customer
****account 2801 = C 7,69 **** should be 10,00 account defined in "Stock Output Account" in product category
****account 7000 = D 7,69 **** should be 10,00 Type P/L – Cost of sales - I still don't know where this account should be set.

account 8000 = C 20,00 (converted from USD) Type P/L Sales account
account 1602 = C 4,40 (converted from USD) Type balance – Vat account to pay
account 1300 = D 24,40 (converted from USD) Type balance Debtor account

Move to cost of sales is converted like USD to EUR but it shouldn't be because Cost prise is already in EUR.
By the way can someone tell me where the account 7000 in above case should be defined. Because in my configuration this amount gets back to 3000.

Related branches

Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

Regarding the 7000 account, you can specify at product category or product in the expense account field. And your 3000 account should be specified in your location in the location account field.

Revision history for this message
Grzegorz Grzelak (OpenGLOBE.pl) (grzegorz-og.pl) wrote :

Thank you Jan, Now it is clear.

So I suggest to change small helps for field labels in Product Category and in Product:

Expense Account:
This account will be used to value outgoing stock for the current product category using cost price.

Income Account: --which currently wrong!!! it is incoming stock instead of outgoing stock
This account will be used to value outgoing stock for the current product category using sale price.

Changed in openobject-addons:
status: New → Triaged
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

We Let the addons3 team decide.

Thanks.

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
Revision history for this message
Mark Tarpy (mark-acton) wrote :
Download full text (3.7 KiB)

I posted this comment as a question under "Answers" on Dec 18th, however as by problem seems related to this bug I'll post it here as well.

The essence of the problem seems to be that the "cost" used for calculating the cost of sales on a sale made in a currency other then the default company currency is treated as if it were a value in the secondary currency when in fact it is a value in the default company currency.

The details as it related to my situation as below, as posted originally in my questions are as follows:

My default company currency is set to TWD (Taiwan Dollars) and I have the Anglo-Saxon accounting method installed.

My default sale price list in is TWD and I have a second price list in USD.

When I make a sale using the USD price list:

-The "Account Receivable" account shows the USD value the same as entered on the invoice under "amount currency" and the the "debit" amount in is TWD at the correct amount according to the exchange rate. (This seem to be correct).

-The entries to the "Income Account" account likewise seem correct. The USD value from the invoice shows under the "amount currency" and the "credit" is the correct amount of TWD according to the exchange rate.

-The "Expense Account" (cost of sales) however lists the "cost price" (from the product page (note I'm using "Average Price" for "Costing Method")) as the USD value (the cost price is in TWD as that's the company default) and the "debit" is the cost price (as if it was in USD) exchanged at the exchange rate.

-The "Output Stock" account is likewise affected. The "credit" is the cost price (as if it was in USD) exchanged to TWD at the exchange rate value.

The second 2 entries are not working correctly, however I'm unsure if this is because of the my set up or due to an actual fault. I'll list the translations again below in more detail using actual figures:

Premiss:

Default Currency = TWD

TWD to USD exchange rate = 0.033270

Products "cost price" = 56 TWD (using "Average Price" as the "Costing Method")

Products sale price in USD is $ 2.40

Customer is set to use a pricelist in USD (other then the currency there is no difference between the TWD & USD pricelists)

Sale is for 1 product

Entries:

On Invoicing:

-"Accounts Receivable" account is debited 72.137 ("amount currency" is 2.40 and "currency" is USD) (2.40 / 0.033270 = 72.137) This seems correct to me.

-"Income Account" account is credited 72.137 ("amount currency" is 2.40 and "currency" is USD) (2.40 / 0.033270 = 72.137) This also seems correct to me.

-"Expense Account" account is debited 1683.198 ("amount currency" is 56 and "currency" is USD) (56 / 0.033270 = 1683.198) This isn't correct, it seems like the cost price should not be converted to USD but listed in TWD which is the price cost price and the value of stock is being calculated in.

-"Output Stock" account is credited 1683.198, this seems to be the same problem entry 3.

It seems to me that if the cost of sales and stock value entries need to be calculated in the invoice currency then the cost price first needs to be converted into the secondary currency, for example: (56 (cost price in TWD) * 0.033270 (TWD to USD exchange ra...

Read more...

Revision history for this message
Mark Tarpy (mark-acton) wrote :

I would change the importance level of this bug to "Critical" it's holding up our entire implementation of OpenERP. I don't think anyone will be able to use the Anglo Saxon module in a multi currency environment until this bug is fixed.

Revision history for this message
Priyesh (OpenERP) (pso-openerp) wrote :

Hello,

Its fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/pso-dev-addons3.
Rev-id: <email address hidden>
Rev-no: 4622

It will be merged soon with Addons3 branch.

Thanks for reporting.

Changed in openobject-addons:
status: Triaged → In Progress
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
Mark Tarpy (mark-acton) wrote :

Many thanks for the quick repair. It's working correctly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.