This is a simple example of how to use the Odoo External API in Odoo 16.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
odoo.define("manila_healthtek_stock_quant_report.InventoryReportListController", function (require) { | |
"use strict"; | |
var core = require("web.core"); | |
const InventoryReportListController = require("stock.InventoryReportListController"); | |
var qweb = core.qweb; | |
const InventoryBookReportListController = InventoryReportListController.include({ | |
renderButtons: function ($node) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env.cr.execute(""" | |
UPDATE ir_ui_view SET arch_db = REPLACE(arch_db, 'x_studio_payment_date', 'x_payment_date') WHERE arch_db LIKE '%x_studio_payment_date%'; | |
UPDATE ir_ui_view SET arch_db = REPLACE(arch_db, 'x_studio_payment_entry', 'x_payment_entry') WHERE arch_db LIKE '%x_studio_payment_entry%'; | |
UPDATE ir_act_server SET code = REPLACE(code, 'x_studio_payment_date', 'x_payment_date') WHERE code LIKE '%x_studio_payment_date%' and id = 615; | |
DELETE FROM ir_model_fields WHERE name = 'x_studio_payment_date'; | |
DELETE FROM ir_model_fields WHERE name = 'x_studio_payment_entry'; | |
DELETE FROM base_automation WHERE id = 9; | |
DELETE FROM ir_actions WHERE id = 608; | |
""") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: | |
browser: true | |
# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449 | |
parserOptions: | |
ecmaVersion: 2020 | |
sourceType: module | |
allowImportExportEverywhere: true | |
# Globals available in Odoo that shouldn't produce errorings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if record.seller_ids: | |
for index, seller in enumerate(record.seller_ids.sorted(lambda s: (s.price, -s.min_qty, s.id)), 1): | |
seller.update({"sequence": index}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function printPdf (url) { | |
let iframe = env._printIframe; | |
if (!env._printIframe) { | |
iframe = env._printIframe = document.createElement('iframe'); | |
document.body.appendChild(iframe); | |
iframe.style.display = 'none'; | |
iframe.onload = function() { | |
iframe.focus(); | |
iframe.contentWindow.print(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: The issue is missing profile for codec mSBC | |
sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream | |
sudo apt update | |
sudo apt install pipewire libspa-0.2-bluetooth pipewire-audio-client-libraries | |
systemctl --user daemon-reload | |
systemctl --user --now disable pulseaudio.service pulseaudio.socket | |
systemctl --user mask pulseaudio | |
systemctl --user --now enable pipewire-media-session.service | |
systemctl --user restart pipewire |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"folders": [ | |
{ | |
"name": "custom", | |
"path": ".." | |
}, | |
{ | |
"name": "odoo", | |
"path": "../../../../odoo/17.0" | |
}, |
We are refactoring the PublicWidget system in the public (website/...) javascript codebase. The initial plan was to convert them to Owl components, but after some experiments, the idea was discarded (did not feel right, also, it would prevent serving pages without Owl in the future).
See:
- PR odoo/odoo#185998
- Main file:
web/static/src/public/interaction.js
Silent in the nest,