Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

MissingError

By
Erhuvwu Akpobaro
on 1/19/15, 4:57 PM 972 views

I am wondering if any one has across this error before :

MissingError

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

i have contract reports that i print out , however the main issues is when i print a contract from a certain company things go wrong .

and on the server log :

 

Traceback (most recent call last): File "/opt/odoo/odoo/openerp/http.py", line 518, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/odoo/openerp/http.py", line 539, in dispatch result = self._call_function(**self.params) File "/opt/odoo/odoo/openerp/http.py", line 295, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/odoo/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/odoo/openerp/http.py", line 292, in checked_call return self.endpoint(*a, **kw) File "/opt/odoo/odoo/openerp/http.py", line 755, in __call__ return self.method(*args, **kw) File "/opt/odoo/odoo/openerp/http.py", line 388, in response_wrap response = f(*args, **kw) File "/opt/odoo/odoo/addons/web/controllers/main.py", line 953, in call_button action = self._call_kw(model, method, args, {}) File "/opt/odoo/odoo/addons/web/controllers/main.py", line 941, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/opt/odoo/odoo/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/community/addons/camden-market/cm_rental_contracts/cm_account_analytic_account.py", line 59, in print_contract if(val.contract_category == "Food"): File "/opt/odoo/odoo/openerp/fields.py", line 780, in __get__ return record._cache[self] File "/opt/odoo/odoo/openerp/models.py", line 5834, in __getitem__ return value.get() if isinstance(value, SpecialValue) else value File "/opt/odoo/odoo/openerp/fields.py", line 53, in get raise self.exception MissingError: ('MissingError', u'One of the documents you are trying to access has been deleted, please try again after refreshing.')

 

ISSUES

  • I have a multi-company set up 
  • i created a new company hierachy and i cant print from the main company
  • i can print from other use accounts that are assigned to other companies

I dont belive my coding is wrong as i can print from other company, this the main part that allows the print :

 def print_contract(self, cr, uid, ids, context=None):
        """ 
        This function prints the Rental Contracts 
        """
        assert len(ids) == 1, 'This option should only be used for a single id at a time.'
        #self.sent = True
        #context = dict(context or {}, active_ids=ids)
        Printfood_obj = self.pool.get('cm.rental.contracts')
        val = Printfood_obj.browse(cr,uid,ids, context=context)
        if(val.contract_category == "Food"):
            return self.pool['report'].get_action(cr, uid, ids, 'cm_rental_contracts.report_foodcontracts', context=context)
        elif(val.contract_category == "Retail"):
            return self.pool['report'].get_action(cr, uid, ids, 'cm_rental_contracts.report_retailcontracts', context=context)
        elif(val.contract_category == "Storage"):
            return self.pool['report'].get_action(cr, uid, ids, 'cm_rental_contracts.report_storagecontracts', context=context)
        else:
             return self.pool['report'].get_action(cr, uid, ids, 'cm_rental_contracts.report_retailcontracts', context=context) 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/19/15, 4:57 PM
Seen: 972 times
Last updated: 7/6/15, 7:29 AM