Merge branch '14.0' of github.com:akretion/odoo-usability into 14.0
This commit is contained in:
0
pos_product_tree_default/__init__.py
Normal file
0
pos_product_tree_default/__init__.py
Normal file
22
pos_product_tree_default/__manifest__.py
Normal file
22
pos_product_tree_default/__manifest__.py
Normal file
@@ -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,
|
||||||
|
}
|
||||||
9
pos_product_tree_default/views/product_template.xml
Normal file
9
pos_product_tree_default/views/product_template.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="point_of_sale.product_template_action_pos_product" model="ir.actions.act_window">
|
||||||
|
<field name="view_mode">tree,form,kanban,activity</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
from . import product
|
from . import product
|
||||||
from . import pos_category
|
from . import pos_category
|
||||||
|
from . import pos_payment_method
|
||||||
|
|||||||
12
pos_usability/models/pos_payment_method.py
Normal file
12
pos_usability/models/pos_payment_method.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Copyright 2021 Akretion France (http://www.akretion.com/)
|
||||||
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# 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)
|
||||||
@@ -35,7 +35,7 @@ class ProductTemplate(models.Model):
|
|||||||
"because it has %d variants and not just one.")
|
"because it has %d variants and not just one.")
|
||||||
% (self.display_name, self.product_variant_count))
|
% (self.display_name, self.product_variant_count))
|
||||||
action = self.env.ref(
|
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'] = {
|
action['context'] = {
|
||||||
'active_id': self.product_variant_ids[0].id,
|
'active_id': self.product_variant_ids[0].id,
|
||||||
'active_model': 'product.product',
|
'active_model': 'product.product',
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ class ProductPrintZplBarcode(models.TransientModel):
|
|||||||
'zpl_filename': 'barcode_%s.zpl' % vals['barcode'],
|
'zpl_filename': 'barcode_%s.zpl' % vals['barcode'],
|
||||||
})
|
})
|
||||||
self.write(vals)
|
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({
|
action.update({
|
||||||
'res_id': self.id,
|
'res_id': self.id,
|
||||||
'context': self._context,
|
'context': self._context,
|
||||||
@@ -285,7 +285,7 @@ class ProductPrintZplBarcode(models.TransientModel):
|
|||||||
self.zpl_filename, base64.decodebytes(self.zpl_file), format='raw')
|
self.zpl_filename, base64.decodebytes(self.zpl_file), format='raw')
|
||||||
action = True
|
action = True
|
||||||
if self._context.get('print_and_new'):
|
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({
|
action.update({
|
||||||
'views': False,
|
'views': False,
|
||||||
'context': self._context,
|
'context': self._context,
|
||||||
|
|||||||
@@ -14,25 +14,16 @@ class ProductTemplate(models.Model):
|
|||||||
# in v10, that field was defined in procurement_suggest, but we will
|
# in v10, that field was defined in procurement_suggest, but we will
|
||||||
# probably not port procurement_suggest because it is native in v14
|
# probably not port procurement_suggest because it is native in v14
|
||||||
seller_id = fields.Many2one(
|
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(
|
# in v14, I noticed that the tracking of the fields of product.template
|
||||||
# track_visibility='onchange')
|
# are only shown in the form view of product.template, not in the form
|
||||||
|
# view of product.product
|
||||||
# type = fields.Selection(
|
name = fields.Char(tracking=10)
|
||||||
# track_visibility='onchange')
|
categ_id = fields.Many2one(tracking=20)
|
||||||
|
type = fields.Selection(tracking=30)
|
||||||
# categ_id = fields.Many2one(
|
list_price = fields.Float(tracking=40)
|
||||||
# track_visibility='onchange')
|
sale_ok = fields.Boolean(tracking=50)
|
||||||
|
purchase_ok = fields.Boolean(tracking=60)
|
||||||
# list_price = fields.Float(
|
active = fields.Boolean(tracking=70)
|
||||||
# track_visibility='onchange')
|
|
||||||
|
|
||||||
# sale_ok = fields.Boolean(
|
|
||||||
# track_visibility='onchange')
|
|
||||||
|
|
||||||
# purchase_ok = fields.Boolean(
|
|
||||||
# track_visibility='onchange')
|
|
||||||
|
|
||||||
# active = fields.Boolean(
|
|
||||||
# track_visibility='onchange')
|
|
||||||
|
|||||||
@@ -17,4 +17,15 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="product_supplierinfo_tree_view" model="ir.ui.view">
|
||||||
|
<field name="model">product.supplierinfo</field>
|
||||||
|
<field name="inherit_id" ref="product.product_supplierinfo_tree_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="product_code" position="attributes">
|
||||||
|
<attribute name="optional">show</attribute>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Purchase Product Tree Default',
|
'name': 'Purchase Product Tree Default',
|
||||||
'version': '12.0.1.0.0',
|
'version': '14.0.1.0.0',
|
||||||
'category': 'Product',
|
'category': 'Product',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Tree view by default instead of kanban for Products',
|
'summary': 'Tree view by default instead of kanban for Products',
|
||||||
@@ -18,5 +18,5 @@
|
|||||||
'data': [
|
'data': [
|
||||||
'views/product_template.xml'
|
'views/product_template.xml'
|
||||||
],
|
],
|
||||||
'installable': False,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Sale Product Tree Default',
|
'name': 'Sale Product Tree Default',
|
||||||
'version': '12.0.1.0.0',
|
'version': '14.0.1.0.0',
|
||||||
'category': 'Product',
|
'category': 'Product',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Tree view by default instead of kanban for Products',
|
'summary': 'Tree view by default instead of kanban for Products',
|
||||||
@@ -18,5 +18,5 @@
|
|||||||
'data': [
|
'data': [
|
||||||
'views/product_template.xml'
|
'views/product_template.xml'
|
||||||
],
|
],
|
||||||
'installable': False,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<record id="sale.product_template_action" model="ir.actions.act_window">
|
<record id="sale.product_template_action" model="ir.actions.act_window">
|
||||||
<field name="view_mode">tree,form,kanban,activity</field>
|
<field name="view_mode">tree,form,kanban,activity</field>
|
||||||
<field name="view_id" ref="product.product_template_tree_view"/>
|
<field name="view_id" eval="False"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -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).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Stock Product Tree Default',
|
'name': 'Stock Product Tree Default',
|
||||||
'version': '12.0.1.0.0',
|
'version': '14.0.1.0.0',
|
||||||
'category': 'Product',
|
'category': 'Product',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'summary': 'Tree view by default instead of kanban for Products',
|
'summary': 'Tree view by default instead of kanban for Products',
|
||||||
@@ -18,5 +18,5 @@
|
|||||||
'data': [
|
'data': [
|
||||||
'views/product_template.xml'
|
'views/product_template.xml'
|
||||||
],
|
],
|
||||||
'installable': False,
|
'installable': True,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<record id="stock.product_template_action_product" model="ir.actions.act_window">
|
<record id="stock.product_template_action_product" model="ir.actions.act_window">
|
||||||
<field name="view_mode">tree,form,kanban,activity</field>
|
<field name="view_mode">tree,form,kanban,activity</field>
|
||||||
<field name="view_id" ref="product.product_template_tree_view"/>
|
<field name="view_id" eval="False"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
|||||||
'views/stock_move.xml',
|
'views/stock_move.xml',
|
||||||
'views/stock_picking.xml',
|
'views/stock_picking.xml',
|
||||||
'views/stock_warehouse.xml',
|
'views/stock_warehouse.xml',
|
||||||
|
'views/stock_warehouse_orderpoint.xml',
|
||||||
|
'views/product.xml',
|
||||||
'views/procurement_group.xml',
|
'views/procurement_group.xml',
|
||||||
'views/procurement_scheduler_log.xml',
|
'views/procurement_scheduler_log.xml',
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
|
|||||||
23
stock_usability/views/product.xml
Normal file
23
stock_usability/views/product.xml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2021 Akretion (http://www.akretion.com/)
|
||||||
|
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
|
||||||
|
<record id="view_stock_product_template_tree" model="ir.ui.view">
|
||||||
|
<field name="name">stock.usability.product.template.tree</field>
|
||||||
|
<field name="model">product.template</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_stock_product_template_tree" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="responsible_id" position="attributes">
|
||||||
|
<attribute name="optional">hide</attribute>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
</odoo>
|
||||||
43
stock_usability/views/stock_warehouse_orderpoint.xml
Normal file
43
stock_usability/views/stock_warehouse_orderpoint.xml
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2014-2020 Akretion (http://www.akretion.com/)
|
||||||
|
@author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
-->
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
|
||||||
|
<record id="view_warehouse_orderpoint_form" model="ir.ui.view">
|
||||||
|
<field name="model">stock.warehouse.orderpoint</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_form" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="product_id" position="after">
|
||||||
|
<field name="trigger"/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_warehouse_orderpoint_tree_editable" model="ir.ui.view">
|
||||||
|
<field name="model">stock.warehouse.orderpoint</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="trigger" position="attributes">
|
||||||
|
<attribute name="optional">show</attribute>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="view_warehouse_orderpoint_tree_editable_config" model="ir.ui.view">
|
||||||
|
<field name="model">stock.warehouse.orderpoint</field>
|
||||||
|
<field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable_config" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="trigger" position="attributes">
|
||||||
|
<attribute name="optional">show</attribute>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user