Unable to update sequence prefix

46 views
Skip to first unread message

Khurram Shahzad

unread,
Apr 15, 2017, 7:48:13 AM4/15/17
to try...@googlegroups.com
Hi all,

I changed the prefix of a sequence in its xml file available in data directory. I updated the module but I am unable to get the changed prefix of the sequence. System is still using the old prefix on the sequence. Do I have to change some other file besides of the xml file containing the sequence?

--
 
Regards,
Khurram.

Cédric Krier

unread,
Apr 15, 2017, 5:00:11 PM4/15/17
to try...@googlegroups.com
Never ever change XML file.
If you need to customize a sequence created via XML, you can just edit
it from the client.

By the way, on the update of the module, trytond has probably warned you
that it could not update the sequence record.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Khurram Shahzad

unread,
Apr 16, 2017, 2:52:03 AM4/16/17
to try...@googlegroups.com
Dear Cedric,

Thanks a lot.

On Sun, Apr 16, 2017 at 1:59 AM, Cédric Krier <cedric...@b2ck.com> wrote:
On 2017-04-15 16:48, Khurram Shahzad wrote:
> Hi all,
>
> I changed the prefix of a sequence in its xml file available in data
> directory. I updated the module but I am unable to get the changed prefix
> of the sequence. System is still using the old prefix on the sequence. Do I
> have to change some other file besides of the xml file containing the
> sequence?

Never ever change XML file.
If you need to customize a sequence created via XML, you can just edit
it from the client.

When I try to update the sequence from the client, I get the following error:
'You are not authorized to modify this record. This record is the part of base configuration'.
Using client, I am trying to update from 'Administration -> Sequences -> Sequences'.

Should I set the 'noupdate' flag to '0' in the xml file where the sequence is defined?

By the way, on the update of the module, trytond has probably warned you
that it could not update the sequence record.


 
Regards,
Khurram.

Cédric Krier

unread,
Apr 16, 2017, 4:25:10 AM4/16/17
to try...@googlegroups.com
On 2017-04-16 11:52, Khurram Shahzad wrote:
> When I try to update the sequence from the client, I get the following
> error:
> 'You are not authorized to modify this record. This record is the part of
> base configuration'.
> Using client, I am trying to update from 'Administration -> Sequences ->
> Sequences'.
>
> Should I set the 'noupdate' flag to '0' in the xml file where the sequence
> is defined?

Which sequence is it?

Khurram Shahzad

unread,
Apr 16, 2017, 4:49:29 AM4/16/17
to try...@googlegroups.com

On Sun, Apr 16, 2017 at 1:20 PM, Cédric Krier <cedric...@b2ck.com> wrote:
On 2017-04-16 11:52, Khurram Shahzad wrote:
> When I try to update the sequence from the client, I get the following
> error:
> 'You are not authorized to modify this record. This record is the part of
> base configuration'.
> Using client, I am trying to update from 'Administration -> Sequences ->
> Sequences'.
>
> Should I set the 'noupdate' flag to '0' in the xml file where the sequence
> is defined?

Which sequence is it?
It is 'Inpatient Registration' sequence of the GNU Health. We want to change the prefix from 'INPAC' to 'IPD-'.

Cédric Krier

unread,
Apr 16, 2017, 5:50:06 AM4/16/17
to try...@googlegroups.com
This is a mistake in GNU Health.
https://hg.savannah.gnu.org/hgweb/health/file/8f854e27f596/tryton/health_inpatient/data/health_inpatient_sequence.xml#l12
If sequence are created via XML, it should never define any prefix or
suffix if you want to provide customization to the user.

You must fill an issue to GNU Health (if you can). Before I could have
fixed it but I have been banned from this project.

Khurram Shahzad

unread,
Apr 16, 2017, 6:41:53 AM4/16/17
to try...@googlegroups.com
Dear Cedric,
Thank you so much for your valuable time. What is the recommended way of defining sequences which can also be customized using client?

Regards,
Khurram.

Cédric Krier

unread,
Apr 16, 2017, 7:10:09 AM4/16/17
to try...@googlegroups.com
On 2017-04-16 15:41, Khurram Shahzad wrote:
> Thank you so much for your valuable time. What is the recommended way of
> defining sequences which can also be customized using client?

Like that: http://hg.tryton.org/modules/party/file/tip/party.xml#l103
It could also been put under date noupdate attribute if you want to
allow user to delete it.

Khurram Shahzad

unread,
Apr 16, 2017, 7:28:17 AM4/16/17
to try...@googlegroups.com


On Sun, Apr 16, 2017 at 4:05 PM, Cédric Krier <cedric...@b2ck.com> wrote:
On 2017-04-16 15:41, Khurram Shahzad wrote:
> Thank you so much for your valuable time. What is the recommended way of
> defining sequences which can also be customized using client?

Like that: http://hg.tryton.org/modules/party/file/tip/party.xml#l103
It could also been put under date noupdate attribute if you want to
allow user to delete it.

Thank you so much.

Khurram Shahzad

unread,
Apr 26, 2017, 1:45:28 AM4/26/17
to try...@googlegroups.com
I have worked out a solution to this problem: Delete the record in ir_property table corresponding to this sequence and then update the module. It will re-create the record in ir_property and the prefix/suffix updated value will be used.
Reply all
Reply to author
Forward
0 new messages