Odoo MissingError One of the documents you are trying to access has been deleted, please try again after refreshing

雨燕双飞 提交于 2019-12-08 13:52:37

问题


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:

  1. Restart the server
  2. Update your module
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!