mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
@@ -0,0 +1 @@
|
|||||||
|
../../../../web_save_discard_button
|
||||||
6
setup/web_save_discard_button/setup.py
Normal file
6
setup/web_save_discard_button/setup.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
setup_requires=['setuptools-odoo'],
|
||||||
|
odoo_addon=True,
|
||||||
|
)
|
||||||
1
web_save_discard_button/README.md
Normal file
1
web_save_discard_button/README.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# Save Discard Button
|
||||||
4
web_save_discard_button/__init__.py
Normal file
4
web_save_discard_button/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Copyright (C) 2023-TODAY Synconics Technologies Pvt. Ltd. (<http://www.synconics.com>).
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from . import models
|
||||||
25
web_save_discard_button/__manifest__.py
Normal file
25
web_save_discard_button/__manifest__.py
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Copyright (C) 2023-TODAY Synconics Technologies Pvt. Ltd. (<http://www.synconics.com>).
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Save & Discard Buttons",
|
||||||
|
"version": "16.0.1.0.1",
|
||||||
|
"summary": "Save & Discard Buttons",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"category": "Tools",
|
||||||
|
"author": "Synconics Technologies Pvt. Ltd., Odoo Community Association (OCA)",
|
||||||
|
"website": "https://github.com/OCA/web",
|
||||||
|
"maintainers": ["synconics"],
|
||||||
|
"depends": ["web"],
|
||||||
|
"data": [],
|
||||||
|
"images": ["static/description/main_screen.png"],
|
||||||
|
"assets": {
|
||||||
|
"web.assets_backend": [
|
||||||
|
"web_save_discard_button/static/src/scss/indicator_button.scss",
|
||||||
|
"web_save_discard_button/static/src/xml/template.xml",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"installable": True,
|
||||||
|
"application": False,
|
||||||
|
"auto_install": False,
|
||||||
|
}
|
||||||
35
web_save_discard_button/i18n/fr.po
Normal file
35
web_save_discard_button/i18n/fr.po
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# Translation of Odoo Server.
|
||||||
|
# This file contains the translation of the following modules:
|
||||||
|
# * web_save_discard_button
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Odoo Server 16.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2023-08-18 10:08+0000\n"
|
||||||
|
"PO-Revision-Date: 2023-08-18 10:08+0000\n"
|
||||||
|
"Last-Translator: \n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: \n"
|
||||||
|
"Plural-Forms: \n"
|
||||||
|
|
||||||
|
#. module: web_save_discard_button
|
||||||
|
#. odoo-javascript
|
||||||
|
#: code:addons/web_save_discard_button/static/src/xml/template.xml:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Discard"
|
||||||
|
msgstr "Ignorer"
|
||||||
|
|
||||||
|
#. module: web_save_discard_button
|
||||||
|
#: model:ir.model,name:web_save_discard_button.model_ir_http
|
||||||
|
msgid "HTTP Routing"
|
||||||
|
msgstr "Routage HTTP"
|
||||||
|
|
||||||
|
#. module: web_save_discard_button
|
||||||
|
#. odoo-javascript
|
||||||
|
#: code:addons/web_save_discard_button/static/src/xml/template.xml:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Sauvegarder"
|
||||||
4
web_save_discard_button/models/__init__.py
Normal file
4
web_save_discard_button/models/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Copyright (C) 2023-TODAY Synconics Technologies Pvt. Ltd. (<http://www.synconics.com>).
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from . import ir_http
|
||||||
13
web_save_discard_button/models/ir_http.py
Normal file
13
web_save_discard_button/models/ir_http.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# Copyright (C) 2023-TODAY Synconics Technologies Pvt. Ltd. (<http://www.synconics.com>).
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import models
|
||||||
|
|
||||||
|
|
||||||
|
class IrHttp(models.AbstractModel):
|
||||||
|
_inherit = "ir.http"
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _get_translation_frontend_modules_name(cls):
|
||||||
|
modules = super()._get_translation_frontend_modules_name()
|
||||||
|
return modules + ["web_save_discard_button"]
|
||||||
2
web_save_discard_button/readme/CONTRIBUTORS.rst
Normal file
2
web_save_discard_button/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
* Synconics Technologies Pvt. Ltd.
|
||||||
|
* `Synconics Technologies Pvt. Ltd. <https://www.synconics.com>`__:
|
||||||
3
web_save_discard_button/readme/DESCRIPTION.rst
Normal file
3
web_save_discard_button/readme/DESCRIPTION.rst
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Change Save & Discard Button style.
|
||||||
|
|
||||||
|
.. image:: ../static/description/save_button.png
|
||||||
BIN
web_save_discard_button/static/description/icon.png
Normal file
BIN
web_save_discard_button/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
BIN
web_save_discard_button/static/description/save_button.png
Normal file
BIN
web_save_discard_button/static/description/save_button.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 208 KiB |
@@ -0,0 +1,65 @@
|
|||||||
|
.o_form_status_indicator_buttons {
|
||||||
|
margin-left: 10px;
|
||||||
|
|
||||||
|
.o_form_button_save,
|
||||||
|
.o_form_button_cancel {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
&.o_form_button_save {
|
||||||
|
background-color: $primary;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
filter: brightness(0.9);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.o_form_button_cancel {
|
||||||
|
margin-left: 5px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #f6f7fa;
|
||||||
|
border-color: #e0e2e6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.save_button {
|
||||||
|
width: 100%;
|
||||||
|
font-weight: 500;
|
||||||
|
color: white;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
user-select: none;
|
||||||
|
background-color: transparent;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
padding: 0.3rem 2px;
|
||||||
|
font-size: 1.08333333rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
border-radius: 0;
|
||||||
|
transition: none;
|
||||||
|
width: 100%;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-family: $o-system-fonts;
|
||||||
|
}
|
||||||
|
|
||||||
|
.discard_button {
|
||||||
|
width: 100%;
|
||||||
|
font-weight: 500;
|
||||||
|
color: white;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
user-select: none;
|
||||||
|
color: $primary;
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 0.3rem 2px;
|
||||||
|
font-size: 1.08333333rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
border-radius: 0;
|
||||||
|
transition: none;
|
||||||
|
width: 100%;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-family: $o-system-fonts;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
17
web_save_discard_button/static/src/xml/template.xml
Normal file
17
web_save_discard_button/static/src/xml/template.xml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!-- Save and Discard Button-->
|
||||||
|
<templates>
|
||||||
|
<t
|
||||||
|
t-name="web_save_discard_button.FormStatusIndicator"
|
||||||
|
t-inherit="web.FormStatusIndicator"
|
||||||
|
t-inherit-mode="extension"
|
||||||
|
owl="1"
|
||||||
|
>
|
||||||
|
<xpath expr="//button/i[(hasclass('fa-cloud-upload'))]" position="replace">
|
||||||
|
<span class="save_button">Save</span>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//button/i[(hasclass('fa-undo'))]" position="replace">
|
||||||
|
<span class="discard_button">Discard</span>
|
||||||
|
</xpath>
|
||||||
|
</t>
|
||||||
|
</templates>
|
||||||
Reference in New Issue
Block a user