openerp

Odoo Missing Error while running a cron job for sending scheduled mail

China☆狼群 提交于 2019-12-12 03:45:14
问题 I have the following code. When the scheduler runs I am getting the error message. Some one help me to resolve the error in the code MissingError One of the documents you are trying to access has been deleted, please try again after refreshing. def send_followup_mail(self, cr, uid, context=None): quot_ids=self.search(cr, uid, [('state','=','amend_quote')]) for quot_id in quot_ids: if quot_id: quot_obj=self.browse(cr, uid, quot_id ,context=context) quotation_since=quot_obj.quotation_since for

How to change the title in Odoo 10?

拜拜、爱过 提交于 2019-12-12 03:44:16
问题 I have changed the Odoo 10 login page title by using website builder app but it does not work on the other pages after login. After login when I access different installed apps then the page title shows Odoo with apps name like "Products - Odoo" or "Customers - Odoo". 回答1: In Odoo 10 , we need to edit below JS file addons/web/static/src/js/abstract_web_client.js Change this code: this.set('title_part', {"zopenerp": "Odoo"}); With this one: this.set('title_part', {"zopenerp": "YourPageTitle"})

TypeError: object of type 'bool' has no len() - Odoo v9

寵の児 提交于 2019-12-12 03:38:47
问题 I'm trying to connect to a webservice through an Odoov9 module. This is my class: class invoice(models.Model): _inherit = "account.invoice" @api.multi def send_xml_file(self): # haciendolo para efacturadelsur solamente por ahora host = 'https://www.efacturadelsur.cl' post = '/ws/DTE.asmx' # HTTP/1.1 url = host + post _logger.info('URL to be used %s' % url) # client = Client(url) # _logger.info(client) _logger.info('len (como viene): %s' % len(self.sii_xml_request)) response = pool.urlopen(

widget=“selection” with domain fields issue

主宰稳场 提交于 2019-12-12 03:29:31
问题 here is my view xml part <field name="bpl_estate_id" placeholder="Estate" widget="selection" /> here is my model python part 'bpl_company_id':fields.many2one('res.company', 'Company', help='Company'), 'bpl_estate_id':fields.many2one('bpl.estate.n.registration', 'Estate', domain="[('company_id','=',bpl_company_id)]"), my issue is when i used estate field,with widget option, then no domain filtered ? (show all records) please advice me to implement this 回答1: Dynamic domains are not supported on

How to increment or decrement a recordset? odoo9

眉间皱痕 提交于 2019-12-12 03:18:57
问题 My record set is items = product.pricelist.item(4,3,2) qty_in_product_uom is passed by the user( 4= min_quantity 500, 3= 250, 2= 100 ) for rule in items: if rule.min_quantity and qty_in_product_uom < rule.min_quantity: print inside rule.id now i want such a function that selects the next id if the condition is true eg. if user passes qty_in_product_uom say 110 then my above if condition will give id=2 in this case i want id=3 if id=3 then answer will be id=4 and if id=4 select id=4 As

Odoo 8 override _amount_line

给你一囗甜甜゛ 提交于 2019-12-12 02:46:36
问题 I'm trying to override the _amount_line function in sale.order.line model in order to add custum logic. Here is my code: class SaleOrderLine(models.Model): _inherit = 'sale.order.line' def _amount_line(self): tax_obj = self.env['account.tax'] cur_obj = self.env['res.currency'] res = {} for line in self: print line.tax_id price = self._calc_line_base_price(line) qty = self._calc_line_quantity(line) print" price:{} & quantity: {}".format(price,qty) taxes = tax_obj.compute_all(line.tax_id, price

TypeError(repr(o) + “ is not JSON serializable”) - Odoo v8

故事扮演 提交于 2019-12-12 02:46:13
问题 I have this method, which calls for a document associated with an invoice on Odoo v8. @api.multi def button_generate_wh_doc(self): context = self._context partner = self.env['res.partner'] res = {} for inv in self: view_id = self.env['ir.ui.view'].search([ ('name', '=', 'account.invoice.wh.iva.customer')]) context = self.env.context.copy() context.update({'domain':[( ('invoice_id','=',inv.id), ('type','=',inv.type), ('default_partner_id','=', partner._find_accounting_partner( inv.partner_id)

Android OpenErp Search Request XMLRPC

时光总嘲笑我的痴心妄想 提交于 2019-12-12 02:03:57
问题 I am working on an android application which is able to connect with an openerp server and retrive the userid and also the individual fields of the different contacts of that user. below is the code on the things i have done so far public int Search() { searchClient = new XMLRPCClient("http://"+lp.HOST+":"+lp.IN_PORT+lp.URL_XML+lp.URL_OBJECT); try { record = (Array[]) searchClient.call("search",lp.DB_NAME, lp.uid1, lp.PASSWORD, "res.partnet.contact","execute", arguments); } catch(Exception e)

timezone incorrect in odoo log file

那年仲夏 提交于 2019-12-12 01:58:53
问题 In my country timezone is GMT+5.30,so I changed the timezone accordingly in preferences menu but in odoo log file the timezone is still GMT.How to change this? Config file, [options] ; This is the password that allows database operations: ; admin_passwd = admin db_host = localhost db_port = 5432 db_maxconn = 64 db_name = False db_user = openpg db_password = openpgpwd addons_path = C:\Users\odooGit\addons pg_path = C:\Program Files (x86)\OpenERP 7.0-20150922\PostgreSQL\bin xmlrpc = True xmlrpc

how to pass many2one object in xmlrpc for openerp

隐身守侯 提交于 2019-12-11 22:30:21
问题 I have django as front-end app, where I am saving "res.partner" id relating to django user. Based on that id I am fetching "res.partner" object from openerp. Now I want pass that "res.partner" object to openerp field having many2one relation, using xmlrpc. All other fields along with this object is being saved but not this object. Can you please guide me how to pass object in xmlrpc for openerp 回答1: You need to pass id value (db id field) to the field(many2one). Please check documentation