Compare commits

...
Sign in to create a new pull request.

72 commits
12.0 ... 16.0

Author SHA1 Message Date
snt
efae7d5d03 Merge branch '16.0' of https://git.criptomart.net/CriptoMart/obook into 16.0 2024-09-20 16:23:03 +02:00
snt
79f6ae3923 Quita los albaranes de salida porque no permite sacar cosas. 2024-09-20 16:21:01 +02:00
snt
5a3b3772aa Fix liquidaciones. Cambia los creates a multi para evitar el warning.
Añade campos is desit y última fecha de liquidación a purchase.order. Se
asegura de linkar la línea de invoice con la línea de purchase order.
2024-09-20 16:20:26 +02:00
snt
4b1cae0b9e busca por autor, editorial y subtítulo en la web y quita las
descripciones de la búsqueda
2024-09-20 16:20:26 +02:00
snt
a4c09d597e fix create and write methods 2024-09-20 16:20:26 +02:00
snt
1f832980b3 WIP search domain ebsite 2024-09-20 16:20:26 +02:00
snt
a61d228c9a comment wip 2024-09-20 16:20:26 +02:00
snt
4f454347af Arregla retornos y salidas de depósitos en onchange. 2024-09-20 16:20:26 +02:00
snt
a6f6858e8c renombrado 2024-09-20 16:20:26 +02:00
snt
78a10bc5cd Cambio sométicos en el PoS: Añade campos subtítutlo y autor a order
line, añade campo autor a product en la lista de productos, reordena
campos en info product, no imprime nada si no existe el campo a
imprimir.
2024-09-20 16:20:26 +02:00
snt
78d5fca7de fix busqueda por autor y editorial. 2024-09-20 16:20:26 +02:00
snt
446814d0c8 Nueva forma de liquidar a través de las compras. Busca todas las ventas
confirmadas en sale.order y en pos.order de los productos contenidos en
la compra y genera una factura con esas ventas.
2024-09-20 16:20:26 +02:00
snt
24c782c3aa [WTF] Dejo el logger ahasta que se resuelva el misterio. 2024-09-20 16:20:26 +02:00
snt
99d6d7a254 [WTF] no funciona el onchange 2024-09-20 16:20:26 +02:00
snt
f5dfa6fa01 [WTF] el onchange no funciona en el web client sin el warning. 2024-09-20 16:20:26 +02:00
snt
260cd2a394 arregla el depósito de entrada, no probado con salida, pero debería
funcionar igual. Cambia el location dst en el onchange partner_id. También
se asegura que si se han creado stock moves se cambie su location dst.
El create y el write  no sé si son necesarios, a lo mejor para
importaciones, duplicados y así. El escribir el stock location
directamnete no es muy elegante, lo suyo sería sobreescribir el
onchange_partner_id de stock.move y dejar que se enargue de location dst
ahí.
2024-09-20 16:20:26 +02:00
snt
beaee63e89 wip no funciona el onchange en el web client en campos one2many
Si ponemos location_dst_id en el create, los stock moves se crean con el location antiguo (partner_vendors)
https://github.com/odoo/odoo/issues/2693
2024-09-20 16:20:26 +02:00
snt
a9f5587af5 upgrade depositos a v16. Añadida configuración para definir la lista de
precios que se aplica en los depósitos de venta.
2024-09-20 16:20:26 +02:00
snt
5439e39792 fix set en distribución música correctamente, antes siempre se configuraba la categoría en distribución libros. 2024-09-20 16:20:26 +02:00
snt
823958d044 añadido addon desde la tienda de apps de Odoo. Cybrosys. Importa imágenes de producto desde URL. 2024-09-20 16:20:26 +02:00
snt
f0e0ce3d07 añadido addon desde la tienda de apps de Odoo. Imal-Tech 2024-09-20 16:20:25 +02:00
snt
40d7d88038 añadidos campos de library al nombre y a las descripciones en las listas. Hereda template product y añade subtítulo y autor bajo el nombre. 2024-09-20 16:20:25 +02:00
snt
7faf0459f6 deja de usar website_description_limited porque javascript de
website_description ya lo recorta.
2024-09-20 16:20:25 +02:00
snt
d74b925235 añadido css para el excerpt de la lista. Añadidos campos autor, editor y genero a la lista de productos antes de la descripción. 2024-09-20 16:20:25 +02:00
snt
53139b68b1 remove deprecated t-raw 2024-09-20 16:20:25 +02:00
snt
5fb83c78b5 sobreescribe el campo website description y añade estilo css.
Seguramnete no haga falta sobreescribir el campo y se puedan heredar los
estilos o añadirselos...
2024-09-20 16:20:25 +02:00
snt
67013f8d4c muestra un extracto de la descripción en las listas de productos. 2024-09-20 16:20:25 +02:00
snt
6eb23b6e50 sobreescribe create product template para setear los campos de
distribución ahí también
2024-09-20 16:20:25 +02:00
snt
9734ab2eb4 upgrade v16. configura automáticamente la categoría del website y el
ribbon del producto según configuraciones en la compañía cuando se
actualizan los campos en distribución.
2024-09-20 16:20:25 +02:00
snt
308b3c4353 upgrade v16
separación de las funcionalidades del PoS en un módulo aparte
2024-09-20 16:20:24 +02:00
snt
f9f99116bf Fix liquidaciones. Cambia los creates a multi para evitar el warning.
Añade campos is desit y última fecha de liquidación a purchase.order. Se
asegura de linkar la línea de invoice con la línea de purchase order.
2024-09-20 16:11:57 +02:00
snt
5234d8ffc8 busca por autor, editorial y subtítulo en la web y quita las
descripciones de la búsqueda
2024-09-18 17:57:08 +02:00
snt
8ba30e579d fix create and write methods 2024-09-18 17:28:13 +02:00
snt
d57fa37505 WIP search domain ebsite 2024-09-18 17:22:12 +02:00
snt
3e0c3eeccb comment wip 2024-09-18 17:20:03 +02:00
snt
3cc04fb825 Arregla retornos y salidas de depósitos en onchange. 2024-09-18 17:09:51 +02:00
snt
8f306a2237 renombrado 2024-09-15 16:51:31 +02:00
snt
b9c09f6068 Cambio sométicos en el PoS: Añade campos subtítutlo y autor a order
line, añade campo autor a product en la lista de productos, reordena
campos en info product, no imprime nada si no existe el campo a
imprimir.
2024-09-14 20:22:46 +02:00
snt
f4609c0f6a fix busqueda por autor y editorial. 2024-09-14 18:37:53 +02:00
snt
231656c52e Nueva forma de liquidar a través de las compras. Busca todas las ventas
confirmadas en sale.order y en pos.order de los productos contenidos en
la compra y genera una factura con esas ventas.
2024-09-13 19:53:45 +02:00
snt
e5a5c507ee [WTF] Dejo el logger ahasta que se resuelva el misterio. 2024-09-13 14:33:54 +02:00
snt
61d6feda3d [WTF] no funciona el onchange 2024-09-13 13:59:49 +02:00
snt
42ad941e01 [WTF] el onchange no funciona en el web client sin el warning. 2024-09-13 13:54:15 +02:00
snt
4b27d29d53 arregla el depósito de entrada, no probado con salida, pero debería
funcionar igual. Cambia el location dst en el onchange partner_id. También
se asegura que si se han creado stock moves se cambie su location dst.
El create y el write  no sé si son necesarios, a lo mejor para
importaciones, duplicados y así. El escribir el stock location
directamnete no es muy elegante, lo suyo sería sobreescribir el
onchange_partner_id de stock.move y dejar que se enargue de location dst
ahí.
2024-09-12 21:43:10 +02:00
snt
492c8c6025 wip no funciona el onchange en el web client en campos one2many
Si ponemos location_dst_id en el create, los stock moves se crean con el location antiguo (partner_vendors)
https://github.com/odoo/odoo/issues/2693
2024-09-12 18:10:31 +02:00
snt
ca3ff032a2 upgrade depositos a v16. Añadida configuración para definir la lista de
precios que se aplica en los depósitos de venta.
2024-09-10 16:53:28 +02:00
snt
bee00e0867 fix set en distribución música correctamente, antes siempre se configuraba la categoría en distribución libros. 2024-09-10 14:04:01 +02:00
snt
f931c63137 añadido addon desde la tienda de apps de Odoo. Cybrosys. Importa imágenes de producto desde URL. 2024-09-08 16:03:04 +02:00
snt
849a6b3fa9 añadido addon desde la tienda de apps de Odoo. Imal-Tech 2024-09-08 16:01:48 +02:00
snt
80db7ac1f0 añadidos campos de library al nombre y a las descripciones en las listas. Hereda template product y añade subtítulo y autor bajo el nombre. 2024-09-07 17:27:02 +02:00
snt
4bb1d4b4a1 deja de usar website_description_limited porque javascript de
website_description ya lo recorta.
2024-09-07 02:48:00 +02:00
snt
7aa800adc4 añadido css para el excerpt de la lista. Añadidos campos autor, editor y genero a la lista de productos antes de la descripción. 2024-09-06 21:10:31 +02:00
snt
815dab2224 remove deprecated t-raw 2024-09-06 19:44:31 +02:00
snt
5e931d8d7c sobreescribe el campo website description y añade estilo css.
Seguramnete no haga falta sobreescribir el campo y se puedan heredar los
estilos o añadirselos...
2024-09-06 19:41:10 +02:00
snt
7b4457102e muestra un extracto de la descripción en las listas de productos. 2024-09-06 13:41:47 +02:00
snt
f0b77967b3 sobreescribe create product template para setear los campos de
distribución ahí también
2024-09-05 13:07:42 +02:00
snt
e102c0e517 upgrade v16. configura automáticamente la categoría del website y el
ribbon del producto según configuraciones en la compañía cuando se
actualizan los campos en distribución.
2024-09-05 01:49:43 +02:00
823589afb0 Merge branch '16.0' of https://git.criptomart.net/CriptoMart/obook into 16.0 2024-09-04 22:34:18 +00:00
70679c57a3 links internal description with website_description 2024-09-04 22:33:01 +00:00
snt
386ae33d80 upgrade v16
separación de las funcionalidades del PoS en un módulo aparte
2024-09-04 22:25:51 +02:00
cb788d4a45 comentados assets no encuentra nombre en 15.0 y 16.0 2024-08-29 16:31:29 +00:00
938b123d88 borrados addons OCA 2024-08-29 14:25:34 +00:00
54cdb9c907 view id cambiada 2024-08-28 20:29:46 +00:00
35f5712918 13.0 finaliza ok 2024-08-28 19:02:39 +00:00
459d99a7c3 [MIG] product_state: Migration to 16.0 2024-08-28 18:37:53 +00:00
663479e4a2 [MIG] product_sequence: Migration to 16.0 2024-08-28 18:21:20 +00:00
f9efd08ff5 [MIG] product_sequence: Migration to 16.0 2024-08-28 18:20:23 +00:00
5cd63e80ac [MIG] stock_picking_deposito: Migration to 16.0 2024-08-28 18:14:13 +00:00
a796e31f22 [MIG] product_state: Migration to 16.0 2024-08-28 18:14:13 +00:00
6e42b9c38c [MIG] product_retail_cm: Migration to 16.0 2024-08-28 18:14:13 +00:00
3b0d37a0ac [MIG] product_library: Migration to 16.0 2024-08-28 18:14:13 +00:00
3d189d87a1 odoo-module-migrator 16 2024-08-28 18:11:36 +00:00
599 changed files with 2592 additions and 31067 deletions

View file

@ -1,165 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View file

@ -1,3 +0,0 @@
# -*- coding: utf-8 -*-
from . import models
from . import controllers

View file

@ -1,35 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2016, 2019 Openworx
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Obook Openworx Material Backend Theme V12",
"summary": "Oboo Openworx Material Backend Theme V12 ",
"version": "12.0.0.3",
"category": "Theme/Backend",
"website": "http://www.openworx.nl",
"description": """
Obook Openworx Material Backend theme for Odoo 12.0 community edition.
""",
'images':[
'images/screen.png'
],
"author": "Openworx",
"license": "LGPL-3",
"installable": True,
"depends": [
'web',
'web_responsive',
],
"data": [
'views/assets.xml',
'views/res_company_view.xml',
'views/users.xml',
'views/sidebar.xml',
#'views/web.xml',
],
'live_test_url': 'https://youtu.be/JX-ntw2ORl8'
}

View file

