diff options
Diffstat (limited to 'sales_report_product_image/models')
| -rw-r--r-- | sales_report_product_image/models/__init__.py | 3 | ||||
| -rw-r--r-- | sales_report_product_image/models/sale_product.py | 29 |
2 files changed, 32 insertions, 0 deletions
diff --git a/sales_report_product_image/models/__init__.py b/sales_report_product_image/models/__init__.py new file mode 100644 index 0000000..5aec2aa --- /dev/null +++ b/sales_report_product_image/models/__init__.py @@ -0,0 +1,3 @@ +# See LICENSE file for full copyright and licensing details. + +from . import sale_product diff --git a/sales_report_product_image/models/sale_product.py b/sales_report_product_image/models/sale_product.py new file mode 100644 index 0000000..cb7596c --- /dev/null +++ b/sales_report_product_image/models/sale_product.py @@ -0,0 +1,29 @@ +# See LICENSE file for full copyright and licensing details. + +from odoo import fields, models + + +class SaleOrder(models.Model): + _inherit = "sale.order" + + print_image = fields.Boolean( + "Print Image", + help="""If ticked, you can see the product image in + report of sale order/quotation""", + ) + image_sizes = fields.Selection( + [ + ("image", "Big sized Image"), + ("image_medium", "Medium Sized Image"), + ("image_small", "Small Sized Image"), + ], + "Image Sizes", + default="image_small", + help="Image size to be displayed in report", + ) + + +class SaleOrderLine(models.Model): + _inherit = "sale.order.line" + + image_small = fields.Binary("Product Image", related="product_id.image_1920") |
