تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4 الردود
6191 أدوات العرض

Hello ,

Anyone know how to select multiple customers for one product when we are creating sales order? I am working on the sale module, i want to know that how can i select multiple customers for one product when i create sales order .How can i do that?


thanks ,

Logicious.

الصورة الرمزية
إهمال

interesting requirement !

why you need to do that?

الكاتب

if product as one building(in that lots of flats), and that have many customers. I can manage all those customers in a single sales order. Do anybody have idea how to solve this?

أفضل إجابة

_inherit = 'sale.order'

_columns = { 

'partner_ids': fields.many2many('res.partner', 'one_product_many_customer_rel','order_ids', 'partner_id', 'Customers'),

in xml file :

<xpath expr="//field[@name='partner_id']" position="after">

<!-- <field name='category_ids'/>-->

<field name="partner_ids" widget="many2many_tags" placeholder="e.g. Part Time"/>

</xpath>


""if you want to replace the partner _id in sale _order you need to change lots of base module codes regarding to that, it is a simply form to create that, and if you want to perform the task like make sales order, you need to customize it your own, it all are related to partner_id, so you should make your own code to perform the actions whatever you need to be perform.Dnt try to make the chances in base module its will produce some error.


prasanth. 



الصورة الرمزية
إهمال
الكاتب

if there is any possibility , please inform me.

I thought of the Prasanth's solution, you have to try it, first define the new field in the sale_order class, and add it to the view_order_form view in the sale_view.xml file, upgrade the module and restart the server. You have to use inheritence, not adding directly to the standard modules

الكاتب

thank you Tarek, i will try.

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مايو 22
4320
2
يناير 16
4908
1
ديسمبر 24
2459
1
أبريل 25
2618
0
أكتوبر 22
2440