@ -1,35 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2016, 2019 Openworx
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Openworx Material Backend Theme V12",
"summary": "Openworx Material Backend Theme V12 ",
"version": "12.0.0.3",
"category": "Theme/Backend",
"website": "http://www.openworx.nl",
"description": """
Openworx Material Backend theme for Odoo 12.0 community edition.
""",
'images':[
'images/screen.png'
],
"author": "Openworx",
"license": "LGPL-3",
"installable": True,
"depends": [
'web',
'web_responsive',
],
"data": [
'views/assets.xml',
'views/res_company_view.xml',
'views/users.xml',
'views/sidebar.xml',
#'views/web.xml',
],
'live_test_url': 'https://youtu.be/JX-ntw2ORl8'
}

View file

@ -1,23 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2016, 2019 Openworx
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
import base64
from odoo.http import Controller, request, route
from werkzeug.utils import redirect
DEFAULT_IMAGE = '/backend_theme_v12/static/src/img/material-background.jpg'
class DasboardBackground(Controller):
@route(['/dashboard'], type='http', auth='user', website=False)
def dashboard(self, **post):
user = request.env.user
company = user.company_id
if company.dashboard_background:
image = base64.b64decode(company.dashboard_background)
else:
return redirect(DEFAULT_IMAGE)
return request.make_response(
image, [('Content-Type', 'image')])

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

View file

@ -1,3 +0,0 @@
# -*- coding: utf-8 -*-
from . import res_company
from . import res_users

View file

@ -1,11 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2016, 2019 Openworx
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import models, fields
class ResCompany(models.Model):
_inherit = 'res.company'
dashboard_background = fields.Binary(attachment=True)

View file

@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2016, 2019 Openworx
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import models, fields
class ResUsers(models.Model):
_inherit = 'res.users'
sidebar_visible = fields.Boolean("Show App Sidebar", default=True)
def __init__(self, pool, cr):
""" Override of __init__ to add access rights on notification_email_send
and alias fields. Access rights are disabled by default, but allowed
on some specific fields defined in self.SELF_{READ/WRITE}ABLE_FIELDS.
"""
init_res = super(ResUsers, self).__init__(pool, cr)
# duplicate list to avoid modifying the original reference
type(self).SELF_WRITEABLE_FIELDS = list(self.SELF_WRITEABLE_FIELDS)
type(self).SELF_WRITEABLE_FIELDS.extend(['sidebar_visible'])
# duplicate list to avoid modifying the original reference
type(self).SELF_READABLE_FIELDS = list(self.SELF_READABLE_FIELDS)
type(self).SELF_READABLE_FIELDS.extend(['sidebar_visible'])
return init_res

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View file

@ -1,51 +0,0 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h1 class="oe_slogan" style="color:#337ab7;">Openworx Material Backend Theme</h1>
<h2 class="oe_slogan">The first Odoo 12.0 community backend theme</h2>
<div class="oe_screenshot" style="text-align: center;">
<h3 class="oe_slogan" style="color:#337ab7;">Enterprise look'n'feel and App Sidebar</h3>
<img style="max-width: 100%;" src="sidebar.png"/><br><br>
<h3 class="oe_slogan" style="color:#337ab7;">App Dashboard</h3>
<img style="max-width: 100%;" src="desktop.png"/><br><br>
<h3 class="oe_slogan" style="color:#337ab7;">Quick search in App Dashboard</h3>
<img style="max-width: 100%;" src="search.png"/><br><br>
<h3 class="oe_slogan" style="color:#337ab7;">Side Chatter on widescreen</h3>
<img style="max-width: 100%;" src="crm.png"/><br><br>
<h3 class="oe_slogan" style="color:#337ab7;">Fully responsive</h3>
<img style="max-width: 100%;" src="crm_mobile.png"/><br><br>
<img style="max-width: 100%;" src="mobile.png"/><br><br>
</div>
</div>
</div>
</section>
<section class="oe_container oe_separator">
</section>
<section class="oe_container" style="background-color:#E8E8E8; padding:20px 0px 90px 0px">
<div class="oe_row">
<div class="oe_span12">
<div class="oe_centeralign">
<p>Remark: It is possible that the Odoo service needs to be restarted after install.</p>
</div>
</div>
</div>
</section>
<section class="oe_container oe_separator">
</section>
<section class="oe_container oe_dark">
<div class="oe_row">
<div class="oe_span12 oe_centeralign">
<br/>
<h3>Help & Support</h3>
<br/>
Website: <a href="https://www.openworx.nl" target="_blank">Openworx</a><br/>
Contact: <a href="mailto:info@openworx.nl" subject="Material Backend Theme v12">Email Support</a><br/>
<br/>
</div>
</div>
</section>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 KiB

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="15px" height="15px" viewBox="0 0 15 15" enable-background="new 0 0 15 15" xml:space="preserve">
<g>
<path fill="#666766" d="M12.385,5.578L7.65,10.313l-0.89,0.888c-0.119,0.119-0.281,0.184-0.444,0.184
c-0.162,0-0.328-0.064-0.445-0.184l-0.89-0.888L2.615,7.944C2.497,7.828,2.432,7.664,2.432,7.5c0-0.163,0.065-0.325,0.183-0.444
l0.89-0.89c0.118-0.117,0.281-0.183,0.444-0.183c0.164,0,0.327,0.065,0.445,0.183l1.923,1.929l4.289-4.296
c0.119-0.118,0.282-0.183,0.445-0.183c0.164,0,0.327,0.065,0.445,0.183l0.889,0.89c0.118,0.118,0.184,0.281,0.184,0.445
C12.568,5.296,12.503,5.46,12.385,5.578z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

View file

