55 lines
1.3 KiB
Markdown
55 lines
1.3 KiB
Markdown
#odoodatabase
|
|
#sortcustomer
|
|
#sortsales
|
|
|
|
## customer
|
|
(data untuk module contact -> customer)
|
|
struktur "res_partner"
|
|
```
|
|
table struktur
|
|
p.id (increment) dengan default (nextval('res_partner_id_seq'::regclass))
|
|
p.name (text)
|
|
p.company_id => ("res_company") relation dengan id [id,name]
|
|
p.email (text)
|
|
p.country_id => ("res_country") realtion dengan id[id,code,name]
|
|
p.lang (text)
|
|
p.tz (timezone)
|
|
p.type (text) default value ("contact")
|
|
p.phone (text)
|
|
p.mobile (text)
|
|
p.active (text) default (t["true"])
|
|
p.is_company (text) default (f["false"])
|
|
p.partner_share (text) default (t["true"])
|
|
p.write_date (timestamp with timezone)
|
|
p.email_normalized
|
|
supplier_rank nilai default (0)
|
|
customer_rank nilai default (0)
|
|
invoice_warn nilai default (no-message)
|
|
sale_warn nilai defaulr (no-message)
|
|
calendar_last_notif_ack (timestamp)
|
|
vies_valid default (f)
|
|
l10n_id_kode_transaksi => (10)
|
|
l10n_id_pkp => (f)
|
|
followup_reminder_type => (automatic)
|
|
```
|
|
|
|
query untuk mendapatkan data country ( Negara )
|
|
```sql
|
|
SELECT id, code, name FROM "public".res_country
|
|
```
|
|
|
|
query untuk state (provinsi)
|
|
```sql
|
|
SELECT id, country_id, name, code FROM "public".res_country_state
|
|
```
|
|
|
|
query data customer
|
|
```sql
|
|
SELECT p.id, p.name, p.company_id, p.email , c.name as company
|
|
FROM "public".res_partner p
|
|
LEFT JOIN "public".res_company c ON p.company_id = c.id
|
|
WHERE p.id = '17'
|
|
```
|
|
|
|
## Sales database
|
|
hr_employee |