Basically I have model A and B .
class A(ModelView):
datamodel = SQLAInterface(Tabel_A)
and
class B(ModelView):
datamodel = SQLAInterface(Table_B)
A has a action like :
@action("mularchive", "Archieve", "Archieve all Really?", "fa-rocket", single=False)
def mularchive(self, items):
self.update_redirect()
for item in items:
new_item = item.__class__()
new_item.name = item.name
B.add(new_item)
return redirect(self.get_redirect())
So I'm expect object b will save into table B. But this is not working and it complain about
AttributeError: 'Table A' object has no attribute 'method_permission_name'
please help, I'm new to flask appbuilder and python... not sure where I made mistake .