Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stock_ux/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
"name": "Stock UX",
"version": "19.0.1.8.0",
"version": "19.0.1.9.0",
"category": "Warehouse Management",
"sequence": 14,
"summary": "",
Expand Down
13 changes: 12 additions & 1 deletion stock_ux/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from odoo import models
from odoo import _, api, models


class ProductTemplate(models.Model):
_inherit = "product.template"

@api.model
def get_import_templates(self):
if self.env.context.get("stock_product_template"):
return [
{
"label": _("Import Template for Products"),
"template": "/stock_ux/static/xls/product_template.xlsx",
}
]
return super().get_import_templates()

def action_view_stock_move(self):
self.ensure_one()
action = self.env["ir.actions.actions"]._for_xml_id("stock.stock_move_action")
Expand Down
Binary file added stock_ux/static/xls/product_template.xlsx
Binary file not shown.
4 changes: 4 additions & 0 deletions stock_ux/views/product_template_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
<field name="mode">extension</field>
</record>

<record id="stock.product_template_action_product" model="ir.actions.act_window">
<field name="context">{"search_default_goods": 1, "default_is_storable": True, "stock_product_template": 1}</field>
</record>

</odoo>
Loading