Browse Source

[MIG] pos_restricted_customer_list: Migration to 13.0

pull/529/head
François Honoré 4 years ago
parent
commit
98180b60b3
  1. 10
      pos_restricted_customer_list/__manifest__.py
  2. 10
      pos_restricted_customer_list/models/res_partner.py
  3. 1
      pos_restricted_customer_list/static/src/js/pos_restricted_customer_list.js
  4. 1
      setup/pos_restricted_customer_list/odoo/addons/pos_restricted_customer_list
  5. 1
      setup/pos_restricted_customer_list/odoo_addons/__init__.py
  6. 1
      setup/pos_restricted_customer_list/odoo_addons/pos_restricted_customer_list

10
pos_restricted_customer_list/__openerp__.py → pos_restricted_customer_list/__manifest__.py

@ -3,15 +3,15 @@
{
"name": "POS: restricted customer list",
"version": "9.0.1.0.0",
"version": "13.0.1.0.0",
"development_status": "Production/Stable",
"category": "Point Of Sale" "",
"category": "Sales/Point Of Sale",
"summary": "This module will limit the download of customer data to "
"only those customers where this has been specifically "
"requested.",
"author": "Therp BV, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/pos/tree/9.0/" "pos_restricted_customer_list",
"website": "https://odoo-community.org/",
"license": "AGPL-3",
"depends": ["point_of_sale",],
"data": ["views/assets_backend.xml", "views/res_partner.xml",],
"depends": ["point_of_sale"],
"data": ["views/assets_backend.xml", "views/res_partner.xml"],
}

10
pos_restricted_customer_list/models/res_partner.py

@ -1,7 +1,7 @@
# Copyright 2017-2019 Therp BV <https://therp.nl>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openerp import fields, models
from odoo import api, fields, models
class ResPartner(models.Model):
@ -9,7 +9,7 @@ class ResPartner(models.Model):
available_in_pos = fields.Boolean(string="Available for POS", default=False,)
def create_from_ui(self, cr, uid, partner, context=None):
if not partner.get("available_in_pos"):
partner["available_in_pos"] = True
return super(ResPartner, self).create_from_ui(cr, uid, partner, context)
@api.model
def create_from_ui(self, partner):
partner.setdefault("available_in_pos", True)
return super().create_from_ui(partner)

1
pos_restricted_customer_list/static/src/js/pos_restricted_customer_list.js

@ -45,6 +45,7 @@ odoo.define("pos_restricted_customer_list.point_of_sale.models", function(requir
def.reject();
}
},
// eslint-disable-next-line handle-callback-err
function(err, event) {
event.preventDefault();
def.reject();

1
setup/pos_restricted_customer_list/odoo/addons/pos_restricted_customer_list

@ -0,0 +1 @@
../../../../pos_restricted_customer_list

1
setup/pos_restricted_customer_list/odoo_addons/__init__.py

@ -1 +0,0 @@
__import__('pkg_resources').declare_namespace(__name__)

1
setup/pos_restricted_customer_list/odoo_addons/pos_restricted_customer_list

@ -1 +0,0 @@
../../../pos_restricted_customer_list
Loading…
Cancel
Save