Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
8105 Zobrazení

 I Have a two custom module one of them inherit field in res.partner module I want to show that field value to my other custom module For example name field value want to show in my other custom module. 

Avatar
Zrušit
Nejlepší odpověď

Hi, 

In your new model you can add a many2one field to the res.partner model and achieve it. 

partner_id = fields.Many2one('res.partner', string="Customer")

Thanks

Avatar
Zrušit
Autor

class ResPartner(models.Model):

_name = "res.partner"

partner_id = fields.Many2one('res.partner', string="Customer")

Like that and .xml file code:

<field name="partner_id" /> is that correct.?

_name = "res.partner" , specify your model name here, instead of res.partner

Nejlepší odpověď

What should i do if i want to add the name and address field only?

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
bře 25
822
2
pro 22
5563
1
bře 15
4645
1
bře 15
6323
1
dub 25
2033