Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1938 Lượt xem

Hello all, 

Customer phone number not showig in sales order form... In sales order from customer model  Name, Addess and email is showing but no phone number...

Here is the Customer field code in Sales Order  



In Sales order  Customer field showing  Name, Address and Email...

Need to show Customer phone Number in Sales Order

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi Ahmar,

You can use related fields for this.

define new field in sale order form as below: 

class SaleOrder(models.Model):
_inherit = 'sale.order'
 
customer_phone = fields.Char(related='partner_id.phone', string="Phone")


And in your xml, inherit the sale order model and add the new field

if you want to display the customer_phone field under customer try this:


Thank you

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 4 25
1427
1
thg 3 25
1627
1
thg 3 25
162
1
thg 12 24
1394
0
thg 8 23
1370