Skip to content

Instantly share code, notes, and snippets.

Trik ini banyak yang nyari2 tapi blm ketemu solusinya bahkan di stackoverflow dan forum odoo. Beruntung anda jadi orang Indonesia :)

Pada lingkungan multi-company, ada kasus dimana tampilan data tree view (misalnya res.partner) harus di filter berdasarkan company_id user yang sedang login, tapi tidak bisa dilakukan dengan record rule, karena data tersebut memang mesti bisa dibaca oleh semua user.

Jika menggunakan record rules, setup-nya sangat mudah, yaitu tinggal membuat record rules atas suatu group dengan domain sbb atas object res.partner:

[('company_id', '=', user.company_id)]
@obayit
obayit / set-up-chromium-keys.md
Created December 13, 2021 17:25 — forked from cvan/set-up-chromium-keys.md
Launch Chromium with API Keys on Mac OS X and Windows

Sometimes you need to use API Keys to use things like the Speech API. And then you Google a bit and follow all the instructions. But the Chromium Project's API Keys page does a not-so-great of explaining how to do this, so I will.

  1. Download Chromium.
  2. You'll notice a yellow disclaimer message appear as a doorhanger: Google API Keys are missing. Some functionality of Chromium will be disabled. Learn More.
  3. Clicking on that link takes you to the confusing API Keys docs page.
  4. If you aren't already, subscribe to the chromium-dev@chromium.org mailing list. (You can just subscribe to the list and choose to not receive any mail. FYI: the Chromium project restricts the APIs to those subscribed to that group - that is, Chromium devs.)
  5. Make sur