Odoo Help

8
4 Answers
7
Avatar

THOMAS GEORGE

--THOMAS GEORGE--

1014
| 5 4 7
southampton, United Kingdom
--THOMAS GEORGE--


THOMAS GEORGE
2/18/19, 4:33 AM

i got answer

class VendorValidate(models.Model):
    _inherit = 'purchase.order'
   
    @api.multi
    def _add_supplier_to_product(self) :
        vendor_list=[]
        for order in self:
            for line in order.order_line:
                if order.partner_id.id not in line.product_id.variant_seller_ids.mapped('name.id'):
                    vendor_list.append(line.product_id.name)       
            else:
                 if vendor_list:
                    raise UserError("raise error")   

0
Avatar

Navrang Oza

--Navrang Oza--
Navrang Oza
843
| 3 2 6
Gandhinagar, India
--Navrang Oza--

Having 13+ years of experience in Odoo, Magento, Wordpress, Android, PHP Expert.

Skype : acespritech

Email : info@acespritech.com

Navrang Oza
2/13/19, 1:20 AM

Hello,

Can you give me some details about your case ?

Are you talking about Enterprise or Community ?

----------

Thanks.

Acespritech Solutions Pvt Ltd.

Apps on Odoo Store  : https://www.odoo.com/apps/modules/browse?search=acespritech

Skype: acespritech

Website: http://www.acespritech.com

0
asamits765@gmail.com
2/13/19, 4:38 AM

You need to provide more details about the purchase order and vendor. Also, enterprise information needs to be listed.

0
Avatar

Pinakin Nayi (pna)

--Pinakin Nayi (pna)--
1679
| 2 2 5
Ahmedabad, India
--Pinakin Nayi (pna)--

He has good skills in problem identification and implementation of effective solutions. He is working in Odoo India.

Techno-Functional
Skype: pinakinerp

LinkedIn : https://www.linkedin.com/in/pinakin-nayi-2a33103a/

 

Pinakin Nayi (pna)
2/13/19, 6:03 AM

First why you want to verify , because here you are selecting vendor and you know from where you are going to purchase. 

While the vendor list in product detail is simply the pricelist. If you have valid pricelist from the same vendor then you get the prices. If not still you can update the prices on purchase order itself.

BTW your requirements you can easily get/guess by adding product and supplier, if vendor is one defined on product then you can get the prices. Now if you got 0 prices means either you haven't defined vendor on product details or not matched the conditions.

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now