@ -1,25 +0,0 @@
/* Copyright 2017 Openworx.
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
odoo.define('backend_theme_v12.sidebar-toggle', function (require) {
"use strict";
var session = require('web.session');
var rpc = require('web.rpc');
var id = session.uid;
rpc.query({
model: 'res.users',
method: 'read',
args: [[id], ['sidebar_visible']],
}).then(function(res) {
var dbfield = res[0];
var toggle = dbfield.sidebar_visible;
if (toggle === true) {
$("#app-sidebar").removeClass("toggle-sidebar");
} else {
$("#app-sidebar").addClass("toggle-sidebar");
};
});
});

View file

@ -1,33 +0,0 @@
/* Copyright 2016, 2019 Openworx.
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
// Check if debug mode is active and then add debug into URL when clicking on the App sidebar
odoo.define('backend_theme_v12.Sidebar', function(require) {
"use strict";
var core = require('web.core');
var session = require('web.session');
var Widget = require('web.Widget');
$(function() {
(function($) {
$.addDebug = function(url) {
url = url.replace(/(.{4})/, "$1?debug");
return url;
}
$.addDebugWithAssets = function(url) {
url = url.replace(/(.{4})/, "$1?debug=assets");
return url;
}
$.delDebug = function(url) {
var str = url.match(/web(\S*)#/);
url = url.replace("str/g", "");
return url;
}
}) (jQuery);
$("#sidebar a").each(function() {
var url = $(this).attr('href');
if (session.debug == 1) $(this).attr('href', $.addDebug(url));
if (session.debug == 'assets') $(this).attr('href', $.addDebugWithAssets(url));
if (session.debug == false) $(this).attr('href', $.delDebug(url));
});
});
});

View file

@ -1,69 +0,0 @@
/* Copyright 2016, 2018 Openworx.
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
/* App Sidebar Panel */
$odoo-sidebar-width: 180px;
.app-sidebar-panel {
flex: 0 0 $odoo-sidebar-width;
background-color: $gray-base;
height: 100% !important;
overflow-y: auto;
@media (max-width: 768px) {
display: none;
}
}
/* @media (min-width: 768px) {
.o_menu_apps {
display: none !important;
}
} */
//.app-sidebar-panel:hover {
// @include o-flex(0, 0, $odoo-sidebar-width);
//}
.app-sidebar {
white-space: nowrap;
padding: 0;
.app-sidebar-menu {
list-style: none;
margin: 0;
padding: 0;
>li {
display: block;
margin: 0;
padding: 0;
border: 0px;
>a {
display: block;
position: relative;
margin: 0;
border: 0px;
padding: 8px 15px;
text-decoration: none;
font-size: 13px;
font-weight: 300;
color: $gray-lighter;
overflow: hidden;
text-overflow: ellipsis;
}
}
> li:hover > a{
background: darken(#0099ff, 15%);
color: #fff;
}
}
}
.app-sidebar-menuitem {
width: 23px;
height: 22px;
margin-right: 5px;
}
.toggle-sidebar {
margin-left: 0px - $odoo-sidebar-width;
}

View file

@ -1,492 +0,0 @@
/* Copyright 2016, 2019 Openworx.
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
@font-face {
font-family: Roboto;
src: url(/backend_theme_v12/static/src/font/Roboto-Regular.ttf)
}
$gray-base: #000;
$gray-darker: lighten($gray-base, 13.5%);
$gray-dark: #666;
$gray: #777;
$gray-light: #AEA79F;
$gray-lighter: lighten($gray-base, 93.5%);
// Change colors here
// Odoo EE colors
//$brand-primary: #875a7b;
//$brand-secondary: #00A09D;
//------------------------
$brand-primary: #008DCA;
$brand-secondary: #5EC269;
//------------------------
$brand-primary-dark: darken($brand-primary, 10%);
$brand-secondary-dark: darken($brand-secondary, 10%);
body {
font-family: "Roboto";
}
.o_loading {
background-color: $brand-primary;
}
.o_main_navbar {
background-color : $brand-primary;
}
.o_main_navbar > a:hover, .o_main_navbar > a:focus, .o_main_navbar > button:hover, .o_main_navbar > button:focus {
background-color: $brand-primary-dark;
color: inherit;
}
.o_main_navbar > ul > li > a:hover, .o_main_navbar > ul > li > label:hover {
background-color: $brand-primary-dark;
}
.o_main_navbar .show .dropdown-toggle {
background-color: $brand-primary-dark;
}
// Fix color Add file button
.o_control_panel .o_cp_sidebar .o_hidden_input_file .o_form_binary_form span {
color: $gray-dark !important;
}
// Buttons
.btn {
border-radius: 0px;
}
.btn-primary {
color: #fff;
background-color: $brand-secondary;
border-color: $brand-secondary;
}
.btn-primary:hover {
color: #fff;
background-color: $brand-secondary-dark;
border-color: $brand-secondary-dark;
}
.btn-secondary {
border: none;
}
.btn:active, .btn.active {
-webkit-box-shadow: none;
box-shadow: none;
background-color: #eee !important;
}
.btn-group.open .dropdown-toggle {
-webkit-box-shadow: none;
box-shadow: none;
background-color: #eee !important;
}
.btn-link {
color: $brand-secondary;
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button.btn-primary.disabled {
color: $brand-primary;
}
.o_form_view .o_form_statusbar > .o_statusbar_status > .o_arrow_button:not(.disabled):hover {
color: $brand-primary;
}
.o_dropdown_toggler_btn, .o_dropdown_toggler_btn:hover, .o_dropdown_toggler_btn:focus, .o_dropdown_toggler_btn:hover, .o_dropdown_toggler_btn:focus, .btn-icon, .o_graph_button {
text-transform: none !important;
color: $gray-dark !important;
background-color: transparent !important;
border: none !important;
}
.dropdown-menu {
border-radius: 0px;
}
oe_highlight {
color: #ffffff !important;
background-color: $brand-primary !important;
}
.o_external_button {
color: $brand-primary !important;
background: #ffffff;
}
.o_button_icon {
color: $brand-primary !important;
}
// Calendar
.o_calendar_container .o_calendar_sidebar_container .ui-datepicker table .ui-state-active {
background: none;
background-color: $brand-primary !important;
color: #ffffff !important;
}
.o_calendar_container .o_calendar_sidebar_container .ui-datepicker table .ui-state-default {
color: $brand-primary;
}
.datepicker {
.table-sm {
> thead {
color: white;
background-color: $brand-primary;
> tr {
&:first-child {
th:hover {
color: white;
background-color: darken($brand-primary, 10%);
}
}
&:last-child {
color: $o-datepicker-week-color;
background-color: $o-datepicker-week-bg-color;
}
> th {
border-radius: 0;
}
}
}
> tbody {
> tr {
> td {
&.active, .active {
background-color: $o-brand-primary;
border-radius: 100px;
}
&.today:before {
border-bottom-color: $o-brand-primary;
}
}
}
}
}
}
.datepicker .table-sm > tbody > tr > td.active, .datepicker .table-sm > tbody > tr > td .active {
background-color: $brand-primary;
border-radius: 0;
}
// Filter search label
.o_searchview {
.o_searchview_facet {
background-color: #ffffff;
.o_searchview_facet_label {
background-color: $brand-primary;
}
}
}
a {
color: $brand-secondary;
text-decoration: none;
background-color: transparent;
-webkit-text-decoration-skip: objects;
}
a:hover {
color: $brand-secondary-dark;
text-decoration: none;
}
.o_control_panel {
background-color: #ffffff;
}
.breadcrumb {
background-color: inherit;
}
// Input
input[type="text"], input[type="password"], input[type="number"],
textarea, select, .o_form_view.o_form_editable .o_form_field_many2manytags,
.o_searchview
{
border: 0;
border-radius: 0;
border-bottom: 1px solid #ccc;
}
.o_web_client input:focus, .o_web_client textarea:focus, .o_web_client select:focus {
outline: none;
border-bottom: 2px solid $brand-primary;
}
.o_input {
border: 1px solid #ccc;
border-top-style: none;
border-right-style: none;
border-left-style: none;
color: $gray;
}
.o_field_widget {
&.o_field_many2one .o_external_button {
color: $brand-secondary
}
}
.o_required_modifier {
&.o_input, .o_input {
background-color: lighten($brand-primary, 35%) ! important;
}
}
.input-group-text {
background-color: transparent;
color: #fff;
border: 0px;
}
// Listview
.o_list_view.table {
border: none;
}
.o_list_view.table thead, .o_list_view.table tfoot, .o_list_view.table td,.o_list_view.table th {
border: none;
}
.o_list_view.table thead {
background-color: #e2e2e0;
}
.o_list_view.table thead > tr > th.o_column_sortable:hover {
background-color: #D6D6D3;
}
.o_list_view.table tbody tr.o_group_header {
background-color: #dfdfdf;
background-image: none;
border-top: 1px solid #e2e2e0;
}
.table-striped > tbody > tr:nth-of-type(2n+1) {
background-color: #eef0f0;
}
.o_list_view tfoot tr:nth-child(1) td {
background-color: $brand-primary !important;
color: #fff !important;
}
.ui-autocomplete .ui-menu-item.ui-state-focus {
background-color: #dee2e6;
}
.ui-menu-item a:hover,.ui-menu-item a:focus {
color: #666666 !important;
}
.ui-autocomplete .ui-menu-item.ui-state-focus a{
color: #666666 !important;
}
.o_form_view .oe_button_box .oe_stat_button .o_stat_info .o_stat_value {
color: $brand-primary;
}
.o_form_view .o_horizontal_separator {
color: #666666;
font-weight: bold;
}
// Forms
.o_form_view {
.o_form_sheet_bg {
background: none !important;
background-color: #F9F9F9 !important;
padding: 0px;
.o_form_sheet {
border: 1px solid #d9d7d7;
box-shadow: 0 5px 20px -15px black;
}
}
.o_form_statusbar {
//margin: -16px;
.o_statusbar_status {
> .o_arrow_button {
background: #ffffff;
}
}
}
}
// App Dashboard
/* .o_menu_apps .dropdown-menu.show {
background: transparent url('/dashboard') no-repeat scroll center center / cover;
} */
.o_menu_apps .dropdown-menu.show {
background: url(/dashboard);
background-origin: border-box;
background-size: cover;
height: calc(100vh);
max-height: calc(100vh);
border-top: $o-navbar-height solid transparent;
top: 0 !important;
}
.o_main_navbar > ul.o_menu_systray {
float: right;
position: relative;
z-index: 200;
}
.fa-th-large::before {
content: "\f00a";
}
.o_menu_apps .full {
width: 46px;
font-size: 18px;
text-align: center;
position: relative;
z-index: 200;
}
.o-app-name {
color: #fff;
font-size: 15px;
font-weight: 400;
text-overflow: ellipsis;
white-space: nowrap;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}
.o_menu_apps .dropdown-menu.show .o-app-icon {
padding: 20px 0 0;
}
.o_menu_apps .dropdown-menu.show .o-app-icon:hover {
box-shadow: 0 8px 15px -10px black;
transform: translateY(-1px);
}
.dropdown-item.o_app {
background: transparent;
}
.o-menu-search-result {
color: #fff;
}
// Chat window
.o_thread_window .o_thread_window_header {
background-color: $brand-primary;
}
// Formview
$gray-lighter-darker: #d9d7d7;
$o-statbutton-height: 40px;
$o-statbutton-spacing: 6px;
.o_form_view {
@mixin o-form-sheet-negative-margin() {
margin-left: -$o-horizontal-padding;
margin-right: -$o-horizontal-padding;
margin-top: -#{$o-horizontal-padding +1};
}
.o_form_uri {
display: inline-block;
color: $gray;
&:first-line {
color: $link-color;
}
&:hover {
color: darken($link-color, 15%); // hack required on chrome
&:first-line {
color: darken($link-color, 15%);
}
}
}
.oe_avatar {
float: right;
>img {
max-height: 90px;
max-width: 90px;
margin-bottom: 10px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
border: none;
}
+.oe_title {
padding-right: 0px;
padding-left: 0px;
}
}
}
// Override `@include media-breakpoint-up` in module `web_responsive`
@include media-breakpoint-up(md) {
.o_form_view .oe_button_box + .oe_avatar + .oe_title {
/* Add 110px in the calculation for the avatar space */
width: calc(100% - 400px - 110px);
min-width: 400px;
max-width: 650px;
}
/* Same correction for res.users .oe_title div */
.o_form_view .o_field_integer + .oe_button_box + .o_form_header + .o_field_boolean +
.o_form_header + .oe_avatar + .oe_title {
width: calc(100% - 400px - 110px);
min-width: 400px;
max-width: 650px;
}
}

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016, 2019 Openworx.
@author Mario Gielissen <mario@openworx.nl>
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
-->
<odoo>
<data>
<template id="assets_backend" name="Openworx Backend Theme" inherit_id="web.assets_backend">
<xpath expr=".">
<link rel="stylesheet" href="/backend_theme_v12/static/src/scss/style.scss"/>
<link rel="stylesheet" href="/backend_theme_v12/static/src/scss/sidebar.scss"/>
<script type="application/javascript" src="/backend_theme_v12/static/src/js/sidebar.js"/>
<script type="application/javascript" src="/backend_theme_v12/static/src/js/sidebar-toggle.js"/>
</xpath>
</template>
</data>
</odoo>

View file

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="res_company_form" model="ir.ui.view">
<field name="name">res.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form" />
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page name="background" string="Apps Dashboard">
<group name="dashboard_settings">
<field name="dashboard_background" widget="image" class="oe_avatar"/>
</group>
</page>
</xpath>
</field>
</record>
</odoo>

View file

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2016, 2019 Openworx.
@author Mario Gielissen <mario@openworx.nl>
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
-->
<odoo>
<template id="app_sidebar" inherit_id="web.webclient_bootstrap" name="Apps Sidebar">
<xpath expr="//div[hasclass('o_main')]//main[hasclass('o_main_content')]" position="before">
<div id="app-sidebar" class="app-sidebar-panel">
<!-- <div class="app-sidebar navbar-collapse collapse"> -->
<div class="app-sidebar">
<ul id="sidebar" class="app-sidebar-menu">
<li class="nav-item" t-as="menu" t-foreach="menu_data['children']" >
<t t-set="debug_param" t-value="''"/>
<a t-att-href="'/web%s#menu_id=%s&amp;action=' % (debug_param, menu['id'])"
t-att-class="'nav-link nav-toggle' if menu.get('children') else 'nav-link '"
t-att-data-menu="menu['id']"
t-att-data-menu-xmlid="menu.get('xmlid')"
t-att-data-action-model="menu['action'] and menu['action'].split(',')[0] or None"
t-att-data-action-id="menu['action'] and menu['action'].split(',')[1] or None">
<img t-attf-src="/web/image/ir.ui.menu/{{ menu['id'] }}/web_icon_data" t-att-alt="menu['name']" class="app-sidebar-menuitem" t-att-title="menu['name']"/>
<span class="title" >
<t t-esc="menu['name']"/>
</span>
</a>
</li>
</ul>
</div>
</div>
</xpath>
</template>
</odoo>

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="res_users_preferences" model="ir.ui.view">
<field name="name">res.users.preferences</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
<field name="arch" type="xml">
<xpath expr="//group[last()]" position="after">
<group name="App Sidebar">
<field name="sidebar_visible" readonly="0"/>
</group>
</xpath>
</field>
</record>
</odoo>

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="menu" inherit_id="web_responsive.apps">
<!-- <xpath expr="//div[hasclass('panel-heading')]"
position="replace" /> -->
<xpath expr="//div[hasclass('dropdown-menu')]" position="after">
<div class="panel-footer" id="appDrawerAppPanelFooter">
<div class="oe_logo">
<img src="/web/binary/company_logo" />
</div>
</div>
</xpath>
</template>
<!-- <template id="webclient_bootstrap"
inherit_id="web_responsive.webclient_bootstrap">
<xpath expr="//i[hasclass('fa-th')]" position="after">
<i class="fa fa-lg fa-chevron-left app-drawer-icon-close"
t-translation="off" aria-hidden="true" />
</xpath>
</template> -->
</odoo>

View file

@ -1,125 +0,0 @@
====================================
Add custom filters for fields via UI
====================================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github
:target: https://github.com/OCA/server-ux/tree/12.0/base_search_custom_field_filter
:alt: OCA/server-ux
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-ux-12-0/server-ux-12-0-base_search_custom_field_filter
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/250/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
This module allows to define custom filters in the search views for an specific
field belonging to the document or any other related document.
This nature makes the definition quite technical, but once done, it adds the
element in the UI for regular user use.
**Table of contents**
.. contents::
:local:
Configuration
=============
#. Go to *Settings > Technical > User Interface > Custom Field Filters*.
#. Create a new record, and define following information:
* The **Model** for which you are defining the filter. It will appear in all
the search views of this model.
* The label you want to see on the search line on the **Name** field. This
field allows translations for proper UI in different languages.
* The **Expression**, which is the field chain string with dot notation.
Examples: `product_id`, `product_id.seller_ids.name`, `partner_id.lang`.
* Optionally, you can fill **Position After** for indicating after which
existing field (technical name) the filter will appear. If empty or not
found, the filter will be added at the end.
#. You can reorder records for determining sorting for multiple filters for the
same model with the arrow handle in the left part.
Usage
=====
#. Go to the menu entry for which you have defined the custom field filter.
#. On the search bar, type anything.
#. In the filter list, you will see the line for the element you have defined.
As demo data, a custom field filter is included for sample purposes:
.. image:: https://raw.githubusercontent.com/OCA/server-ux/12.0/base_search_custom_field_filter/static/src/img/ir_ui_custom_field_filter.png
Steps for trying this sample:
#. Install `contacts` module.
#. Go to *Contacts*.
#. Type "english" and you'll find the filter "Language" at the end:
.. image:: https://raw.githubusercontent.com/OCA/server-ux/12.0/base_search_custom_field_filter/static/src/img/contact_search.png
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-ux/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-ux/issues/new?body=module:%20base_search_custom_field_filter%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Tecnativa
Contributors
~~~~~~~~~~~~
* `Tecnativa <https://www.tecnativa.com>`_:
* Carlos Dauden
* Pedro M. Baeza
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
.. |maintainer-pedrobaeza| image:: https://github.com/pedrobaeza.png?size=40px
:target: https://github.com/pedrobaeza
:alt: pedrobaeza
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-pedrobaeza|
This module is part of the `OCA/server-ux <https://github.com/OCA/server-ux/tree/12.0/base_search_custom_field_filter>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View file

@ -1,2 +0,0 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import models

View file

@ -1,22 +0,0 @@
# Copyright 2020 Tecnativa - Carlos Dauden
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Add custom filters for fields via UI",
"version": "12.0.1.0.1",
"category": "Usability",
"website": "https://github.com/OCA/server-ux",
"author": "Tecnativa, Odoo Community Association (OCA)",
"demo": [
"demo/demo_ir_ui_custom_field_filter.xml",
],
"data": [
"security/ir.model.access.csv",
"templates/assets.xml",
"views/ir_ui_custom_field_filter_views.xml",
],
"depends": ["web"],
"license": "AGPL-3",
"installable": True,
"maintainers": ["pedrobaeza"],
}

View file

@ -1,9 +0,0 @@
<odoo>
<record id="custom_field_filter_demo" model="ir.ui.custom.field.filter">
<field name="model_id" ref="base.model_res_partner"/>
<field name="name">Language</field>
<field name="expression">lang</field>
</record>
</odoo>

View file

@ -1,3 +0,0 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import base
from . import ir_ui_custom_field_filter

View file

@ -1,64 +0,0 @@
# Copyright 2020-2021 Tecnativa - Carlos Dauden
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, models
from lxml import etree
class Base(models.AbstractModel):
_inherit = 'base'
@api.model
def _add_custom_filters(self, res, custom_filters):
arch = etree.fromstring(res['arch'])
for custom_filter in custom_filters:
node = False
if custom_filter.position_after:
node = arch.xpath(
"//field[@name='%s']" % custom_filter.position_after)
if not node:
node = (arch.xpath("//field[last()]") or
arch.xpath("//filter[last()]") or
arch.xpath("//group[last()]"))
if node:
elem = etree.Element('field', {
'name': 'ir_ui_custom_filter_%s' % custom_filter.id,
'string': custom_filter.name,
'custom_field_filter': custom_filter.expression,
})
node[0].addnext(elem)
res['arch'] = etree.tostring(arch)
return res
@api.model
def fields_view_get(self, view_id=None, view_type='form', toolbar=False,
submenu=False):
"""Inject fields field in search views."""
res = super().fields_view_get(
view_id=view_id, view_type=view_type, toolbar=toolbar,
submenu=submenu)
if view_type == 'search':
custom_filters = self.env['ir.ui.custom.field.filter'].search(
[("model_name", "=", res.get("model"))])
if custom_filters:
res = self._add_custom_filters(res, custom_filters)
return res
@api.model
def load_views(self, views, options=None):
"""Inject fake field definition for having custom filters available."""
res = super(Base, self.with_context(
custom_field_filter=True,
)).load_views(views, options=options)
custom_filters = self.env['ir.ui.custom.field.filter'].search(
[("model_name", "=", self._name)])
for custom_filter in custom_filters:
field = custom_filter._get_related_field()
field_name = 'ir_ui_custom_filter_%s' % custom_filter.id
res['fields'][field_name] = field.get_description(self.env)
# force this for avoiding to appear on the rest of the UI
res['fields'][field_name]['selectable'] = False
res['fields'][field_name]['sortable'] = False
res['fields'][field_name]['store'] = False
return res

View file

@ -1,42 +0,0 @@
# Copyright 2020 Tecnativa - Carlos Dauden
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, exceptions, fields, models
class IrUiCustomFilter(models.Model):
_name = "ir.ui.custom.field.filter"
_description = "Custom UI field filter"
_order = "model_id, sequence, id"
sequence = fields.Integer()
model_id = fields.Many2one(comodel_name="ir.model", required=True)
model_name = fields.Char(
related="model_id.model", store=True, readonly=True, index=True,
string="Model name",
)
name = fields.Char(required=True, translate=True)
expression = fields.Char(required=True)
position_after = fields.Char(
help="Optional field name for putting the filter after that one. "
"If empty or not found, it will be put at the end.",
)
def _get_related_field(self):
"""Determine the chain of fields."""
self.ensure_one()
related = self.expression.split('.')
target = self.env[self.model_name]
for name in related:
field = target._fields[name]
target = target[name]
return field
@api.constrains('model_id', 'expression')
def _check_expression(self):
for record in self:
try:
record._get_related_field()
except KeyError:
raise exceptions.ValidationError(_("Incorrect expression."))

View file

@ -1,14 +0,0 @@
#. Go to *Settings > Technical > User Interface > Custom Field Filters*.
#. Create a new record, and define following information:
* The **Model** for which you are defining the filter. It will appear in all
the search views of this model.
* The label you want to see on the search line on the **Name** field. This
field allows translations for proper UI in different languages.
* The **Expression**, which is the field chain string with dot notation.
Examples: `product_id`, `product_id.seller_ids.name`, `partner_id.lang`.
* Optionally, you can fill **Position After** for indicating after which
existing field (technical name) the filter will appear. If empty or not
found, the filter will be added at the end.
#. You can reorder records for determining sorting for multiple filters for the
same model with the arrow handle in the left part.

View file

@ -1,4 +0,0 @@
* `Tecnativa <https://www.tecnativa.com>`_:
* Carlos Dauden
* Pedro M. Baeza

View file

@ -1,5 +0,0 @@
This module allows to define custom filters in the search views for an specific
field belonging to the document or any other related document.
This nature makes the definition quite technical, but once done, it adds the
element in the UI for regular user use.

View file

@ -1,15 +0,0 @@
#. Go to the menu entry for which you have defined the custom field filter.
#. On the search bar, type anything.
#. In the filter list, you will see the line for the element you have defined.
As demo data, a custom field filter is included for sample purposes:
.. image:: ../static/src/img/ir_ui_custom_field_filter.png
Steps for trying this sample:
#. Install `contacts` module.
#. Go to *Contacts*.
#. Type "english" and you'll find the filter "Language" at the end:
.. image:: ../static/src/img/contact_search.png

View file

@ -1,3 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_ir_ui_custom_field_filter_user,ir.ui.custom.field.filter,model_ir_ui_custom_field_filter,base.group_user,1,0,0,0
access_ir_ui_custom_field_filter_system,ir.ui.custom.field.filter,model_ir_ui_custom_field_filter,base.group_system,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_ir_ui_custom_field_filter_user ir.ui.custom.field.filter model_ir_ui_custom_field_filter base.group_user 1 0 0 0
3 access_ir_ui_custom_field_filter_system ir.ui.custom.field.filter model_ir_ui_custom_field_filter base.group_system 1 1 1 1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

View file

@ -1,467 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Add custom filters for fields via UI</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="add-custom-filters-for-fields-via-ui">
<h1 class="title">Add custom filters for fields via UI</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/server-ux/tree/12.0/base_search_custom_field_filter"><img alt="OCA/server-ux" src="https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/server-ux-12-0/server-ux-12-0-base_search_custom_field_filter"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/250/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows to define custom filters in the search views for an specific
field belonging to the document or any other related document.</p>
<p>This nature makes the definition quite technical, but once done, it adds the
element in the UI for regular user use.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id3">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id4">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id5">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id6">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#id1">Configuration</a></h1>
<ol class="arabic simple">
<li>Go to <em>Settings &gt; Technical &gt; User Interface &gt; Custom Field Filters</em>.</li>
<li>Create a new record, and define following information:<ul>
<li>The <strong>Model</strong> for which you are defining the filter. It will appear in all
the search views of this model.</li>
<li>The label you want to see on the search line on the <strong>Name</strong> field. This
field allows translations for proper UI in different languages.</li>
<li>The <strong>Expression</strong>, which is the field chain string with dot notation.
Examples: <cite>product_id</cite>, <cite>product_id.seller_ids.name</cite>, <cite>partner_id.lang</cite>.</li>
<li>Optionally, you can fill <strong>Position After</strong> for indicating after which
existing field (technical name) the filter will appear. If empty or not
found, the filter will be added at the end.</li>
</ul>
</li>
<li>You can reorder records for determining sorting for multiple filters for the
same model with the arrow handle in the left part.</li>
</ol>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
<ol class="arabic simple">
<li>Go to the menu entry for which you have defined the custom field filter.</li>
<li>On the search bar, type anything.</li>
<li>In the filter list, you will see the line for the element you have defined.</li>
</ol>
<p>As demo data, a custom field filter is included for sample purposes:</p>
<img alt="https://raw.githubusercontent.com/OCA/server-ux/12.0/base_search_custom_field_filter/static/src/img/ir_ui_custom_field_filter.png" src="https://raw.githubusercontent.com/OCA/server-ux/12.0/base_search_custom_field_filter/static/src/img/ir_ui_custom_field_filter.png" />
<p>Steps for trying this sample:</p>
<ol class="arabic simple">
<li>Install <cite>contacts</cite> module.</li>
<li>Go to <em>Contacts</em>.</li>
<li>Type “english” and youll find the filter “Language” at the end:</li>
</ol>
<img alt="https://raw.githubusercontent.com/OCA/server-ux/12.0/base_search_custom_field_filter/static/src/img/contact_search.png" src="https://raw.githubusercontent.com/OCA/server-ux/12.0/base_search_custom_field_filter/static/src/img/contact_search.png" />
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-ux/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/server-ux/issues/new?body=module:%20base_search_custom_field_filter%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id4">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id5">Authors</a></h2>
<ul class="simple">
<li>Tecnativa</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id6">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
<li>Carlos Dauden</li>
<li>Pedro M. Baeza</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/pedrobaeza"><img alt="pedrobaeza" src="https://github.com/pedrobaeza.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-ux/tree/12.0/base_search_custom_field_filter">OCA/server-ux</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View file

@ -1,22 +0,0 @@
odoo.define('base_search_custom_field_filter.search_inputs_related_field', function (require) {
"use strict";
var core = require('web.core');
var search_inputs = require('web.search_inputs');
var ManyToOneField = core.search_widgets_registry.map.many2one;
search_inputs.Field.include({
make_domain: function (name, operator, facetValue) {
var name_n = this.attrs.custom_field_filter || name;
return this._super(name_n, operator, facetValue);
},
});
ManyToOneField.include({
make_domain: function (name, operator, facetValue) {
var name_n = this.attrs.custom_field_filter || name;
return this._super(name_n, operator, facetValue);
},
});
});

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="assets_backend" inherit_id="web.assets_backend">
<xpath expr=".">
<script src="/base_search_custom_field_filter/static/src/js/search_input.js"></script>
</xpath>
</template>
</odoo>

View file

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 Tecnativa - Pedro M. Baeza
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_ir_ui_custom_field_filter_form" model="ir.ui.view">
<field name="model">ir.ui.custom.field.filter</field>
<field name="arch" type="xml">
<tree editable="bottom">
<field name="sequence" widget="handle" />
<field name="model_id" />
<field name="name" />
<field name="expression" />
<field name="position_after" />
</tree>
</field>
</record>
<act_window
id="action_ir_ui_custom_field_filter"
name="Custom Field Filters"
res_model="ir.ui.custom.field.filter"
/>
<menuitem
id="menu_ir_ui_custom_field_filter"
action="action_ir_ui_custom_field_filter"
parent="base.next_id_2"
sequence="6"
/>
</odoo>

View file

@ -0,0 +1,50 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
Default product image v16
===========================
You my have some issue to customize the default image of your products,
this module will helpe you to add default image (your logo or custom image) to your products.
Installation
============
* Just install the module.
Configuration
=============
* Go to Setting
* Choose your image in "default image" section
* Enjoy the module !
Company
-------
* `Imal-Tech <https://imal-tech.com/>`__
Credits
-------
* Developers:
Version 16: Imal-tech team @imaltech
Contacts
--------
* Mail Contact : contact@imal-tech.com
* Website : https://imal-tech.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://imal-tech.com/wp-content/uploads/2021/01/imal-tech-logo-.gif
:target: https://imal-tech.com
This module is maintained by Imal-tech.
For support and more information, please visit `Our Website <https://imal-tech.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

View file

@ -1,2 +1,3 @@
# -*- coding: utf-8 -*-
from . import main
from . import models

View file

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
{
'name': 'Default Product Image',
'description': """
This module will help you to add default image to products with no images.
""",
'summary': 'Module to help you add default image to products',
'author': 'Imal-Tech',
'website': 'https://www.imal-tech.com',
'maintainer': 'Imal-Tech',
'category': 'Sales',
'version': '16.0.1.0.0',
'depends': ['base', 'sale_management'],
'data': [
'views/res_config_views.xml',
],
'license': 'LGPL-3',
'images': ['static/description/banner.gif'],
'installable': True,
'application': False,
'auto_install': False,
}

View file

@ -0,0 +1,49 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * default_product_image
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-15 15:43+0000\n"
"PO-Revision-Date: 2022-11-15 15:43+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: default_product_image
#: model_terms:ir.ui.view,arch_db:default_product_image.res_config_settings_view_form_default_image
msgid ""
"<span class=\"fa fa-lg fa-image\" title=\"Values set here are website-"
"specific.\"/>"
msgstr ""
#. module: default_product_image
#: model_terms:ir.ui.view,arch_db:default_product_image.res_config_settings_view_form_default_image
msgid "Add the default image to products."
msgstr "Ajoutez l'image par défaut aux produits."
#. module: default_product_image
#: model:ir.model,name:default_product_image.model_res_config_settings
msgid "Config Settings"
msgstr "Paramètres de config"
#. module: default_product_image
#: model:ir.model.fields,field_description:default_product_image.field_res_config_settings__product_default_image
#: model_terms:ir.ui.view,arch_db:default_product_image.res_config_settings_view_form_default_image
msgid "Default Image"
msgstr "Image par défaut"
#. module: default_product_image
#: model_terms:ir.ui.view,arch_db:default_product_image.res_config_settings_view_form_default_image
msgid "Default image"
msgstr "Image par défaut"
#. module: default_product_image
#: model:ir.model,name:default_product_image.model_product_template
msgid "Product"
msgstr "Article"

View file

@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
from . import res_config
from . import product_template

View file

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from odoo import models, fields, api, tools
class ProductTemplate(models.Model):
""" Inherit Product Template Settings to add default image product from setting """
_inherit = "product.template"
@api.model_create_multi
def create(self, vals_list):
for val_list in vals_list:
if not val_list['image_1920']:
product_default_image = self.env['ir.config_parameter'].sudo().get_param(
'res.config.settings.product_default_image')
if product_default_image:
val_list['image_1920'] = product_default_image
return super(ProductTemplate, self).create(vals_list)

View file

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
from odoo import models, fields, _, api
class ResConfig(models.TransientModel):
""" Inherit Res Config Settings to add default image product field """
_inherit = 'res.config.settings'
product_default_image = fields.Binary(string="Default Image")
@api.model
def get_values(self):
res = super(ResConfig, self).get_values()
res.update(
product_default_image=self.env['ir.config_parameter'].sudo().get_param(
'res.config.settings.product_default_image'),
)
return res
def set_values(self):
super(ResConfig, self).set_values()
param = self.env['ir.config_parameter'].sudo()
param.set_param('res.config.settings.product_default_image', self.product_default_image)

View file

@ -0,0 +1 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View file

@ -0,0 +1,432 @@
<div class="container" style="padding:1rem !important; margin-bottom:1rem !important">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 d-flex justify-content-between"
style="border-bottom:1px solid #d5d5d5">
<div class="my-3">
<a href="https://www.imal-tech.com/" target="_blank"><img
src="https://imal-tech.com/wp-content/uploads/2021/01/imal-tech-logo-.gif"
style="width:auto !important; height:40px !important"></a>
</div>
<div class="my-3 d-flex align-items-center">
<div style="background-color:#5f5e97 !important; color:#fff !important; font-weight:600 !important; padding:5px 15px 8px !important; margin:0 5px !important">
<i class="fa fa-check mr-1"></i>Community
</div>
<div style="background-color:#875A7B !important; color:#fff !important; font-weight:600 !important; padding:5px 15px 8px !important; margin:0 5px !important">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
</div>
</div>
</div>
</div>
<!-- Explore this module -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="font-weight: 600;text-align: center;width: 100%; color:#283374;"><i class="fa fa-compass mr-2"></i>Key
Explore this module</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #9D3E8F;width: 5%;"/>
</div>
<div class="col-md-6">
<a href="#overview" style="text-decoration:none !important">
<div class="row"
style="background-color:#f5f2f5 !important; border-radius:10px !important; margin:1rem !important; padding:1.5em !important; height:100px !important">
<div class="col-8">
<h3 style="font-family:'Montserrat', sans-serif !important; font-weight:600 !important; color:#283374 !important; font-size:1.2rem !important">
Overview</h3>
<p style="font-family:'Roboto', sans-serif !important; font-weight:400 !important; color:#283374 !important; font-size:0.9rem !important">
Learn more about this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color:#283374 !important"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#features" style="text-decoration:none !important">
<div class="row"
style="background-color:#f5f2f5 !important; border-radius:10px !important; margin:1rem !important; padding:1.5em !important; height:100px !important">
<div class="col-8">
<h3 style="font-family:'Montserrat', sans-serif !important; font-weight:600 !important; color:#283374 !important; font-size:1.2rem !important">
Features</h3>
<p style="font-family:'Roboto', sans-serif !important; font-weight:400 !important; color:#283374 !important; font-size:0.9rem !important">
View features of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color:#283374 !important"></i>
</div>
</div>
</a>
</div>
<div class="col-md-6">
<a href="#screenshots" style="text-decoration:none !important">
<div class="row"
style="background-color:#f5f2f5 !important; border-radius:10px !important; margin:1rem !important; padding:1.5em !important; height:100px !important">
<div class="col-8">
<h3 style="font-family:'Montserrat', sans-serif !important; font-weight:600 !important; color:#283374 !important; font-size:1.2rem !important">
Screenshots</h3>
<p style="font-family:'Roboto', sans-serif !important; font-weight:400 !important; color:#283374 !important; font-size:0.9rem !important">
See key screenshots of this module</p>
</div>
<div class="col-4 text-right d-flex justify-content-end align-items-center">
<i class="fa fa-chevron-right" style="color:#283374 !important"></i>
</div>
</div>
</a>
</div>
</div>
<!-- Overview -->
<div class="row" id="overview">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="font-weight: 600;text-align: center;width: 100%; color:#283374;"><i class="fa fa-pie-chart mr-2"></i>Key
Overview</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #9D3E8F;width: 5%;"/>
</div>
<div class="col-mg-12 pl-3">
<h3 style="font-size: 18px; margin-top: 8px; position: relative;"> This module will help you to add default image to products with no images.
</h3>
</div>
</div>
<!-- Features -->
<div class="row" id="features">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="font-weight: 600;text-align: center;width: 100%; color:#283374;"><i class="fa fa-star mr-2"></i>Key
Features</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #9D3E8F;width: 5%;"/>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<i class="fa fa-check-circle-o fa-2x" style="width:40px; color:#9D3E8F"></i>
</div>
<div>
<h4 style="font-family:'Roboto', sans-serif !important; font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
Community &amp; Enterprise Support</h4>
<p style="font-family:'Roboto', sans-serif !important; font-weight:400 !important; color:#282F33 !important; font-size:1rem !important">
Available in Odoo 16.0 Community and Enterprise.</p>
</div>
</div>
<div class="col-md-6 pl-3 py-3 d-flex">
<div>
<i class="fa fa-check-circle-o fa-2x" style="width:40px; color:#9D3E8F"></i>
</div>
<div>
<h4 style="font-family:'Roboto', sans-serif !important; font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
Config default product</h4>
<p style="font-family:'Roboto', sans-serif !important; font-weight:400 !important; color:#282F33 !important; font-size:1rem !important">
Product images will automatically change when you change Default Product Image in the sale configuration page.</p>
</div>
</div>
</div>
<!-- Screenshots -->
<div class="row" id="screenshots">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="font-weight: 600;text-align: center;width: 100%; color:#283374;"><i class="fa fa-image mr-2"></i>Key
Screenshots</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #9D3E8F;width: 5%;"/>
</div>
<div class="col-lg-12 my-2">
<h4 class="mt-2"
style="font-family:'Roboto', sans-serif !important; font-weight:600 !important; color:#282F33 !important; font-size:1.3rem !important">
Setting</h4>
<img src="images/Imal-Tech_default_product_setting.png"
class="img-responsive img-thumbnail border" width="100%" height="auto">
</div>
</div>
<!-- Our Services -->
<section class="row" style="padding: 2rem 3rem 1rem;margin:0px">
<h2 style="font-weight: 600;margin-bottom: 20px;text-align: center;width: 100%; color:#283374;"><i
class="fa fa-tasks mr-2"></i>Our
Services </h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #9D3E8F;width: 5%;">
<div class="row" style=" display: flex; justify-content: center; flex-wrap: wrap;width: 100%; ">
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"><a
href="#" target="_blank"> <img
src="images/odoo_customization.png"
style="width: 120%;border-radius: 100%;"/> </a></div>
<h3 class="oe_slogan"
style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="#" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Odoo Customization </a></h3>
</div>
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"><a
href="#" target="_blank"> <img
src="images/odoo_implementation.png"
style="width: 120%;border-radius: 100%;"/> </a></div>
<h3 class="oe_slogan"
style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="#" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Odoo Implementation </a></h3>
</div>
<div class="col-md-2 col-sm-6 col-xs-12">
<div style="width:75px;height:75px;background:#fff; border-radius:100%;margin: auto;"><a
href="#" target="_blank"> <img
src="images/odoo_support.png"
style="width: 120%;border-radius: 100%;"/> </a></div>
<h3 class="oe_slogan"
style="font-weight: 800;text-align: center;font-size: 14px;width: 100%;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;">
<a href="#" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Odoo Support </a></h3>
</div>
</div>
</section>
<!-- Our Industries -->
<section class="row" style="padding: 2rem 3rem 1rem;margin:0px">
<div class="row" style="margin: 0">
<h2 style="font-weight: 600;margin-bottom: 20px;text-align: center;width: 100%; color:#283374;"><i
class="fa fa-cogs mr-2"></i>Our
Industries</h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #9D3E8F;width: 5%;">
<!-- <div style="display:flex;justify-content: space-between;flex-wrap:wrap;"> -->
<div class="row" style="width: 100%">
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#9D3E8F; border-radius:100%;float: left;text-align: left;">
<a href="#" target="_blank"> <img
src="images/service_managment.png"
alt="Service Management"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="#" target="_blank"
style="list-style: none; color:#000; text-decoration: none;font-family: 'Montserrat',sans-serif;">
Service Management </a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;">
Keep track of services and invoice accordingly. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#9D3E8F; border-radius:100%;float: left;text-align: left;">
<a href="#"
target="_blank"> <img
src="images/hotel.png"
alt="Odoo Industry" style=" border-radius: 100%;width:100%;"/>
</a></div>
</div>
<div style="width:70%;float:left;" style=" margin-bottom: 10px; ">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="#"
target="_blank"
style="list-style: none; color:#000; text-decoration: none;font-family: 'Montserrat',sans-serif;">
Hotel Management</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;font-family: 'Montserrat',sans-serif;">
An all-inclusive hotel management application. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#9D3E8F; border-radius:100%;float: left;text-align: left;">
<a href="#" target="_blank">
<img src="images/manufacturing.png"
alt="Odoo Manufacturing"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="#" target="_blank"
style="list-style: none; color:#000; text-decoration: none;font-family: 'Montserrat',sans-serif;">
Manufacturing</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;font-family: 'Montserrat',sans-serif;">
Plan, track and schedule your operations. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#9D3E8F; border-radius:100%;float: left;text-align: left;">
<a href="#" target="_blank"> <img
src="images/restaurant.png"
alt="Odoo Restaurant"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="#" target="_blank"
style="list-style: none; color:#000; text-decoration: none;font-family: 'Montserrat',sans-serif;">
Restaurant</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px;font-family: 'Montserrat',sans-serif;">
Run your bar or restaurant methodical. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#9D3E8F; border-radius:100%;float: left;text-align: left;">
<a href="#" target="_blank"> <img
src="images/pos.png"
alt="Odoo POS"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 0px;margin-left: 16px;">
<a href="#" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
POS</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;">
Mobile friendly, awe-inspiring product pages. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#9D3E8F; border-radius:100%;float: left;text-align: left;">
<a href="#" target="_blank">
<img src="images/e-commerce.png"
alt="Odoo E-commerce"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="#" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
E-commerce & Website</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;">
An all-inclusive hotel management application. </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#9D3E8F; border-radius:100%;float: left;text-align: left;">
<a href="#" target="_blank">
<img src="images/agriculture.png"
alt="Odoo Agriculture"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="#" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Agriculture management</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;">
Run efficiently your agriculture's products & farms </h3>
</div>
</div>
<div class="col-md-4 col-sm-6 col-xs-12" style=" margin-bottom: 10px; ">
<div>
<div style="width:75px;height:75px;background:#9D3E8F; border-radius:100%;float: left;text-align: left;">
<a href="#" target="_blank"> <img
src="images/e-learning.png"
alt="Odoo Education"
style=" border-radius: 100%;width:100%;"/> </a></div>
</div>
<div style="width:70%;float:left;">
<h3 class="oe_slogan"
style=" text-align: left;font-size: 14px;font-weight:800;width: auto;margin: 0;margin-top: 14px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 4px;margin-left: 16px;">
<a href="#" target="_blank"
style="list-style: none; color:#000; text-decoration: none; font-family: 'Montserrat',sans-serif;">
Education</a></h3>
<h3 class="oe_slogan"
style=" text-align: left;font-size: 12px;width: auto;margin: 0;margin-top:5px;color: #000 !important;margin-top: 5px;opacity: 1 !important;line-height: 17px;float: left;margin-top: 5px;margin-left: 16px; font-family: 'Montserrat',sans-serif;">
A Collaborative platform for educational management. </h3>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="oe_container">
<center>
<div class="col-md-12" style="margin: auto !important;
width: 70%;
padding: 30px;">
<h2 style="font-weight: 600;text-align: center;width: 100%; color:#283374; color:#283374;"><i
class="fa fa-headphones mr-2"></i>Need Any
Help? </h2>
<hr style="margin-top: 0px;margin-bottom: 2%;border: 0;text-align: center;border-top: 3px solid #9D3E8F;width: 5%;">
<h4 style="font-size:16px;"> If you have anything to share with us based on your use of this module, please
let us know. We are ready to offer our support. </h4>
</div>
</center>
</section>
</div>
<!-- Contact us -->
<div class="row d-flex justify-content-center align-items-center" style="max-width:1540px; margin:0 auto">
<div class="col-lg-3 shadow mt-2"
style="padding:5rem 2rem 2rem; border-radius:10px; margin-right:3rem; border-top:7px solid #9D3E8F; height:300px">
<h5 class="font-weight-bold" style="font-family:Roboto, 'sans-serif'">Visit us</h5>
<p class="mb-4" style="color:#808e9b; font-size:0.9rem">Visit our website for more
information.</p>
<a href="https://www.imal-tech.com/" target="_blank">
<span href="https://imal-tech.com" target="_blank" class="btn btn-block mb-2 deep_hover"
style="text-decoration:none; background-color:#9D3E8F; color:#FFF; border-radius:4px">www.imal-tech.com</span>
</a>
</div>
<div class="col-lg-3 shadow mt-2"
style="padding:5rem 2rem 2rem; border-radius:10px; margin-right:3rem; border-top:7px solid #283374; height:330px">
<h5 class="font-weight-bold" style="font-family:Roboto, 'sans-serif'">Write to us</h5>
<p class="mb-4" style="color:#808e9b; font-size:0.9rem">Do you have any queries regarding our
products &amp; services? Let us know.</p>
<a href="mailto:contact@imal-tech.com" target="_blank" class="btn btn-block mb-2 deep_hover"
style="text-decoration:none; background-color:#283374; color:#FFF; border-radius:4px">contact@imal-tech.com</a>
</div>
<div class="col-lg-3 shadow mt-2"
style="padding:5rem 2rem 2rem; border-radius:10px; margin-right:3rem; border-top:7px solid #9D3E8F; height:300px">
<h5 class="font-weight-bold" style="font-family:Roboto, 'sans-serif'">Follow Us</h5>
<p class="mb-4" style="color:#808e9b; font-size:0.9rem">Follow us on social media for latest
updates.</p>
<section class="oe_container" style="padding: 0% 0% 6% 0%;">
<div class="oe_slogan" style="margin-bottom: 0px;">
<div style=" display: flex; justify-content: center; flex-wrap: wrap; ">
</div>
<br>
<div style=" display: flex; justify-content: center; flex-wrap: wrap; ">
<a href="https://www.linkedin.com/company/imal-tech" target="_blank"><i class="fa fa-2x fa-linkedin"
style="color:white;background: #0a66c2;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a>
</td>
<a href="https://www.facebook.com/IMAL-TECH-111415158048241" target="_blank"><i
class="fa fa-2x fa-facebook"
style="color:white;background: #3b5998;width:35px; height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a>
</td>
<a href="https://www.youtube.com/channel/UC6CVulVEhO32fh5Jf-jHlFg" target="_blank"><i
class="fa fa-2x fa-youtube"
style="color:white;background: #ac0f18;width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a>
</td>
<a href="https://www.instagram.com/imal_tech" target="_blank"><i
class="fa fa-2x fa-instagram"
style="color:white;background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);width:35px;height: 35px;padding-top: 7px;font-size: 21px;margin-right: 6px;border-radius: 100%;"></i></a>
</td>
</div>
</div>
</section>
</div>
<br/>
<br/>
<a href="https://www.imal-tech.com/" target="_blank"><img
src="https://imal-tech.com/wp-content/uploads/2021/01/imal-tech-logo-.gif"
style="width: 190px; margin-bottom: 25px;margin-top: 30px;" class="center-block"></a>
<!-- End of Contact Cards -->
</div>
<br/>
<br/>

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Res Config settings form inherit -->
<record id="res_config_settings_view_form_default_image" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.sale.frequent</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="10"/>
<field name="inherit_id" ref="sale.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@data-key='sale_management']" position="inside">
<h2>Default image</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box" id="variant_options">
<label string="Default Image" for="product_default_image"/>
<span class="fa fa-lg fa-image" title="Values set here are website-specific."/>
<div class="text-muted">
Add the default image to products.
</div>
<field name="product_default_image" type="base64" widget="image" class="oe_avatar"/>
</div>
</div>
</xpath>
</field>
</record>
</data>
</odoo>

View file

@ -1,35 +0,0 @@
.. image:: https://itpp.dev/images/infinity-readme.png
:alt: Tested and maintained by IT Projects Labs
:target: https://itpp.dev
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://opensource.org/licenses/MIT
:alt: License: MIT
=======================
POS: show product qty
=======================
Adds available quantity at products in POS
Module potentialy isn't compatible with modules that overrides `get_price` method in JS
Questions?
==========
To get an assistance on this module contact us by email :arrow_right: help@itpp.dev
Contributors
============
* `Ivan Yelizariev <https://it-projects.info/team/yelizariev>`__
Further information
===================
Odoo Apps Store: https://apps.odoo.com/apps/modules/12.0/pos_product_available/
Notifications on updates: `via Atom <https://github.com/it-projects-llc/pos_addons/commits/12.0/pos_product_available.atom>`_, `by Email <https://blogtrottr.com/?subscribe=https://github.com/it-projects-llc/pos_addons/commits/12.0/pos_product_available.atom>`_
Tested on `Odoo 12.0 <https://github.com/odoo/odoo/commit/53dcdd5a9e22429a9638f68674264436ce21e42b>`_

View file

@ -1,3 +0,0 @@
# License MIT (https://opensource.org/licenses/MIT).
from . import models

View file

@ -1,30 +0,0 @@
# Copyright 2014-2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2017 Gabbasov Dinar <https://it-projects.info/team/GabbasovDinar>
# Copyright 2018-2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# Copyright 2018 Ildar Nasyrov <https://it-projects.info/team/iledarn>
# License MIT (https://opensource.org/licenses/MIT).
{
"name": """POS: show product qty""",
"summary": """Adds available quantity at products in POS""",
"category": "Point Of Sale",
# "live_test_url": "http://apps.it-projects.info/shop/product/DEMO-URL?version={ODOO_BRANCH}",
"images": ["images/pos_product_available.jpg"],
"version": "12.0.1.1.1",
"application": False,
"author": "IT-Projects LLC, Ivan Yelizariev",
"support": "apps@itpp.dev",
"website": "https://apps.odoo.com/apps/modules/12.0/pos_product_available/",
"license": "Other OSI approved licence", # MIT
# "price": 9.00,
# "currency": "EUR",
"depends": ["point_of_sale", "stock"],
"external_dependencies": {"python": [], "bin": []},
"data": ["data.xml", "views/views.xml"],
"qweb": ["static/src/xml/pos.xml"],
"post_load": None,
"pre_init_hook": None,
"post_init_hook": None,
"uninstall_hook": None,
"auto_install": False,
"installable": True,
}

View file

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--Copyright 2014-2016 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
Copyright 2018 Gabbasov Dinar <https://it-projects.info/team/GabbasovDinar>
Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
Copyright 2018 Ildar Nasyrov <https://it-projects.info/team/iledarn>
License MIT (https://opensource.org/licenses/MIT). -->
<odoo>
<template id="assets_backend" name="pos assets" inherit_id="point_of_sale.assets">
<xpath expr="." position="inside">
<script
type="text/javascript"
src="/pos_product_available/static/src/js/pos.js"
/>
</xpath>
<xpath expr="//link[@id='pos-stylesheet']" position="after">
<link
rel="stylesheet"
href="/pos_product_available/static/src/css/pos.css"
/>
</xpath>
</template>
<template
id="assets_backend_web"
name="pos_product_available_backend_assets"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<script
type="text/javascript"
src="/pos_product_available/static/src/js/test_pos_quantities.js"
/>
</xpath>
</template>
</odoo>

View file

@ -1,46 +0,0 @@
`1.1.1`
-------
- [FIX] product qty available wrong rounding and overrided 'get_price' method in pos.js
`1.1.0`
-------
- **New:** Added option to show product quantities
`1.0.7`
-------
- **Fix:** Non rounded long values of quantities
`1.0.6`
-------
- **FIX:** Added compatibility with pos_multi_session
`1.0.5`
-------
- **FIX:** Product quantities representation according to the set location
- **FIX:** Product quantities representation only for stockable products
`1.0.4`
-------
- [FIX] incorrect products quantity numbers with pos_cache module.
`1.0.3`
-------
- [FIX] compatibility with pos_cache module. Thanks to MindAndGo.
`1.0.2`
-------
- [FIX] update product counter when sale via invoice
`1.0.1`
-------
- Show quantity related to POS's stock location only.

View file

@ -1,8 +0,0 @@
=======================
POS: show product qty
=======================
Installation
============
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way

View file

@ -1,47 +0,0 @@
<section class="oe_container"><div class="oe_row oe_spaced"> <div class="oe_span12">
</div>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<img src="screenshot.png"/>
</div>
</div>
<div class="oe_span6">
<p class="oe_mt32">
Adds available quantity at order panel
</p>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_span6">
<p class="oe_mt32">
Adds available quantity at products.
</p>
</div>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<img src="screenshot-2.png"/>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2>Usage</h2>
<p class="oe_mt32">
There no any settings. Just install the module and start POS.
</p>
<p class="oe_mt32">
Works in offline mode.
</p>
</div>
</div>
</section>

View file

@ -1 +0,0 @@
slogan: Let a cashier know how many products are available

View file

@ -1,72 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_product_available
#
# Translators:
# Translation Bot <i18n-bot@it-projects.info>, 2017
# Ermin Trevisan <trevi@twanda.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-27 23:49+0000\n"
"PO-Revision-Date: 2018-04-27 23:49+0000\n"
"Last-Translator: Ermin Trevisan <trevi@twanda.com>, 2018\n"
"Language-Team: German (https://www.transifex.com/it-projects-llc/teams/76080/"
"de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_product_available
#. openerp-web
#: code:addons/pos_product_available/static/src/xml/pos.xml:21
#, python-format
msgid "(of"
msgstr "(von "
#. module: pos_product_available
#. openerp-web
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:13
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:72
#, python-format
msgid ""
"<p>Click to start the point of sale interface. It <b>runs on tablets</b>, "
"laptops, or industrial hardware.</p><p>Once the session launched, the system "
"continues to run without an internet connection.</p>"
msgstr ""
"<p>Anklicken, um das POS-System zu starten. Es <b>läuft auf Tablets</b>, "
"Laptops, oder industrieller Hardware.</p><p>Sobald eine Sitzung gestartet "
"wurde, funktioniert das System auch ohne Internet-Verbindung.</p>"
#. module: pos_product_available
#. openerp-web
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:48
#, python-format
msgid "Click the payment method"
msgstr ""
#. module: pos_product_available
#. openerp-web
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:65
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:68
#, python-format
msgid "Close POS"
msgstr ""
#. module: pos_product_available
#. openerp-web
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:42
#, python-format
msgid "Open the payment screen"
msgstr ""
#. module: pos_product_available
#. openerp-web
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:87
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:92
#, python-format
msgid "Ready to launch your <b>point of sale</b>? <i>Click here</i>."
msgstr "Bereit, Ihren <b>Point of Sale</b>zu starten? <i>Klicken Sie hier</i>."

View file

@ -1,73 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * pos_product_available
#
# Translators:
# charles paul requena palomino <rcharles84@gmail.com>, 2018
# Alexandr Frrost <alexandr.frrost@gmail.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-27 23:49+0000\n"
"PO-Revision-Date: 2018-04-27 23:49+0000\n"
"Last-Translator: Alexandr Frrost <alexandr.frrost@gmail.com>, 2018\n"
"Language-Team: Spanish (https://www.transifex.com/it-projects-llc/"
"teams/76080/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: pos_product_available
#. openerp-web
#: code:addons/pos_product_available/static/src/xml/pos.xml:21
#, python-format
msgid "(of"
msgstr ""
#. module: pos_product_available
#. openerp-web
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:13
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:72
#, python-format
msgid ""
"<p>Click to start the point of sale interface. It <b>runs on tablets</b>, "
"laptops, or industrial hardware.</p><p>Once the session launched, the system "
"continues to run without an internet connection.</p>"
msgstr ""
"<p>Haga clic para iniciar la interfaz del punto de venta. <b>Se ejecuta en "
"tabletas</b>, computadoras portátiles o hardware industrial.</p><p> Una vez "
"que se inicia la sesión, el sistema continúa ejecutándose sin conexión a "
"Internet.</p>"
#. module: pos_product_available
#. openerp-web
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:48
#, python-format
msgid "Click the payment method"
msgstr ""
#. module: pos_product_available
#. openerp-web
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:65
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:68
#, python-format
msgid "Close POS"
msgstr ""
#. module: pos_product_available
#. openerp-web
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:42
#, python-format
msgid "Open the payment screen"
msgstr ""
#. module: pos_product_available
#. openerp-web
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:87
#: code:addons/pos_product_available/static/src/js/test_pos_quantities.js:92
#, python-format
msgid "Ready to launch your <b>point of sale</b>? <i>Click here</i>."
msgstr "¿Listo para lanzar su <b>punto de venta</b>? <i>Haga clic aquí</i>."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 KiB

View file

@ -1,2 +0,0 @@
# License MIT (https://opensource.org/licenses/MIT).
from . import models

View file

@ -1,12 +0,0 @@
# Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# License MIT (https://opensource.org/licenses/MIT).
from odoo import fields, models
class PosConfig(models.Model):
_inherit = "pos.config"
show_qtys = fields.Boolean(
"Show Product Qtys", help="Show Product Qtys in POS", default=True
)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -1,145 +0,0 @@
<section class="container">
<div class="row">
<div class="col-md-offset-1 col-md-8 mb64 mt64">
<div class="">
<h2 class="display-3">POS: show product qty</h2>
<h4 class="text-default">Let a cashier know how many products are available</h4>
<p class="text-default mt16">Version: v<b>12.0</b>.1.1.1</p>
</div>
</div>
<div class="col-md-3 text-right">
<p>
<img src="https://itpp.dev/images/favicon.png"/>
<br/>Tested and maintained by
<br/><b>IT Projects Labs</b>
<br/>Assitance: <a href="mailto:help@itpp.dev">help@itpp.dev</a>
</p>
</div>
</div>
</section>
<section class="oe_container"><div class="oe_row oe_spaced"> <div class="oe_span12">
</div>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<img src="screenshot.png"/>
</div>
</div>
<div class="oe_span6">
<p class="oe_mt32">
Adds available quantity at order panel
</p>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_span6">
<p class="oe_mt32">
Adds available quantity at products.
</p>
</div>
<div class="oe_span6">
<div class="oe_demo oe_picture oe_screenshot">
<img src="screenshot-2.png"/>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2>Usage</h2>
<p class="oe_mt32">
There no any settings. Just install the module and start POS.
</p>
<p class="oe_mt32">
Works in offline mode.
</p>
</div>
</div>
</section>
<section class="container text-center">
<div class="mt-4 mb-3">
<h2>Let our expertise work for you!</h2>
<h4 class="d-none d-md-block">(Doors and windows below are clickable)</h4>
<div class="mb32 d-md-none">
<ul class="list-unstyled">
<li><a target="_blank" href="https://apps.odoo.com/apps/browse?repo_maintainer_id=59928">All modules</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/browse?price=Free&order=Downloads&repo_maintainer_id=59928">Free Modules</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/category/Point%20of%20Sale/browse?repo_maintainer_id=59928">All POS modules</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/category/Discuss/browse?repo_maintainer_id=59928">All Mail modules</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/category/Website/browse?repo_maintainer_id=59928">All Website modules</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/category/eCommerce/browse?repo_maintainer_id=59928">All eCommerce modules</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=sync+studio&repo_maintainer_id=59928">Sync Studio</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/14.0/openapi/">REST API</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/14.0/base_automation_webhook/">Webhooks</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/14.0/pos_product_available/">POS: show product qty</a></li>
<li><a target="_blank" href="https://apps.odoo.com/apps/modules/14.0/web_login_background/">Web Login Background</a></li>
</ul>
</div>
<div class="mb64 d-none d-xl-block">
<img class="img img-responsive" src="https://itpp.dev/images/apps/;-)/itpp-labs-1100.jpg" usemap="#itpp-xl" />
<map name="itpp-xl">
<area alt="Free Modules" target="_blank" href="https://apps.odoo.com/apps/browse?price=Free&order=Downloads&repo_maintainer_id=59928" shape="rect" class="" coords="900,220,1080,625" />
<area alt="Sync Studio" target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=sync+studio&repo_maintainer_id=59928" shape="rect" class="" coords="552,186,721,274" />
<area alt="REST API" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/openapi/" shape="rect" class="" coords="646,279,720,365" />
<area alt="Webhooks" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/base_automation_webhook/" shape="rect" class="" coords="646,370,720,458" />
<area alt="POS: show product qty" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/pos_product_available/" shape="rect" class="" coords="82,373,251,459" />
<area alt="All modules" target="_blank" href="https://apps.odoo.com/apps/browse?repo_maintainer_id=59928" shape="rect" class="" coords="326,267,381,456" />
<area alt="All POS modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Point%20of%20Sale/browse?repo_maintainer_id=59928" shape="rect" class="" coords="82,191,154,276" />
<area alt="All Mail modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Discuss/browse?repo_maintainer_id=59928" shape="rect" class="" coords="82,282,155,368" />
<area alt="All Website modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Website/browse?repo_maintainer_id=59928" shape="rect" class="" coords="176,282,250,368" />
<area alt="All eCommerce modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/eCommerce/browse?repo_maintainer_id=59928" shape="rect" class="" coords="175,189,250,275" />
<area alt="Ivan Yelizariev" target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=Ivan+Yelizariev&repo_maintainer_id=59928" shape="rect" class="" coords="554,280,625,456" />
<area alt="Web Login Background" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/web_login_background/" shape="rect" class="" coords="420,267,477,456" />
</map>
</div>
<div class="mb64 d-none d-lg-block d-xl-none">
<img class="img img-responsive" src="https://itpp.dev/images/apps/;-)/itpp-labs-930.jpg" usemap="#itpp-lg" />
<map name="itpp-lg">
<area alt="Free Modules" target="_blank" href="https://apps.odoo.com/apps/browse?price=Free&order=Downloads&repo_maintainer_id=59928" shape="rect" class="" coords="760,186,913,528" />
<area alt="Sync Studio" target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=sync+studio&repo_maintainer_id=59928" shape="rect" class="" coords="466,157,609,231" />
<area alt="REST API" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/openapi/" shape="rect" class="" coords="546,235,608,308" />
<area alt="Webhooks" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/base_automation_webhook/" shape="rect" class="" coords="546,312,608,387" />
<area alt="POS: show product qty" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/pos_product_available/" shape="rect" class="" coords="69,315,212,388" />
<area alt="All modules" target="_blank" href="https://apps.odoo.com/apps/browse?repo_maintainer_id=59928" shape="rect" class="" coords="275,225,322,385" />
<area alt="All POS modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Point%20of%20Sale/browse?repo_maintainer_id=59928" shape="rect" class="" coords="69,161,130,233" />
<area alt="All Mail modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Discuss/browse?repo_maintainer_id=59928" shape="rect" class="" coords="69,238,131,311" />
<area alt="All Website modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Website/browse?repo_maintainer_id=59928" shape="rect" class="" coords="148,238,211,311" />
<area alt="All eCommerce modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/eCommerce/browse?repo_maintainer_id=59928" shape="rect" class="" coords="147,159,211,232" />
<area alt="Ivan Yelizariev" target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=Ivan+Yelizariev&repo_maintainer_id=59928" shape="rect" class="" coords="468,236,528,385" />
<area alt="Web Login Background" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/web_login_background/" shape="rect" class="" coords="355,225,403,385" />
</map>
</div>
<div class="mb64 d-lg-none">
<img class="img img-responsive" src="https://itpp.dev/images/apps/;-)/itpp-labs-690.jpg" usemap="#itpp-md" />
<map name="itpp-md">
<area alt="Free Modules" target="_blank" href="https://apps.odoo.com/apps/browse?price=Free&order=Downloads&repo_maintainer_id=59928" shape="rect" class="" coords="564,138,677,392" />
<area alt="Sync Studio" target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=sync+studio&repo_maintainer_id=59928" shape="rect" class="" coords="346,116,452,171" />
<area alt="REST API" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/openapi/" shape="rect" class="" coords="405,175,451,228" />
<area alt="Webhooks" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/base_automation_webhook/" shape="rect" class="" coords="405,232,451,287" />
<area alt="POS: show product qty" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/pos_product_available/" shape="rect" class="" coords="51,233,157,287" />
<area alt="All modules" target="_blank" href="https://apps.odoo.com/apps/browse?repo_maintainer_id=59928" shape="rect" class="" coords="204,167,238,286" />
<area alt="All POS modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Point%20of%20Sale/browse?repo_maintainer_id=59928" shape="rect" class="" coords="51,119,96,173" />
<area alt="All Mail modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Discuss/browse?repo_maintainer_id=59928" shape="rect" class="" coords="51,176,97,230" />
<area alt="All Website modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/Website/browse?repo_maintainer_id=59928" shape="rect" class="" coords="110,176,156,230" />
<area alt="All eCommerce modules" target="_blank" href="https://apps.odoo.com/apps/modules/category/eCommerce/browse?repo_maintainer_id=59928" shape="rect" class="" coords="109,118,156,172" />
<area alt="Ivan Yelizariev" target="_blank" href="https://apps.odoo.com/apps/modules/browse?search=Ivan+Yelizariev&repo_maintainer_id=59928" shape="rect" class="" coords="347,175,392,286" />
<area alt="Web Login Background" target="_blank" href="https://apps.odoo.com/apps/modules/14.0/web_login_background/" shape="rect" class="" coords="263,167,299,286" />
</map>
</div>
</div>
</section>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

View file

@ -1,24 +0,0 @@
.pos .product .qty-tag {
position: absolute;
top: 2px;
left: 2px;
vertical-align: top;
color: white;
line-height: 13px;
background: #7f82ac;
padding: 2px 5px;
border-radius: 2px;
font-weight: bold;
}
.pos .product .qty-tag.not-available {
background: #d882ac;
}
.pos .order .orderline .qty-info {
color: #777;
font-weight: bold;
font-style: normal;
}
.pos .order .orderline .qty-info.not-available {
color: red;
}

View file

@ -1,233 +0,0 @@
/* Copyright 2014-2017 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
Copyright 2016 gaelTorrecillas <https://github.com/gaelTorrecillas>
Copyright 2016 manawi <https://github.com/manawi>
Copyright 2017 Ilmir Karamov <https://it-projects.info/team/ilmir-k>
Copyright 2018,2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
License MIT (https://opensource.org/licenses/MIT). */
odoo.define("pos_product_available.PosModel", function(require) {
"use strict";
var rpc = require("web.rpc");
var models = require("point_of_sale.models");
var field_utils = require("web.field_utils");
var PosModelSuper = models.PosModel.prototype;
models.PosModel = models.PosModel.extend({
load_server_data: function() {
var self = this;
var loaded = PosModelSuper.load_server_data.call(this);
var prod_model = _.find(this.models, function(model) {
return model.model === "product.product";
});
if (prod_model) {
prod_model.fields.push("qty_available", "type");
var context_super = prod_model.context;
prod_model.context = function(that) {
var ret = context_super(that);
ret.location = that.config.stock_location_id[0];
return ret;
};
var loaded_super = prod_model.loaded;
prod_model.loaded = function(that, products) {
loaded_super(that, products);
self.db.product_qtys = products;
};
return loaded;
}
return loaded.then(function() {
return rpc
.query({
model: "product.product",
method: "search_read",
args: [],
fields: ["qty_available", "type"],
domain: [
["sale_ok", "=", true],
["available_in_pos", "=", true],
],
context: {location: self.config.stock_location_id[0]},
})
.then(function(products) {
self.db.product_qtys = products;
});
});
},
set_product_qty_available: function(product, qty) {
product.qty_available = qty;
this.refresh_qty_available(product);
},
update_product_qty_from_order_lines: function(order) {
var self = this;
order.orderlines.each(function(line) {
var product = line.get_product();
product.qty_available = Math.round(
product.qty_available - line.get_quantity(),
{digits: [69, 3]}
);
self.refresh_qty_available(product);
});
// Compatibility with pos_multi_session
order.trigger("new_updates_to_send");
},
after_load_server_data: function() {
var self = this;
var res = PosModelSuper.after_load_server_data.apply(this, arguments);
_.each(this.db.product_qtys, function(v) {
_.extend(self.db.get_product_by_id(v.id), v);
});
return res;
},
refresh_qty_available: function(product) {
var $elem = $("[data-product-id='" + product.id + "'] .qty-tag");
$elem.html(product.rounded_qty());
if (product.qty_available <= 0 && !$elem.hasClass("not-available")) {
$elem.addClass("not-available");
}
},
push_order: function(order, opts) {
var pushed = PosModelSuper.push_order.call(this, order, opts);
if (order) {
this.update_product_qty_from_order_lines(order);
}
return pushed;
},
push_and_invoice_order: function(order) {
var invoiced = PosModelSuper.push_and_invoice_order.call(this, order);
if (order && order.get_client() && order.orderlines) {
this.update_product_qty_from_order_lines(order);
}
return invoiced;
},
});
models.Product = models.Product.extend({
get_price: function(pricelist, quantity) {
var self = this;
var date = moment().startOf("day");
// In case of nested pricelists, it is necessary that all pricelists are made available in
// the POS. Display a basic alert to the user in this case.
if (pricelist === undefined) {
// eslint-disable-next-line
alert(
"An error occurred when loading product prices. " +
"Make sure all pricelists are available in the POS."
);
}
var category_ids = [];
var category = this.categ;
while (category) {
category_ids.push(category.id);
category = category.parent;
}
/*
So, with pos_product_available it doesnt work correctly, cause
'item.product_tmpl_id || item.product_tmpl_id[0] === self.product_tmpl_id'
in this string are comparing integer with an array of two elements.
Changed: 'self.product_tmpl_id -> self.product_tmpl_id[0]',
where 'self.product_tmpl_id[0]' product template id.
By the way, here's comparing products ids.
IMPORTANT: Changed line - (!item.product_tmpl_id || item.product_tmpl_id[0] === self.product_tmpl_id[0]).
*/
var pricelist_items = _.filter(pricelist.items, function(item) {
return (
(!item.product_tmpl_id ||
item.product_tmpl_id[0] === self.product_tmpl_id[0]) &&
(!item.product_id || item.product_id[0] === self.id) &&
(!item.categ_id || _.contains(category_ids, item.categ_id[0])) &&
(!item.date_start ||
moment(item.date_start).isSameOrBefore(date)) &&
(!item.date_end || moment(item.date_end).isSameOrAfter(date))
);
});
var price = self.lst_price;
_.find(pricelist_items, function(rule) {
if (rule.min_quantity && quantity < rule.min_quantity) {
return false;
}
if (rule.base === "pricelist") {
price = self.get_price(rule.base_pricelist, quantity);
} else if (rule.base === "standard_price") {
price = self.standard_price;
}
if (rule.compute_price === "fixed") {
price = rule.fixed_price;
return true;
} else if (rule.compute_price === "percentage") {
price -= price * (rule.percent_price / 100);
return true;
}
var price_limit = price;
price -= price * (rule.price_discount / 100);
if (rule.price_round) {
// eslint-disable-next-line
price = round_pr(price, rule.price_round);
}
if (rule.price_surcharge) {
price += rule.price_surcharge;
}
if (rule.price_min_margin) {
price = Math.max(price, price_limit + rule.price_min_margin);
}
if (rule.price_max_margin) {
price = Math.min(price, price_limit + rule.price_max_margin);
}
return true;
});
// This return value has to be rounded with round_di before
// being used further. Note that this cannot happen here,
// because it would cause inconsistencies with the backend for
// pricelist that have base == 'pricelist'.
return price;
},
});
var OrderlineSuper = models.Orderline;
models.Orderline = models.Orderline.extend({
export_as_JSON: function() {
var data = OrderlineSuper.prototype.export_as_JSON.apply(this, arguments);
data.qty_available = this.product.qty_available;
return data;
},
// Compatibility with pos_multi_session
apply_ms_data: function(data) {
if (OrderlineSuper.prototype.apply_ms_data) {
OrderlineSuper.prototype.apply_ms_data.apply(this, arguments);
}
var product = this.pos.db.get_product_by_id(data.product_id);
if (product.qty_available !== data.qty_available) {
this.pos.set_product_qty_available(product, data.qty_available);
}
},
});
models.Product = models.Product.extend({
format_float_value: function(val) {
var value = parseFloat(val);
value = field_utils.format.float(value, {digits: [69, 3]});
return String(parseFloat(value));
},
/*
Commented this code, cause it works incorrect
Example: "this.format_float_value(2366) === 2"
rounded_qty: function() {
return this.format_float_value(this.qty_available);
},
*/
rounded_qty: function() {
return Math.round(this.qty_available);
},
});
});

View file

@ -1,142 +0,0 @@
/* Copyright 2018-2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
License MIT (https://opensource.org/licenses/MIT). */
odoo.define("pos_product_available.tour", function(require) {
"use strict";
var tour = require("web_tour.tour");
var core = require("web.core");
var _t = core._t;
function open_pos_neworder() {
return [
{
trigger: ".o_pos_kanban button.oe_kanban_action_button",
content: _t(
"<p>Click to start the point of sale interface. It <b>runs on tablets</b>, laptops, or industrial hardware.</p><p>Once the session launched, the system continues to run without an internet connection.</p>"
),
position: "bottom",
},
{
content: "Switch to table or make dummy action",
trigger: ".table, .order-button.selected",
position: "bottom",
timeout: 30000,
},
{
content: "waiting for loading to finish",
trigger: ".order-button.neworder-button",
},
];
}
function add_product_to_order(product_name) {
return [
{
content: "buy " + product_name,
trigger: '.product-list .product-name:contains("' + product_name + '")',
},
{
content: "the " + product_name + " have been added to the order",
trigger: '.orderline:contains("' + product_name + '")',
run: function() {
// It's a check
},
},
];
}
function payment(pay_method) {
return [
{
trigger: ".button.pay",
content: _t("Open the payment screen"),
},
{
content: "Choose Administrator like a cashier or make a dummy action",
trigger:
'.modal-dialog.cashier:not(.oe_hidden) .cashier .selection-item:contains("Mitchell Admin"), .payment-screen:not(.oe_hidden) h1:contains("Payment")',
},
{
trigger: '.button.paymentmethod:contains("' + pay_method + '")',
content: _t("Click the payment method"),
},
{
trigger: '.payment-screen .input-button.number-char:contains("2")',
content: "Set payment amount",
},
{
trigger: '.button.next.highlight:contains("Validate")',
content: "Validate payment",
},
{
extra_trigger: ".pos-sale-ticket",
trigger: '.button.next.highlight:contains("Next Order")',
content: "Check proceeded validation",
},
];
}
function close_pos() {
return [
{
trigger: '.header-button:contains("Close")',
content: _t("Close POS"),
},
{
trigger: '.header-button.confirm:contains("Confirm")',
content: _t("Close POS"),
},
{
extra_trigger: ".o_pos_kanban button.oe_kanban_action_button",
trigger: ".breadcrumb li.active",
content: _t(
"<p>Click to start the point of sale interface. It <b>runs on tablets</b>, laptops, or industrial hardware.</p><p>Once the session launched, the system continues to run without an internet connection.</p>"
),
position: "bottom",
},
];
}
function check_quantity(qty) {
return [
{
content: "check quantity",
extra_trigger:
'.product-list .product:contains("LED Lamp") .qty-tag:contains(' +
String(qty) +
"):not(.not-available)",
trigger: ".order-button.selected",
},
];
}
var steps = [
tour.STEPS.SHOW_APPS_MENU_ITEM,
{
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]',
content: _t(
"Ready to launch your <b>point of sale</b>? <i>Click here</i>."
),
position: "right",
edition: "community",
},
{
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]',
content: _t(
"Ready to launch your <b>point of sale</b>? <i>Click here</i>."
),
position: "bottom",
edition: "enterprise",
},
];
steps = steps.concat(
open_pos_neworder(),
add_product_to_order("LED Lamp"),
payment("Cash (USD)"),
close_pos(),
open_pos_neworder(),
check_quantity(2)
);
tour.register("tour_pos_product_available", {test: true, url: "/web"}, steps);
});

