models
class Lead(models.Model):
_inherit = 'crm.lead'
service_id = fields.Many2one('lmc.service', required=True, string="Service")
class SaleOrder(models.Model):
_inherit = "sale.order"
service_id = fields.Many2one('lmc.service', required=True, string="Service")
Notes
I want to pass service_id of lead to sale order when the New Quotation button(action) button is clicked.I worked in similar situation, but sometimes I pass values from one module to another using object button.please help me how it is possible through action button
Reference
This is the button in lead
<button string="New Quotation" name="%(sale_action_quotations_new)d" type="action" class="oe_highlight"
context="{'search_default_partner_id': partner_id,
'default_partner_id': partner_id,
'default_team_id': team_id}"/>
that id used in sale order and defined like this
<record id="sale_action_quotations_new" model="ir.actions.act_window">
<field name="name">Quotation</field>
<field name="res_model">sale.order</field>
<field name="view_mode">form,tree,graph</field>
<field name="domain">[('opportunity_id', '=', active_id)]</field>
<field name="context">{'search_default_opportunity_id': active_id, 'default_opportunity_id': active_id}</field>
</record>
How to pass values through this button.Thanks in advance