i have create one module custom_module which is store record like firstname and lastname of customer .now when i save the record it will also display in existing customer module,and i don't want any inherited field. for example:customer and suppliers.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
Your module must have method which will update existing module res.partner or res.user ....
Working on similar project at this moment. My module require it as well. Must add if not exist a new customer/supplier and create a new order.
Will follow your subject :)
This is an example given me by Gerthard (new API)
<pre>
self.env['sale.order'].create({
'field': variable,
'field2': variable2
...
})
</pre>
another example: (of course you have to adapt it to your requirements)
vals = {
'name': self.name,
'date_order': self.appointment_date,
'partner_id': self.patient.partner_id.id,
'user_id': self.doctor.partner_id.user_id.id,
'order_line': [[0, 0, {
'name': self.consultations.name,
'price_unit': self.consultations.list_price,
'product_id': self.consultations.id,
}]],
}
if pricelist_id:
vals['pricelist_id'] = pricelist_id.id
vals['currency_id'] = pricelist_id.currency_id.id
self.sale_id = self.env['sale.order'].create(vals)
u have any demo method so i can implement it.
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
0
paź 24
|
980 | ||
|
3
lut 18
|
3959 | ||
|
2
gru 17
|
4814 | ||
|
1
kwi 15
|
4327 | ||
|
0
mar 15
|
3383 |