Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
odoo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
odoo
Commits
bbde8038
Commit
bbde8038
authored
Feb 23, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2175-serch-coop-number' into 'dev_cooperatic'
2175 search coop number See merge request
!30
parents
b414b37c
20ded4b7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
__openerp__.py
lacagette_addons/lacagette_custom_pos/__openerp__.py
+2
-0
ir_config_parameter_data.xml
...ns/lacagette_custom_pos/data/ir_config_parameter_data.xml
+7
-0
backend.js
...ette_addons/lacagette_custom_pos/static/src/js/backend.js
+19
-2
No files found.
lacagette_addons/lacagette_custom_pos/__openerp__.py
View file @
bbde8038
...
...
@@ -7,6 +7,8 @@
'description'
:
"""
Recherche par num. de coop
\n
(la recherche inclut le code barre ou non,
\n
le réglage se fait avec la clé lacagette_custom_pos.reduce_pos_members_search)
\n
Après une recherche, le champ perd le focus
\n
Utilisation du pavé numérique du clavier sur le panier
\n
Personnalisation de la popup d'erreur "codebarre non reconnu" :
\n
...
...
lacagette_addons/lacagette_custom_pos/data/ir_config_parameter_data.xml
0 → 100644
View file @
bbde8038
<?xml version="1.0"?>
<odoo
noupdate=
"0"
>
<record
id=
"reduce_pos_members_search"
model=
"ir.config_parameter"
>
<field
name=
"key"
>
lacagette_custom_pos.reduce_pos_members_search
</field>
<field
name=
"value"
>
False
</field>
</record>
</odoo>
lacagette_addons/lacagette_custom_pos/static/src/js/backend.js
View file @
bbde8038
...
...
@@ -2,8 +2,21 @@ odoo.define('lacagette_custom_pos.DB', function(require) {
"use strict"
;
var
PosDB
=
require
(
'point_of_sale.DB'
);
var
Model
=
require
(
'web.DataModel'
);
var
config_parameter
=
new
Model
(
'ir.config_parameter'
);
var
reduce_pos_members_search
=
null
;
PosDB
.
include
({
init
:
function
(
parent
,
options
){
this
.
_super
(
parent
,
options
);
config_parameter
.
call
(
'get_param'
,
[
'lacagette_custom_pos.reduce_pos_members_search'
])
.
then
(
function
(
param
){
if
(
param
!=
undefined
)
{
reduce_pos_members_search
=
param
;
}
})
},
_partner_search_string
:
function
(
partner
){
var
str
=
partner
.
name
;
//Diacritric search
...
...
@@ -12,9 +25,13 @@ odoo.define('lacagette_custom_pos.DB', function(require) {
}
catch
(
e
)
{
console
.
log
(
e
)
}
if
(
partner
.
barcode
){
if
(
reduce_pos_members_search
===
'False'
)
{
if
(
partner
.
barcode
){
str
+=
'|'
+
partner
.
barcode
;
}
}
}
if
(
partner
.
barcode_base
){
str
+=
'|'
+
partner
.
barcode_base
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment