Hi Max,

On Sun, Sep 21, 2014 at 5:17 PM, Max van Biezen <mvanb...@gmail.com> wrote:

> Hi,
>
> I am trying to figure out the the latex differences between the
> templates I used in 1.3 and now fail in 1.4.
>
> In order to do some trial&error debugging I want to edit the
> system/Latex templates/invoice, however when I want to save then it is
> denied. I have set the option "edit template" for the user, though
> that made no difference.
>
> What sql statement do I need to make to manually set the permission so
> I can edit and save the latex templates in the GUI?





>
> question on the side: how relate an invoice.tex file to a language? It
> is not a problem but LSMB complains it is not set to a language and I
> wonder how I could correct that.
>

Invoices are related to languages because you can have separate invoices
per language. I think you just found an omission: there's no way to select
an invoice for a specific language. In my own 1.4 install, LedgerSMB
says "invoice.tex(No
language)" so, I guess that's the same. There's a big difference, because I
*can* save the invoice.


>
> from error.log:
> 2014/09/21 17:07:58 - DEBUG - LedgerSMB::new LedgerSMB.pm (199) --
> Begin called from $filename=lsmb-request.pl $line=51 $type=LedgerSMB
> $argstr= ref argstr=
> 2014/09/21 17:07:58 - DEBUG - LedgerSMB::new LedgerSMB.pm (227) --
> params=$VAR1 = {
>           'template_name' => 'invoice',
>           'template' => '<?lsmb FILTER latex -?>
> .
> .
> .
> \\end{document}
> <?lsmb END ?>
> '
>                }, 'LedgerSMB::DBObject' );
> DBD::Pg::st execute failed: ERROR:  permission denied for relation template
> CONTEXT:  SQL statement "UPDATE template SET template = in_template
>     WHERE template_name = in_template_name AND format = in_format AND
>           language_code IS NOT DISTINCT FROM in_language_code"
> PL/pgSQL function "template__save" line 4 at SQL statement at
> LedgerSMB.pm line 583.
> 2014/09/21 17:07:58 - ERROR - LedgerSMB::dberror LedgerSMB.pm (770) --
> Logging SQL State 42501, error 7, string ERROR:  permission denied for
> relation template
> CONTEXT:  SQL statement "UPDATE template SET template = in_template
>     WHERE template_name = in_template_name AND format = in_format AND
>           language_code IS NOT DISTINCT FROM in_language_code"
> PL/pgSQL function "template__save" line 4 at SQL statement
> 2014/09/21 17:07:58 - ERROR - LedgerSMB::_error LedgerSMB.pm (647) --
> Access Denied
> More information has been reported in the error logs at LedgerSMB.pm line
> 773.
> 2014/09/21 17:07:58 - ERROR - LedgerSMB::_error LedgerSMB.pm (648) --
> dbversion: 1.4.0, company: company_name
> Died at LedgerSMB.pm line 661.
> Compilation failed in require at /usr/local/lsmb14/template.pl line 8.
>
>
You didn't say so, but is this 1.4.0, the released version?

What you could do is execute the following SQL statement:

GRANT UPDATE ON public.template TO lsmb_<company_name>__template_edit;

or, if that doesn't work:

GRANT UPDATE, INSERT, DELETE ON public.template TO
lsmb_<company_name>__template_edit;

or, if that doesn't work:

GRANT UPDATE, INSERT, DELETE ON public.template TO "<your_user>";

Hope that helps! Please let us know which of these works for you.



-- 
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-users mailing list
Ledger-smb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users

Reply via email to