Skip to content

Commit

Permalink
[FIX] sale_order_line_inventory: button causes permission fail
Browse files Browse the repository at this point in the history
  • Loading branch information
oihane committed Sep 11, 2024
1 parent b657821 commit d31d0e1
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 33 deletions.
6 changes: 3 additions & 3 deletions sale_order_line_inventory/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
:alt: License: AGPL-3

=========================
Sale order line inventory
Sale Order Line Inventory
=========================

* New button on sales order lines to go to your stock.
Expand All @@ -12,7 +12,7 @@ Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/avanzosc/odoo-addons/issues>`_. In case of trouble, please
<https://github.com/avanzosc/sale-addons/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.

Expand All @@ -24,4 +24,4 @@ Contributors
* Ana Juaristi <[email protected]>
* Alfredo de la Fuente <[email protected]>

Do not contact contributors directly about support or help with technicasc.es>
Do not contact contributors directly about support or help with technical issues.
4 changes: 2 additions & 2 deletions sale_order_line_inventory/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
{
"name": "Sale Order Line Inventory",
"version": "16.0.1.0.0",
"category": "Banking addons",
"category": "Sales",
"license": "AGPL-3",
"author": "AvanzOSC",
"website": "https://github.com/avanzosc/odoo-addons",
"website": "https://github.com/avanzosc/sale-addons",
"depends": ["sale_stock"],
"data": [
"views/sale_order_view.xml",
Expand Down
10 changes: 1 addition & 9 deletions sale_order_line_inventory/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,4 @@ class SaleOrderLine(models.Model):

def show_product_inventory(self):
self.ensure_one()
action = self.env.ref("stock.action_view_quants").read()[0]
action.update(
{
"context": {
"search_default_product_id": self.product_id.product_tmpl_id.id
}
}
)
return action
return self.product_id.action_open_quants()
1 change: 0 additions & 1 deletion sale_order_line_inventory/tests/__init__.py

This file was deleted.

18 changes: 0 additions & 18 deletions sale_order_line_inventory/tests/test_sale_order_line_inventory.py

This file was deleted.

1 change: 1 addition & 0 deletions sale_order_line_inventory/views/sale_order_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
name="show_product_inventory"
type="object"
string="Inventory"
icon="fa-cubes"
/>
</xpath>
</field>
Expand Down
6 changes: 6 additions & 0 deletions setup/sale_order_line_inventory/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit d31d0e1

Please sign in to comment.