Skip to Content
Menu
This question has been flagged
2 Replies
1598 Views

Hello, 

I have a custom field (x_epoch) in crm model and sale order model. How can i passing the value from the first form to second?. Oportunitie (x_epoch) -> Sales Order (x_epoch) and save the last in sales order.

Thanks in advance!

Mauricio

 

Avatar
Discard
Best Answer

Hi,

You can use related field to store value from crm model to sale order model

name = fields.Char(related='related_field.name', string='Name', store=True)
related_field = fields.Many2one('crm.lead', 'CRM', required=True)
Avatar
Discard
Author Best Answer

Thanks! I am new in odoo programming.

I try to update in the sale.order model code but the server before restart do not responding ... 

related_field = fields.Many2one('crm.lead', 'CRM', required=True)

sale_x_epoch = fields.Char(related='related_field.x_epoch', string='Epoch Data', store=True)

I think I'm doing it wrong ... :(

Thanks in advance,

Mauricio


Avatar
Discard