[6.0] New company financial settings set not right journal sequence

Bug #831330 reported by Paulius Sladkevičius @ hbee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

When running "New company financial setting" wizard it creates purchase, sale journals for company, but adds not same companies journal sequence.

For example, I create sequences for new company, then I run this wizard. In the end I get new journals but with not correct companies sequences.

To fix this I think we must add to every search company_id filter. All sequences search starts - http://bazaar.launchpad.net/~openerp/openobject-addons/6.0/view/head:/account/account.py#L2837.

And it will be good if same wizard create sequences for every journal if they don't exist [wishlist].

Revision history for this message
Graeme Gellatly (gdgellatly) wrote : Re: [Bug 831330] [NEW] [6.0] New company financial settings set not right journal sequence

You could try accot account extension module which fixes this and other
multicompany financial setting issues

On 2011-08-23 3:10 AM, "Paulius Sladkevičius - inovera.lt" <email address hidden>
wrote:

Public bug reported:

When running "New company financial setting" wizard it creates purchase,
sale journals for company, but adds not same companies journal sequence.

For example, I create sequences for new company, then I run this wizard.
In the end I get new journals but with not correct companies sequences.

To fix this I think we must add to every search company_id filter. All
sequences search starts - http://bazaar.launchpad.net/~openerp
/openobject-addons/6.0/view/head:/account/account.py#L2837.

And it will be good if same wizard create sequences for every journal if
they don't exist [wishlist].

** Affects: openobject-addons
    Importance: Undecided
        Status: New

--
You received this bug notification because you are subscribed to OpenERP
Addons.
https://bugs.launchpad.net/bugs/831330

Title:
 [6.0] New company financial settings set not right journal sequence

Status in OpenERP Modules (addons):
 New

Bug description:
 When running "New company financial setting" wizard it creates
 purchase, sale journals for company, but adds not same companies
 journal sequence.

 For example, I create sequences for new company, then I run this
 wizard. In the end I get new journals but with not correct companies
 sequences.

 To fix this I think we must add to every search company_id filter. All
 sequences search starts - http://bazaar.launchpad.net/~openerp
 /openobject-addons/6.0/view/head:/account/account.py#L2837.

 And it will be good if same wizard create sequences for every journal
 if they don't exist [wishlist].

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/831330/+subscriptions

Revision history for this message
Paulius Sladkevičius @ hbee (komsas) wrote :

Hello Graeme,

sorry but can you write what is module name or give link to it, because I don't find anything related with "accot account extension".

Revision history for this message
Graeme Gellatly (gdgellatly) wrote : Re: [Bug 831330] Re: [6.0] New company financial settings set not right journal sequence

account_account_extension_o4sb it is at apps.openerp.com

2011/8/23 Paulius Sladkevičius - inovera.lt <email address hidden>

> Hello Graeme,
>
> sorry but can you write what is module name or give link to it, because
> I don't find anything related with "accot account extension".
>
> --
> You received this bug notification because you are subscribed to OpenERP
> Addons.
> https://bugs.launchpad.net/bugs/831330
>
> Title:
> [6.0] New company financial settings set not right journal sequence
>
> Status in OpenERP Modules (addons):
> New
>
> Bug description:
> When running "New company financial setting" wizard it creates
> purchase, sale journals for company, but adds not same companies
> journal sequence.
>
> For example, I create sequences for new company, then I run this
> wizard. In the end I get new journals but with not correct companies
> sequences.
>
> To fix this I think we must add to every search company_id filter. All
> sequences search starts - http://bazaar.launchpad.net/~openerp
> /openobject-addons/6.0/view/head:/account/account.py#L2837.
>
> And it will be good if same wizard create sequences for every journal
> if they don't exist [wishlist].
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-addons/+bug/831330/+subscriptions
>

Revision history for this message
Paulius Sladkevičius @ hbee (komsas) wrote :

Thanks Graeme,

but this module to much. I did with less code what I wanted, thanks anyway.

2011 m. rugpjūtis 23 d. 13:11, Graeme Gellatly <email address hidden>rašė:

