openerp-8

Odoo throws a MissingError On treeview Second line record

醉酒当歌 提交于 2019-12-20 05:15:52
问题 How can i solve this error Odoo throws a MissingError on TreeView Second line button when clicked . The first Record line works but i need such that for each record on the tree the code below will be able to pass the contexts and open the appropriate view . Kindly assist Here is the code called on the button @api.multi def action_four_weeks_schedule_form(self): self.ensure_one() res = {} ids = self._ids cr = self._cr uid = self._uid context = self._context.copy() for id in self.browse(self

odoo - get value from many2one field

老子叫甜甜 提交于 2019-12-13 12:29:36
问题 My code: class SaleOrder(osv.Model): _inherit = 'sale.order' _columns = { 'xx_delivery_date': fields.date(string='Delivery date'), 'xx_payment_method': fields.many2one('xx.payment.method', string='Payment method'), 'xx_insurance_type': fields.many2one('xx.insurance.type', string='Insurance') } def _amount_insurance(self, cr, uid, val1, context=None): val = 0.0 insurance_chosen = self.pool.get('xx.insurance.type').browse(cr, uid, insurance_percentage.id,context=context) val = val1*insurance

How to achieve “Send by email” functionality in “Quotations” and “Sales Order” module in ODOO?

蹲街弑〆低调 提交于 2019-12-12 16:26:59
问题 I am developing ODOO application in iOS. I want to achieve "Send by email" functionality in "Quotations" and "Sales Order" module in ODOO. So is there any API available to achieve this functionality ? Or shall i generate PDF programmatically in iOS and send this by using MFMailComposeViewController class ? Thanks 回答1: It is best to reuse the Odoo feature. The button calls a method of the Sale Order model. You can identify the method's name if you activate the Developer Mode: The method is

How to update field dynamicaly in a many2many relation field and within tree view update field on change of above field

…衆ロ難τιáo~ 提交于 2019-12-12 04:09:37
问题 class ratecard_multiple(models.Model): # pudb.set_trace() _name = 'ratecard.multiple' _rec_name = 'display_name' name = fields.Char(string='Multiple RateCard Product Name ', required=True) code = fields.Char(string='Multiple RateCard Code ', readonly=True) scheduled_for = fields.Integer(string='SCHEDULED FOR', default=1, track_visibility='always', store=True) # scheduled_for = fields.Integer(string='SCHEDULED FOR', compute='_compute_scheduled_for',default=1 ,track_visibility='always',store

OpenERP 7 - Create auto log message in “Log a Note” field as history log record

半腔热情 提交于 2019-12-11 13:45:47
问题 I am now creating a customize module for a lab test purpose in OpenERP 7. The users will require to enter their lab test components and result here. Now i having a field which called "Reason For Changes". I would like to know the method how i can log the input of this content as a "log a note" message to display at the bottom through mail.thread? The step would be: Reason For Changes (ROC) as a required field Any changes in my others fields will calling my onchange method to clearing the

Impossible to synch odoo with google calendar

拈花ヽ惹草 提交于 2019-12-11 12:42:08
问题 I've configured my odoo to sync calendar with google calendar with my api client ID and secret. The point is, when I click on the synch button, I've this traceback Does anyone has had this problem ? It's not a duplicate of the another question. The old one is fixed, it's related to a missing mail template, here, the problem seems to be linked to JSON but I don't know why. Thanks a lot 来源: https://stackoverflow.com/questions/33822237/impossible-to-synch-odoo-with-google-calendar

How to fetch Calendar (calendar.event) meetings for particular date in ODOO?

送分小仙女□ 提交于 2019-12-11 12:26:12
问题 Does anybody know how to fetch Calendar (calendar.event) meetings/events for particular date OR "from date to date" in ODOO ? Till yet i have read meetings using meeting Ids as follow: ( Sample DB Name, 1, Password, calendar.event, read, ( 125 ) ) In above input parameter 125 is my meeting Id. So i get records of that particular meeting id. But now i want the meetings record based on dates. So how can i achieve this ? What will be the inputs for this ? 回答1: You are accessing the Odoo External

How to write “write” function without effecting inherited class in Odoo 8?

a 夏天 提交于 2019-12-11 07:29:21
问题 The situation is as follows: This is my .py file class mom_meeting(osv.osv): _name = "mom.meeting" _rec_name = 'meet_ref' _inherit = ['mail.thread'] and I had added the mail followers or openchatter in my custom module, now when I tried writing a "write" function as follows: def write(self, cr, uid, ids, vals, context=None): user_ids = [] sobj = self.pool.get('mom.meeting').browse(cr, uid, ids, context=None) if rec.ch_prsn.user_id.id == uid or rec.min_prp.id == uid: return super(mom_meeting,

How to hide or disable “Edit” button in Odoo 9

試著忘記壹切 提交于 2019-12-11 06:24:53
问题 Can anyone help me how to hide or disable Edit and/or Create button when my workflow status value is "Done" I have workflow status "Draft > Approval > Confirmed > Done" so when status is Done i want 'Edit' to be hidden or disabled. Please help. thanks in advance. 回答1: You should be able to create a security rule which restricts write access when the status is done. Something like this. If you have a group you wish to specify then select it. If you have no group I am not sure however you may

OpenERP @http.route('demo_json', type=“json”) URL not displaying JSON Data

时间秒杀一切 提交于 2019-12-11 02:48:18
问题 I am create controller in OpenERP Framework. Following is my code and i set http.route type="http" , import openerp.http as http from openerp.http import request class MyController(http.Controller): @http.route('demo_html', type="http") def some_html(self): return "<h1>This is a test</h1>" Above code work perfect once i login into openerp after i modify URL http://localhost:8069/demo_html show me return result This is a test in h1 heading tag. But same way i try to type="json" and add