-
-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[15.0][ADD] stock_picking_auto_print: New module #347
base: 15.0
Are you sure you want to change the base?
[15.0][ADD] stock_picking_auto_print: New module #347
Conversation
@@ -0,0 +1 @@ | |||
This module allows to auto print delivery slip after validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This module allows to auto print delivery slip after validation | |
This is a backport of the Odoo 17 functionality that allows to auto print delivery slip after validation |
class StockPickingType(models.Model): | ||
_inherit = "stock.picking.type" | ||
|
||
auto_print_delivery_slip = fields.Boolean( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we add the auto_print_return_slip
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In v15 does not exist the returned report
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok 👍
def button_validate(self): | ||
res = super().button_validate() | ||
|
||
pickings_to_print = self.filtered( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not implementing the original _get_autoprint_report_actions
hook method?: https://github.com/OCA/OCB/blob/381c3681b55d185e2b27e8001edafe0dc284d6b4/addons/stock/models/stock_picking.py#L1658-L1665
"name": "Stock Picking Auto Print", | ||
"summary": "Print picking delivery slip automatically after validation", | ||
"version": "15.0.1.0.0", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"author": "Tecnativa, Odoo Community Association (OCA)", | |
"author": "Odoo S.A., Tecnativa, Odoo Community Association (OCA)", |
@@ -0,0 +1,17 @@ | |||
# Copyright 2024 Tecnativa - Sergio Teruel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Copyright 2024 Tecnativa - Sergio Teruel | |
# Copyright 2024 Tecnativa - Sergio Teruel | |
# Copyright 2024 Odoo S.A. |
<group name="auto_print"> | ||
<group string="Print on Validation"> | ||
<field name="auto_print_delivery_slip" string="Delivery Slip" /> | ||
<field name="auto_print_return_slip" string="Return Slip" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't exist
<field name="auto_print_return_slip" string="Return Slip" /> |
000bbe6
to
8b0f796
Compare
Changes done! |
8b0f796
to
b6f31ac
Compare
c5615f5
to
4bd145d
Compare
@chienandalu We use the module https://github.com/OCA/web/tree/15.0/web_ir_actions_act_multi ping @pedrobaeza |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests failing now...
4bd145d
to
c2dd069
Compare
@chienandalu Fixed!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working right 👍
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
|
||
<record model="ir.ui.view" id="view_partner_valued_picking"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<record model="ir.ui.view" id="view_partner_valued_picking"> | |
<record model="ir.ui.view" id="view_picking_type_form"> |
<field name="arch" type="xml"> | ||
<sheet> | ||
<group name="auto_print"> | ||
<group string="Print on Validation"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<group string="Print on Validation"> | |
<group name="print_on_validation" string="Print on Validation"> |
c2dd069
to
7046820
Compare
Changes done!! |
cc @Tecnativa TT51076
ping @chienandalu