diff --git a/pos_product_tree_default/__init__.py b/pos_product_tree_default/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pos_product_tree_default/__manifest__.py b/pos_product_tree_default/__manifest__.py new file mode 100644 index 0000000..800f1fd --- /dev/null +++ b/pos_product_tree_default/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2021 Akretion (http://www.akretion.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +{ + 'name': 'POS Product Tree Default', + 'version': '14.0.1.0.0', + 'category': 'Product', + 'license': 'AGPL-3', + 'summary': 'Tree view by default instead of kanban for Products', + 'description': """ + Replace default kanban view by tree view for product menu in Point of Sale + main menu + """, + 'author': 'Akretion', + 'website': 'http://www.akretion.com', + 'depends': ['point_of_sale'], + 'data': [ + 'views/product_template.xml' + ], + 'installable': True, +} diff --git a/pos_product_tree_default/views/product_template.xml b/pos_product_tree_default/views/product_template.xml new file mode 100644 index 0000000..79122a9 --- /dev/null +++ b/pos_product_tree_default/views/product_template.xml @@ -0,0 +1,9 @@ + + + + + + tree,form,kanban,activity + + + diff --git a/pos_usability/models/__init__.py b/pos_usability/models/__init__.py index 4d5f90b..ae2a8a4 100644 --- a/pos_usability/models/__init__.py +++ b/pos_usability/models/__init__.py @@ -1,2 +1,3 @@ from . import product from . import pos_category +from . import pos_payment_method diff --git a/pos_usability/models/pos_payment_method.py b/pos_usability/models/pos_payment_method.py new file mode 100644 index 0000000..4707db3 --- /dev/null +++ b/pos_usability/models/pos_payment_method.py @@ -0,0 +1,12 @@ +# Copyright 2021 Akretion France (http://www.akretion.com/) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class PosPaymentMethod(models.Model): + _inherit = 'pos.payment.method' + _check_company_auto = True + + cash_journal_id = fields.Many2one(check_company=True) diff --git a/product_print_zpl_barcode/models/product.py b/product_print_zpl_barcode/models/product.py index 908d84e..6853de6 100644 --- a/product_print_zpl_barcode/models/product.py +++ b/product_print_zpl_barcode/models/product.py @@ -35,7 +35,7 @@ class ProductTemplate(models.Model): "because it has %d variants and not just one.") % (self.display_name, self.product_variant_count)) action = self.env.ref( - 'product_print_zpl_barcode.product_print_zpl_barcode_action').read()[0] + 'product_print_zpl_barcode.product_print_zpl_barcode_action').sudo().read()[0] action['context'] = { 'active_id': self.product_variant_ids[0].id, 'active_model': 'product.product', diff --git a/product_print_zpl_barcode/wizard/product_print_zpl_barcode.py b/product_print_zpl_barcode/wizard/product_print_zpl_barcode.py index 26be01a..45a05b1 100644 --- a/product_print_zpl_barcode/wizard/product_print_zpl_barcode.py +++ b/product_print_zpl_barcode/wizard/product_print_zpl_barcode.py @@ -270,7 +270,7 @@ class ProductPrintZplBarcode(models.TransientModel): 'zpl_filename': 'barcode_%s.zpl' % vals['barcode'], }) self.write(vals) - action = self.env.ref('product_print_zpl_barcode.product_print_zpl_barcode_action').read()[0] + action = self.env.ref('product_print_zpl_barcode.product_print_zpl_barcode_action').sudo().read()[0] action.update({ 'res_id': self.id, 'context': self._context, @@ -285,7 +285,7 @@ class ProductPrintZplBarcode(models.TransientModel): self.zpl_filename, base64.decodebytes(self.zpl_file), format='raw') action = True if self._context.get('print_and_new'): - action = self.env.ref('product_print_zpl_barcode.product_print_zpl_barcode_action').read()[0] + action = self.env.ref('product_print_zpl_barcode.product_print_zpl_barcode_action').sudo().read()[0] action.update({ 'views': False, 'context': self._context, diff --git a/product_usability/models/product_template.py b/product_usability/models/product_template.py index 3b0c9b1..01d3458 100644 --- a/product_usability/models/product_template.py +++ b/product_usability/models/product_template.py @@ -14,25 +14,16 @@ class ProductTemplate(models.Model): # in v10, that field was defined in procurement_suggest, but we will # probably not port procurement_suggest because it is native in v14 seller_id = fields.Many2one( - 'res.partner', related='seller_ids.name', string='Main Supplier') + 'res.partner', related='seller_ids.name', store=True, + string='Main Supplier') -# name = fields.Char( -# track_visibility='onchange') - -# type = fields.Selection( -# track_visibility='onchange') - -# categ_id = fields.Many2one( -# track_visibility='onchange') - -# list_price = fields.Float( -# track_visibility='onchange') - -# sale_ok = fields.Boolean( -# track_visibility='onchange') - -# purchase_ok = fields.Boolean( -# track_visibility='onchange') - -# active = fields.Boolean( -# track_visibility='onchange') + # in v14, I noticed that the tracking of the fields of product.template + # are only shown in the form view of product.template, not in the form + # view of product.product + name = fields.Char(tracking=10) + categ_id = fields.Many2one(tracking=20) + type = fields.Selection(tracking=30) + list_price = fields.Float(tracking=40) + sale_ok = fields.Boolean(tracking=50) + purchase_ok = fields.Boolean(tracking=60) + active = fields.Boolean(tracking=70) diff --git a/product_usability/views/product_supplierinfo_view.xml b/product_usability/views/product_supplierinfo_view.xml index 1b104c0..6b75ced 100644 --- a/product_usability/views/product_supplierinfo_view.xml +++ b/product_usability/views/product_supplierinfo_view.xml @@ -17,4 +17,15 @@ + + product.supplierinfo + + + + show + + + + + diff --git a/purchase_product_tree_default/__manifest__.py b/purchase_product_tree_default/__manifest__.py index d2bc4bf..49c18c8 100644 --- a/purchase_product_tree_default/__manifest__.py +++ b/purchase_product_tree_default/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Purchase Product Tree Default', - 'version': '12.0.1.0.0', + 'version': '14.0.1.0.0', 'category': 'Product', 'license': 'AGPL-3', 'summary': 'Tree view by default instead of kanban for Products', @@ -18,5 +18,5 @@ 'data': [ 'views/product_template.xml' ], - 'installable': False, + 'installable': True, } diff --git a/sale_product_tree_default/__manifest__.py b/sale_product_tree_default/__manifest__.py index 8ae69c0..4f7b7a5 100644 --- a/sale_product_tree_default/__manifest__.py +++ b/sale_product_tree_default/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Sale Product Tree Default', - 'version': '12.0.1.0.0', + 'version': '14.0.1.0.0', 'category': 'Product', 'license': 'AGPL-3', 'summary': 'Tree view by default instead of kanban for Products', @@ -18,5 +18,5 @@ 'data': [ 'views/product_template.xml' ], - 'installable': False, + 'installable': True, } diff --git a/sale_product_tree_default/views/product_template.xml b/sale_product_tree_default/views/product_template.xml index 04626e1..aeb1e44 100644 --- a/sale_product_tree_default/views/product_template.xml +++ b/sale_product_tree_default/views/product_template.xml @@ -4,7 +4,7 @@ tree,form,kanban,activity - + diff --git a/stock_product_tree_default/__manifest__.py b/stock_product_tree_default/__manifest__.py index a8ed941..f27d7bd 100644 --- a/stock_product_tree_default/__manifest__.py +++ b/stock_product_tree_default/__manifest__.py @@ -1,10 +1,10 @@ -# © 2019 Akretion (http://www.akretion.com) +# Copyright 2019-2021 Akretion (http://www.akretion.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Stock Product Tree Default', - 'version': '12.0.1.0.0', + 'version': '14.0.1.0.0', 'category': 'Product', 'license': 'AGPL-3', 'summary': 'Tree view by default instead of kanban for Products', @@ -18,5 +18,5 @@ 'data': [ 'views/product_template.xml' ], - 'installable': False, + 'installable': True, } diff --git a/stock_product_tree_default/views/product_template.xml b/stock_product_tree_default/views/product_template.xml index 5e87885..d3ca2a9 100644 --- a/stock_product_tree_default/views/product_template.xml +++ b/stock_product_tree_default/views/product_template.xml @@ -4,7 +4,7 @@ tree,form,kanban,activity - + diff --git a/stock_usability/__manifest__.py b/stock_usability/__manifest__.py index 4acb88c..f878039 100644 --- a/stock_usability/__manifest__.py +++ b/stock_usability/__manifest__.py @@ -32,6 +32,8 @@ This module has been written by Alexis de Lattre from Akretion + + + + + + + stock.usability.product.template.tree + product.template + + + + hide + + + + + + diff --git a/stock_usability/views/stock_warehouse_orderpoint.xml b/stock_usability/views/stock_warehouse_orderpoint.xml new file mode 100644 index 0000000..092ea1e --- /dev/null +++ b/stock_usability/views/stock_warehouse_orderpoint.xml @@ -0,0 +1,43 @@ + + + + + + + + stock.warehouse.orderpoint + + + + + + + + + + stock.warehouse.orderpoint + + + + show + + + + + + stock.warehouse.orderpoint + + + + show + + + + + + +