openerp-8

Passing Context In Odoo

我是研究僧i 提交于 2019-12-10 11:47:03
问题 How can i pass this scheduled_for in ratecard_multiple to scheduled in ratecard_sin_radio so that i can use it in the radio_sin_radio function action_four_weeks_schedule_form Here i have added all the code that am using 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 =

Compute method is called multiple times?

主宰稳场 提交于 2019-12-10 10:37:00
问题 I found out that this probably isn't concurrency problem as the method is recalled JUST WHEN I TRY TO UPDATE THE sync.test.subject.b 's separated_chars FIELD (at the end of the method). So I can't solve this with thread locking as the method actually waits for itself to be called again. I don't get it this is a totally bizarre behavior. I found a weird behavior while updating computed fields. In this case codes are better than words: Models: from openerp import models, fields, api, _ class

How to migrate an Openerp v7 database to Odoo v8?

我与影子孤独终老i 提交于 2019-12-10 09:46:01
问题 I have a dump file of database backup(openerp-7). Now I want to continue my work in Odoo, the database is in openerp-7 format so I am not able to restore it in Odoo. How to convert this database to Odoo version in order to start working on it? 回答1: You must do a data migration. That's not an easy task. You can use some of this migration tools: OpenUpgrade. Or you can use some ETL tool such as Odoo ETL If you only want migrate some table you can export it in a CSV file and import it in Odoo

Difference between _sql_constraints and _constraints on OpenERP/Odoo?

非 Y 不嫁゛ 提交于 2019-12-09 04:52:07
问题 I noticed there are 2 kinds of constraints on Odoo ERP. But I want to know what is the difference between _sql_constraints vs _constraints? _sql_constraints = { ('email_uniq', 'unique(email)', ' Please enter Unique Email id.') } _constraints=[ (_check_qty_and_unitprice, u'Qty must be more than 0',['product_qty', 'cost_unit']), ] 回答1: _sql_constraints means it will set constraint on postgresql database side. _sql_constraints = [ ('email_uniq', 'unique(email)', ' Please enter Unique Email id.')

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

Browse another model in openerp depending upon the active-ids

血红的双手。 提交于 2019-12-08 07:21:05
问题 I am creating "delivery slip" report, and I have to check the type of sale which is direct or in indirect, so order_type is in "sale.order" model, so I need to browse the order_type with the help of sale number from openerp.report import report_sxw class ps_report(report_sxw.rml_parse): name_type = '' name_type1 = '' v_name = '' v_model = '' v_year = '' picking = '' def __init__(self, cr, uid, name, context=None): super(ps_report, self).__init__(cr, uid, name, context=context) do_type = self

Changing the Filename of a Uploaded Binary File Field

妖精的绣舞 提交于 2019-12-07 07:16:24
问题 I'm using Odoo8 I have a question I used the fields.binary to upload a file/s in Odoo. But when I try to download it the filename of the uploaded file is the model name. Is it possible to change the filename of the file? And second the filters attribute in fields does not work. 回答1: My Solution to this matter/problem, create first a compute field and its function .py filename = fields.Char('file name', readonly = True,store = False,compute ='legacy_doc1_getFilename') @api.one def legacy_doc1

Powered by Odoo footer

北城以北 提交于 2019-12-06 08:30:01
问题 I need to change the "Powered" in "Powered by Odoo" footer to "Made", So the footer of my Odoo (Formerly OpenERP) Version 8.0-aab3d9f will be "Made by Odoo" any ideas?? 回答1: First go to your Odoo web module and open below file. addons => web => views => webclient_templates.xml Now find this tag <div class="oe_footer"> and edit it like <div class="oe_footer"> Made by <a href="http://www.openerp.com" target="_blank"><span>Odoo</span></a> </div> Save it and refresh your browser. Hope you get

Compute method is called multiple times?

僤鯓⒐⒋嵵緔 提交于 2019-12-06 03:52:17
I found out that this probably isn't concurrency problem as the method is recalled JUST WHEN I TRY TO UPDATE THE sync.test.subject.b 's separated_chars FIELD (at the end of the method). So I can't solve this with thread locking as the method actually waits for itself to be called again. I don't get it this is a totally bizarre behavior. I found a weird behavior while updating computed fields. In this case codes are better than words: Models: from openerp import models, fields, api, _ class sync_test_subject_a(models.Model): _name = "sync.test.subject.a" name = fields.Char('Name') sync_test

odoo - get value from many2one field

99封情书 提交于 2019-12-06 03:47:07
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_chosen/100 return val class InsuranceType(osv.Model): _name='xx.insurance.type' _columns = { 'name' :