◄ ► | Edit | Home | Admin | en de fr et | Sign in

#5602 (multiple ledgers (the-ledgers-plugin::create))

by Sharif Mehedi · in Developers · assigned to Sharif Mehedi

Summary

Children

Comments

  • 1 year, 6 months ago by Luc Saffre about #5602 (multiple ledgers (the-ledgers-plugin::create)) : Continued in #5904 (Lino sites with multiple "spaces" (or ledgers or systems or communities)) .
  • 2 years, 4 months ago by Sharif Mehedi about #5602 (multiple ledgers (the-ledgers-plugin::create)) : I am thinking about throwing away the field User.current_company. For, the feature, "multi ledger" has the same philosophy encapsulating it. But I get confused about "What happens when the ledgers plugin is NOT installed?". NOT yet sure, what to do.
  • 2 years, 5 months ago by Sharif Mehedi about #5602 (multiple ledgers (the-ledgers-plugin::create)) (1 reply) : For CommonAccount get_object and set_object, we should probably give them another argument, a constacts.Partner instance.
  • 2 years, 5 months ago by Luc Saffre about #5602 (multiple ledgers (the-ledgers-plugin::create)) : Just another idea after reading a comment: instead of having multiple user accounts, we would have just the field ledger (or current_ledger) and a quick link where the user can select another ledger. In that case we still need some way to tell Lino which ledgers a given user is allowed to see (proba...
  • 2 years, 5 months ago by Luc Saffre about #5602 (multiple ledgers (the-ledgers-plugin::create)) : Right now I also prefer a setting of the accounting plugin. The contacts plugin doesn't even need to "consciously" test for it because it will simply make contacts.Partner inherit from accounting.LedgerSpecific. And LedgerSpecific will define the get_request_queryset() and on_create() of my previous...
  • 2 years, 5 months ago by Luc Saffre about #5602 (multiple ledgers (the-ledgers-plugin::create)) : The accounts.Account and accounts.Journal models will say something like this:
    def get_request_queryset(self, ar): ... if dd.is_installed('ledgers'): qs = qs.filter( ledger_id=ar.get_user().ledger_id)
    def on_create(self, ar): self.ledger = ar.get_user().ledger
  • 2 years, 5 months ago by Sharif Mehedi about #5602 (multiple ledgers (the-ledgers-plugin::create)) (2 replies) : So, we decide on having a separate ledgers plugin?
  • 2 years, 5 months ago by Luc Saffre about #5602 (multiple ledgers (the-ledgers-plugin::create)) : There is at least one reason for making it an independent plugin: it will also influence the contacts plugin. Having multiple ledgers is not only a question of accounting.
  • 2 years, 5 months ago by Sharif Mehedi about #5602 (multiple ledgers (the-ledgers-plugin::create)) : I will try the multiple ledgers in pronto, by just having a plugin attribute accounting.multiple_ledgers set to True, and see how far I can get.
  • 2 years, 5 months ago by Sharif Mehedi about #5602 (multiple ledgers (the-ledgers-plugin::create)) : If we stick to using users.Authority for separation of concern, we can probably get rid of the users.User.current_company (which we have in pronto), instead of current company, users can simply switch between Authorities.
  • 2 years, 5 months ago by Luc Saffre about #5602 (multiple ledgers (the-ledgers-plugin::create)) : I started to think that the multi-ledgers feature is maybe rather an attribute of accounting plugin. In that case the rename wasn't necessary. Though i like the rename even then.
  • 2 years, 5 months ago by Luc Saffre about #5602 (multiple ledgers (the-ledgers-plugin::create)) (2 replies) : I imagine that theplugin will have only one model, Ledger, with only one field, name. The other plugins (accounting and users, afaics) will become aware of the leger plugin (they do if is_installed('ledger') in certain places. In uses.User you add a field ledger = dd.ForeignKey('ledgers.Ledger'). If...
  • 2 years, 5 months ago by Sharif Mehedi about #5602 (multiple ledgers (the-ledgers-plugin::create)) (1 reply) : I start to read some, lino documentation before really starting on it.
  • 2 years, 5 months ago by Sharif Mehedi about #5602 (multiple ledgers (the-ledgers-plugin::create)) : Created new Ticket #5602 (multiple ledgers (the-ledgers-plugin::create)).