I want to create a many2many relationship with another model, but I can't figure out where the Vendor Bill records go.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hi Kito,
The vendor bills are stored on the model account.invoice. You can easily find out on which model records are by activating developer mode and hovering over a field:
Regards,
Yenthe
I've actually seen that, but it confused me more. Aren't customer invoices saved stored in account.invoice as well?
Yes both are saved in the same model, ie account.invoice , customer and invoice are distinguished by the field named type
*customer invoice and vendor
I only want to use it to add/edit vendor bills just like you can add/edit customers on the Customer Invoices form. How do I refer to the vendor form?
You simply fill in the field 'type' with 'in_invoice' - which means it is an incoming invoice (vendor bill)
Great, but where's the documentation for things like 'type' and 'widget' fields? I added the the 'type' field, but the area still appears disabled probably because I need to define the 'widget' for dropdown, and I don't know what's the widget string for dropdown with add/edit.
Okay, it's something else. In account.invoice.line, I made a many2many field with two models (to try it out) account.invoice and account.payment models. Both appear as grey uninteractive fields. I think I should define some identifying strings from the models, but I don't know how.
I was wrong, I needed the many2one field. Is there anyway I can make it display the vendor reference instead of the autogenerated bill no as the string?
You can get the vendor bills data and shipment data according to the PO ....
For vendor bills data ....
self.invoice_ids
For shipments data ....
self.picking_ids
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
3
Jun 21
|
4354 | ||
|
1
Feb 18
|
2373 | ||
|
2
Jul 24
|
939 | ||
|
1
Jun 24
|
3560 | ||
|
1
Oct 23
|
8582 |