> *** This bug is a duplicate of bug 823731 ***
> https://bugs.launchpad.net/bugs/823731
>
> account_account_extension_o4sb it is at apps.openerp.com
>
> 2011/8/23 Paulius Sladkevičius - inovera.lt <email address hidden>
>
> > Hello Graeme,
> >
> > sorry but can you write what is module name or give link to it, because
> > I don't find anything related with "accot account extension".
> >
> > --
> > You received this bug notification because you are subscribed to OpenERP
> > Addons.
> > https://bugs.launchpad.net/bugs/831330
> >
> > Title:
> > [6.0] New company financial settings set not right journal sequence
> >
> > Status in OpenERP Modules (addons):
> > New
> >
> > Bug description:
> > When running "New company financial setting" wizard it creates
> > purchase, sale journals for company, but adds not same companies
> > journal sequence.
> >
> > For example, I create sequences for new company, then I run this
> > wizard. In the end I get new journals but with not correct companies
> > sequences.
> >
> > To fix this I think we must add to every search company_id filter. All
> > sequences search starts - http://bazaar.launchpad.net/~openerp
> > /openobject-addons/6.0/view/head:/account/account.py#L2837.
> >
> > And it will be good if same wizard create sequences for every journal
> > if they don't exist [wishlist].
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/openobject-addons/+bug/831330/+subscriptions
> >
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/831330
>
> Title:
> [6.0] New company financial settings set not right journal sequence
>
> Status in OpenERP Modules (addons):
> New
>
> Bug description:
> When running "New company financial setting" wizard it creates
> purchase, sale journals for company, but adds not same companies
> journal sequence.
>
> For example, I create sequences for new company, then I run this
> wizard. In the end I get new journals but with not correct companies
> sequences.
>
> To fix this I think we must add to every search company_id filter. All
> sequences search starts - http://bazaar.launchpad.net/~openerp
> /openobject-addons/6.0/view/head:/account/account.py#L2837.
>
> And it will be good if same wizard create sequences for every journal
> if they don't exist [wishlist].
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-addons/+bug/831330/+subscriptions
>

Revision history for this message
xrg (xrg) wrote : Re: [Bug 831330] [NEW] [6.0] New company financial settings set not right journal sequence

On Monday 22 August 2011, you wrote:
> Public bug reported:
>
> When running "New company financial setting" wizard it creates purchase,
> sale journals for company, but adds not same companies journal sequence.
>
> For example, I create sequences for new company, then I run this wizard.
> In the end I get new journals but with not correct companies sequences.
>
> To fix this I think we must add to every search company_id filter. All
> sequences search starts - http://bazaar.launchpad.net/~openerp
> /openobject-addons/6.0/view/head:/account/account.py#L2837.
>

You might also want to see the refactored code in:
http://git.hellug.gr/?p=xrg/openobject-addons;a=commitdiff;h=1f081a1061f
(and all subsequent commits for account_greek_fiscal)

Although this is used in the Greek COA so far, the design is intended to cover
all countries. Accounts, Taxes, Journals, Sequences are now all configurable
through the templates. Also, as of commit 1c9ffcd25f3e269 , the wizard has an
"update" mode which can amend an existing COA with extra elements (in the case
where we want eg. to have extra Taxes, Journals for an existing company
setup).

--
Say NO to spam and viruses. Stop using Microsoft Windows!

Revision history for this message
Paulius Sladkevičius @ hbee (komsas) wrote :

Hey xrg,

great work, I think this must go to trunk, because sequences, currencies must be automatically created when setup new chart for company.

Revision history for this message
Paulius Sladkevičius @ hbee (komsas) wrote :

I have checked duplicate bug #823731 on more time and see that it is not related with this one.

In this wizard when journals are creating it gives journal sequence so create_sequence method from the account_journal is not used. So I'm back to solution to add to to search domain company_id and plus if there is no sequence create it for this company.

Revision history for this message
Dhruti Shastri(OpenERP) (dhs-openerp) wrote :

Hello,

I am agreed with the issue. It should also create the currency according to the new Company.

I m confirming this issue.

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Hello,

I have tested with latest trunk version. If i create chart of account for new company it create new entry sequence for respected company and also fill that sequence on journals (Sale, Purchase, cash....)

Can you please check again to your side with latest revision on trunk ?

Thanks,
Mustufa

Revision history for this message
Paulius Sladkevičius @ hbee (komsas) wrote :

Hello Mustufa,

I suppose you create chart of account for first company, it is mult-company issue. Please try to create second company and then run New company financial setting wizard. After it check second company journal sequences, you will find there first company sequences.

Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Hi Paulius,

No i have checked with multicompany environment only. Say with shop1 and shop2 companies and get respected seq. on journals.

Revision history for this message
Paulius Sladkevičius @ hbee (komsas) wrote :

Hi,

please check shop1 and shop2 journal sequences, which company owns these sequences. Or if you check from http://bazaar.launchpad.net/~openerp/openobject-addons/6.0/view/head:/account/account.py#L2836 line you will see that sequences are assigned not by company, it takes only first sequence.

Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Hello Paulisu,

We have already fixed the problem with revision ID : <email address hidden> in trunk.

Which solve your problem, when you install char of account for x company it will create journal with sequence by x company only. You can update your branch to get changes.

Thanks,
Mustufa

Changed in openobject-addons:
status: Confirmed → Fix Released
milestone: none → 6.1
Revision history for this message
Paulius Sladkevičius @ hbee (komsas) wrote :

Hello Mustufa,

you are right for trunk it applies, but for 6.0 no, because sequence for journal is assign before creating it. However for trunk it is okay.

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

Other bug subscribers

Remote bug watches

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