问题
Odoo Warning, MissingError One of the documents you are trying to access has been deleted, please try again after refreshing.
Am accessing this button action_four_weeks_schedule_form
which is shown below on .
<field name='multiple_ratecard_id' nolabel="1" options="{'reload_on_button': true}"> <!-- widget="many2many"-->
<tree string="ALLOCATE SPOTS" editable="bottom" >
<button name="action_four_weeks_schedule_form" type="object" string="CREATE RATECARD SCHEDULE" class="oe_highlight" />
The multiple_ratecard_id
is a many to many to a model called singular which has the function action_four_weeks_schedule_form
in it
This is the function
def action_four_weeks_schedule_form(self,cr,uid,ids,context):
for id in ids:
order_obj = self.pool.get('ratecard.multiple').browse(cr,uid,id)
my_id=int(order_obj.id)
scheduled_for= order_obj.scheduled_for
code= order_obj.code
return {
'name':_("Four Week Schedule to Process"),
'view_mode': 'form',
'view_id': False,
'view_type': 'form',
'res_model': 'four.weeks.schedule',
'context':{'default_scheduled_for':scheduled_for,'default_code':code},
'type': 'ir.actions.act_window',
'nodestroy': True,
'target': 'new',
'domain': '[]',
'flags': {'form': {'action_buttons': True}}
}
How can i solve this error and have the button pop out the view and not the Odoo Warning ?
回答1:
Try the following:
- Restart the server
- Update your module
- Refresh the page
回答2:
This error occurs when you try to access your module from another OS or Your module has access right issue, On Linux just give read and write access rights to "Others" for your module and restart the server.
来源:https://stackoverflow.com/questions/34156974/odoo-missingerror-one-of-the-documents-you-are-trying-to-access-has-been-deleted