thanks
Once I added *db.actions._enable_record_versioning*() [in addition to the
global auth.enable_record_versioning(db), ] this seemed to fix it.
On Tuesday, September 6, 2016 at 6:06:00 PM UTC+1, Anthony wrote:
> By default, record versioning creates a "current_record" reference field
> in the archive table to point to the original record (i.e., the current
> version of the record in the original table), but your table already has
> its own "current_record" boolean field (which prevents record versioning
> from being enabled for this table). To avoid the conflict, you can change
> the name used by record versioning:
>
> auth.enable_record_versioning(db, current_record='original_record')
>
> Or your can change the field name in your table.
>
> Anthony
>
> On Tuesday, September 6, 2016 at 10:43:17 AM UTC-4, maulynvia wrote:
>>
>> First of all, web2py rocks...I'm amazed how good it is :)
>>
>> Record versioning is one of the great features and is working perfectly
>> for me except for one table. Can anyone see what the problem might be?
>> Thanks in advance.
>> Here is the definition of the table in question:
>>
>> db.define_table('actions',
>>
>>
>> Field('priority',required=True,requires=IS_IN_SET(['10_Critical','20_High',
>> '30_Medium', '40_Low']), default='30_Medium'),
>> Field('stage', required=True ,
>> requires=IS_IN_SET(['10_Backlog','20_Waiting',
>> '30_Challenged','35_Progressing','70_Done','80_Closed']),
>> default='10_Backlog'),
>> Field('task', requires=IS_NOT_EMPTY() ),
>> Field('owned_by', db.auth_user, required=True ),
>> Field('other_contacts'),
>>
>> Field('category', requires=IS_IN_SET(['PrjExc','OppEff','SalCol',
>> 'DelAcc','HumCap','RevOpt','BusDev','LocStr']),
>> default='PrjExc'),
>> Field('notes','text'),
>> Field('unit', required=True, requires=IS_IN_SET(['ENERGY','ET','FA',
>> 'MM', 'OTHER']) , default='OTHER'),
>> Field('project', db.project, required=True, default='_unknown'),
>> Field('next_action'),
>> Field('target_date','date'),
>> Field('effort',
>> requires=IS_IN_SET(['5_vHi','4_Hi','3_Med','2_Lo','1_vLo']),
>> default='3_Med'),
>> Field('impact',
>> requires=IS_IN_SET(['9_vHi','7_Hi','5_Med','3_Lo','1_vLo']),
>> default='5_Med'),
>> Field('effort_value',writable=False, compute=calc.impact_value),
>> Field('tag'),
>> Field('ext_id'),
>> Field('current_record','boolean', required=True , default=True),
>> auth.signature,
>> format = '%(task)s[:40]',
>> plural="ACTIONS"
>> )
>> ...
>> auth.enable_record_versioning(db)
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.