将自定义字段值从机会传递到odoo 10中的报价 [英] Pass custom field values from oppertunity to quotation in odoo 10
本文介绍了将自定义字段值从机会传递到odoo 10中的报价的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在opportunity
中添加了一个自定义字段,在quotation
中添加了相同的字段,我想在opportunity
中的该自定义字段中添加值,并将该值传递给同一字段中的Quotation
.
I have added a custom field in opportunity
and same field in quotation
and I want to add value in that custom field in opportunity
and pass that values to Quotation
in same field.
推荐答案
感谢您,这也是我奋斗了几周的事情. 我的位于下面(要转移在"res.company"下设置的价值佣金以用于模型"sale.order" :(我不知道"company_it"是关系字段)
thank you it also the thing I have struggled for few weeks. Mine is below (to transfer a value commission set under "res.company" to be used in model "sale.order": ( I didn't known "company_it" is fields of relationship)
class YourCompany(models.Model):
_inherit = "res.company"
company_commission = fields.Float( default =15.00)
commission_ids = fields.One2many( 'sale.order', 'company_id',
string="Commission_ids")
class SaleOrder(models.Model):
_inherit = "sale.order"
company_id = fields.Many2one('res.company', string='company_id',
required=True)
company_commission =
fields.Float(related='company_id.company_commission',
string="Comm", store = True)
这篇关于将自定义字段值从机会传递到odoo 10中的报价的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文