This question has been flagged
2 Replies
2645 Views

How to add it in form?

Avatar
Discard
Can you kindly answer?

On Mon, Oct 13, 2014 at 3:40 PM, Anil Kesariya <a.kesariya.serpentcs@mail.odoo.com> wrote:

A new answer for How it's possible to use Customer's phone field(base-field) in SO form as well? has been posted. Click here to access the post.

--
Anil Kesariya
Sent by Odoo Inc. using Odoo about Forum Post How it's possible to use Customer's phone field(base-field) in SO form as well?

Hi Anil, 
Can you please advice me regarding this?

On Tue, Oct 14, 2014 at 5:15 PM, Parelli Artounian <phorse1@gmail.com> wrote:
Can you kindly answer?

On Mon, Oct 13, 2014 at 3:40 PM, Anil Kesariya <a.kesariya.serpentcs@mail.odoo.com> wrote:

A new answer for How it's possible to use Customer's phone field(base-field) in SO form as well? has been posted. Click here to access the post.

--
Anil Kesariya
Sent by Odoo Inc. using Odoo about Forum Post How it's possible to use Customer's phone field(base-field) in SO form as well?


Best Answer

Use related field...

already partner_id ('Customer') field exists in SO, so now establish a related for the same

Avatar
Discard
Author

Hi deep, i'm new in odoo. So kindly can you pls let me know how can i establish the related field ?! From ManageViews i tried to add that fileld, but it wasnt listed in there.

Best Answer

Add realted phone field on sale order model

    _inherit = 'sale order'

    _columns = {

        'partner_phone':fields.related('partner_id','phone', type="char", string="Phone", store=True)

    }

@Note: Store=True is optional.

Now add this field in xml view by using inerit specific sale order view.

Hope this will helps you.

Regards,

Anil

Avatar
Discard
Author

Thank you.

Author

But it doesnt work for me!