Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing from upstream itpp-labs/sync-addons (17.0) #313

Merged
merged 6 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .DINAR/build-date.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Odoo 17 build with new deps
Fresh Odoo 17 build
3 changes: 2 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
env:
browser: true
es6: true

# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
parserOptions:
ecmaVersion: 2017
ecmaVersion: 2022
sourceType: module

# Globals available in Odoo that shouldn't produce errorings
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
args:
- --plugin=@prettier/plugin-xml
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v7.32.0
rev: v8.24.0
hooks:
- id: eslint
verbose: true
Expand Down
22 changes: 19 additions & 3 deletions partner_telegram/static/src/js/telegram_widget.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
/** @odoo-module **/
/** Copyright 2024 Ivan Yelizariev <https://twitter.com/yelizariev> **/
/** Copyright 2024-2025 Ivan Yelizariev <https://twitter.com/yelizariev> **/

import { EmailField } from "@web/views/fields/email/email_field";
import { _t } from "@web/core/l10n/translation";
import { registry } from "@web/core/registry";

class TelegramField extends EmailField {}

TelegramField.template = "partner_contact.TelegramField";

export const telegramField = {
component: TelegramField,
displayName: _t("Telegram"),
supportedTypes: ["char"],
extractProps: ({ attrs }) => ({
placeholder: attrs.placeholder,
}),
};

registry.category("fields").add("telegram", telegramField);

class FormTelegramField extends TelegramField {}
FormTelegramField.template = "partner_contact.FormTelegramField";

registry.category("fields").add("telegram", TelegramField);
registry.category("fields").add("form.telegram", FormTelegramField);
export const formTelegramField = {
...telegramField,
component: FormTelegramField,
};

registry.category("fields").add("form.telegram", formTelegramField);
4 changes: 2 additions & 2 deletions partner_telegram/static/src/xml/telegram_widget.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright 2024 Ivan Yelizariev <https://twitter.com/yelizariev>
<!-- Copyright 2024-2025 Ivan Yelizariev <https://twitter.com/yelizariev>
License MIT (https://opensource.org/licenses/MIT). -->
<templates xml:space="preserve">
<t t-name="partner_contact.TelegramField" owl="1">
Expand Down Expand Up @@ -34,7 +34,7 @@
>
<xpath expr="//input" position="after">
<a
t-if="props.value"
t-if="props.record.data[props.name]"
t-att-href="props.record.data.telegram_url"
class="ms-3 d-inline-flex align-items-center"
>
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
markdown
pyyaml
Loading