In purchase order, whenever i click, the dropdown shows list of vendors, including "My company" or my user which is in this case "Administrator".
Is there anyway to only show vendors, excluding my user and my company?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
In purchase order, whenever i click, the dropdown shows list of vendors, including "My company" or my user which is in this case "Administrator".
Is there anyway to only show vendors, excluding my user and my company?
Hello Ahmad,
I think the best way and easiest way to achieve what you want is to create a tickbox on the contact model using:
class odoo_help_5(models.Model):
_inherit = "res.partner"
ignore_purchase = fields.Boolean("Not a vendor")
Then add this to the contact form view, tick admin and my company and any others you don't want to be displayed in the vendor Many2one.
Then just change the domain by using this code to inherit the purchase order form view:
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="domain">['&', ("ignore_purchase", "=", False), '|', ('company_id', '=', False), ('company_id', '=', company_id)]</attribute>
</xpath>
You could change the domain to ("name", "!=", "Administrator") etc however I think avoiding hard coding contacts to the domain would be a better approach.
I hope this helps.
Thanks,
Thank so much, but, could you give detail guide for it ?
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
1
Agu 22
|
4139 | ||
importing Purchase Order shown as a RFQ
Diselesaikan
|
|
2
Mei 25
|
2131 | |
|
3
Des 24
|
6174 | ||
How do I replace the default Purchase Order number?
Diselesaikan
|
|
1
Jul 24
|
2990 | |
Purchase Product Description Incorrect
Diselesaikan
|
|
1
Jun 24
|
2086 |