Skip to content

Commit

Permalink
[IMP] stock_release_channel_shipment_advice: Add buttons on release c…
Browse files Browse the repository at this point in the history
…hannel kanban to print shipments and delivery slip
  • Loading branch information
tuantrantg committed Mar 12, 2024
1 parent ce4e20a commit d4bd675
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,15 @@ def _check_warehouse(self):
def _onchange_check_warehouse(self):
self.ensure_one()
self._check_warehouse()

def action_print_shipment(self):
if self.shipment_advice_ids:
return self.env.ref(
"shipment_advice.action_report_shipment_advice"
).report_action(self.shipment_advice_ids)
return {}

def action_print_deliveryslip(self):
if self.shipment_advice_ids:
return self.shipment_advice_ids.print_all_deliveryslip()
return {}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,26 @@
<span>Plan Shipment</span>
</button>
</xpath>
<xpath expr="//div[@name='dropdown-menu-right-panel']" position="inside">
<t>
<div role="menuitem">
<a
name="action_print_shipment"
type="object"
icon="fa-archive"
>Print Shipment</a>
</div>
</t>
<t>
<div role="menuitem">
<a
name="action_print_deliveryslip"
type="object"
icon="fa-truck"
>Print Deliveries</a>
</div>
</t>
</xpath>
</field>
</record>

Expand Down

0 comments on commit d4bd675

Please sign in to comment.