#6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method))
by Luc Saffre · in Developers · assigned to Luc Saffre
Résumé
Some users want to get their invoices as pdf files, others want them as png files.
Concepts sous-jacents
Commentaires
- 4 mois, 2 semaines ago by Luc Saffre about #6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method)) : I pushed my changes (in lino, xl, book and others).
- 4 mois, 2 semaines ago by Luc Saffre about #6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method)) : Some methods need to get the action request (ar) as a new first argument: before_build(), get_target_file(), get_target_url(), get_cache_mtime() ... I splitted get_target_file() into Printable.get_printable_target_file() and BuildMethod.get_build_target_file(), and only the former needs ar.
- 4 mois, 2 semaines ago by Luc Saffre about #6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method)) : Solution is to add a field User.build_method (default bm as a user preference) and to *not* specify a build method in the excerpt type.
- 4 mois, 2 semaines ago by Sharif Mehedi in reply to Luc Saffre about #6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method)) : in excerpts, build_site_cache has the argument "later" set to True, which does nothing and I guess we expect to manually run the pm buildcache and restart the server.
- 4 mois, 2 semaines ago by Sharif Mehedi in reply to Luc Saffre about #6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method)) : On the other hand if we do the thing that pre_analyze does at the runtime and build the site cache immediately, that will keep us from the need to restart the server instance.
- 4 mois, 2 semaines ago by Sharif Mehedi in reply to Luc Saffre about #6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method)) : From the looks of it, new ExcerptType requires a build of the site cache and also a server restart, this is not an optimal solution.
- 4 mois, 2 semaines ago by Luc Saffre about #6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method)) : I guess that you do not want ExcerptTypes to become multi-ledger (or DomainSpecific). You would rather have a field Journal.template, and also review the existing trade invoice template to support multi-tenancy. Right now it is using image files from the config directory, we should change that to us...
- 4 mois, 2 semaines ago by Luc Saffre about #6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method)) : Created new Ticket #6856 (Multi-tenant sites and the excerpts plugin).
- 4 mois, 2 semaines ago by Sharif Mehedi in reply to Luc Saffre about #6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method)) : I suppose in that case, the build_site_cache updates the lino_version.txt and the latest media/cache are available immediately at the server. but what if nginx caches the media/cache responses (it's probably a thing to be observed).
- 4 mois, 2 semaines ago by Luc Saffre in reply to Sharif Mehedi about #6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method)) (4 replies) : Because set_excerpts_actions() (a pre_analyse signal handler) defines actions on the models based on what excerpt types are configured. And these actions propagate to the actors and therefore need twe o rebuild the site cache.
- 4 mois, 2 semaines ago by Sharif Mehedi about #6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method)) (1 reply) : Why does update to an ExcerptType calls build_site_cache?
- 4 mois, 2 semaines ago by Sharif Mehedi about #6856 (Multi-tenant sites and the excerpts plugin (new field User.build_method)) : ExcerptTypes does NOT have a specifier for ledger/company. In multi ledger context if a company user changes the build_method, it will effect for all the other company as well, which we don't want.