View file

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--Copyright 2014-2015 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
Copyright 2018-2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
License MIT (https://opensource.org/licenses/MIT). -->
<templates id="template" xml:space="preserve">
<t t-extend="Product">
<t t-jquery=".product-img" t-operation="append">
<t t-if="widget.pos.config.show_qtys &amp;&amp; product.type == 'product'">
<span
t-attf-class="qty-tag #{product.qty_available lte 0 ? 'not-available':''}"
>
<t t-esc="product.rounded_qty()" />
</span>
</t>
</t>
</t>
<t t-extend="Orderline">
<t t-jquery=".info-list>t:first-child">
this.attr('t-if', "line.get_quantity_str() !== '1' || line.selected || line.get_product().qty_available lt line.quantity ");
</t>
<t t-jquery="t[t-esc='line.get_quantity_str()']" t-operation="after">
<t
t-if="widget.pos.config.show_qtys &amp;&amp; line.get_product().type == 'product'"
>
<t t-set='qty_available' t-value='line.get_product().qty_available' />
(of <span
t-attf-class="qty-info #{qty_available lt line.quantity ? 'not-available':''}"
>
<t t-esc="line.get_product().rounded_qty()" />
</span>)
</t>
</t>
</t>
</templates>

View file

@ -1,3 +0,0 @@
# License MIT (https://opensource.org/licenses/MIT).
from . import test_quantities

View file

@ -1,64 +0,0 @@
# Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2018-2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# License MIT (https://opensource.org/licenses/MIT).
import odoo.tests
from odoo import _, tools
@odoo.tests.common.at_install(True)
@odoo.tests.common.post_install(True)
class TestUi(odoo.tests.HttpCase):
def test_pos_product_available(self):
# needed because tests are run before the module is marked as
# installed. In js web will only load qweb coming from modules
# that are returned by the backend in module_boot. Without
# this you end up with js, css but no qweb.
env = self.env
env["ir.module.module"].search(
[("name", "=", "pos_product_available")], limit=1
).state = "installed"
product = env["product.product"].search([("name", "=", "LED Lamp")], limit=1)
product.product_tmpl_id.write({"type": "product"})
# updating product qty
new_quantity = 3
company_user = self.env.user.company_id
location = (
self.env["stock.warehouse"]
.search([("company_id", "=", company_user.id)], limit=1)
.lot_stock_id
)
th_qty = product.qty_available
inventory = self.env["stock.inventory"].create(
{
"name": _("INV: %s") % tools.ustr(product.display_name),
"filter": "product",
"product_id": product.id,
"location_id": location.id,
"line_ids": [
(
0,
0,
{
"product_qty": new_quantity,
"location_id": location.id,
"product_id": product.id,
"product_uom_id": product.uom_id.id,
"theoretical_qty": th_qty,
},
)
],
}
)
inventory.action_validate()
# without a delay there might be problems caused by a not yet loaded button's action
self.phantom_js(
"/web",
"odoo.__DEBUG__.services['web_tour.tour'].run('tour_pos_product_available', 500)",
"odoo.__DEBUG__.services['web_tour.tour'].tours.tour_pos_product_available.ready",
login="admin",
timeout=200,
)

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
License MIT (https://opensource.org/licenses/MIT).-->
<odoo>
<record id="view_pos_product_available_negative_config_form" model="ir.ui.view">
<field name="name">pos.pin.config.form.view</field>
<field name="model">pos.config</field>
<field name="inherit_id" ref="point_of_sale.pos_config_view_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='iface_big_scrollbars']/../.." position="after">
<div class="col-xs-12 col-md-6 o_setting_box" id="show_prod_qtys">
<div class="o_setting_left_pane">
<field name="show_qtys" />
</div>
<div class="o_setting_right_pane">
<label for="show_qtys" />
</div>
</div>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,31 @@
{
"name": "PoS Product Library",
"category": "Point of Sale",
"summary": "Add product_library fields to point of sale",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"description": """
Añade campos de product_library al TPV
==================================================
* Hace búsquedas en el TPV de los campos autor y editorial.
* Muestra el campo formato en el PoS en los productos y en las líneas de la orden.
* Muestra los campos de product_library en el popup de info del producto.
* Quita la descriptición de los productos de la búsqueda en el TPV.
""",
"author": "Criptomart",
"depends": [
"product_library",
"point_of_sale",
],
"assets": {
"point_of_sale.assets": [
"pos_product_library/static/src/js/db.js",
"pos_product_library/static/src/xml/**/*.xml",
],
},
"data": [],
"demo": [],
"installable": True,
"auto_install": False,
"application": True,
}

Some files were not shown because too many files have changed in this diff Show more