Skip to content

Commit

Permalink
[FIX]stock_voucher_ux: reeamde in 17.0
Browse files Browse the repository at this point in the history
closes #574

Signed-off-by: Juan Carreras <[email protected]>
  • Loading branch information
mav-adhoc committed Nov 22, 2024
1 parent 1285633 commit af0fc4b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 3 deletions.
5 changes: 3 additions & 2 deletions stock_voucher_ux/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
Stock Voucher
=============

#. This module adds stock voucher report on stock picking to generate a voucher for each Customers pickings.
#. Also adds parameters in stock picking type to set declared value and number_package in the pickings.
#. This module makes the assignation of the vouchers depending on the quantity of pages the report has.
#. Replaces the field "Lines per voucher" for the boolean "Autoprinted" maintaining the same functionality.
#. Eliminates the wizard for "Vouchers" and replace it with the action "Print Vouchers", which automatically prints and assigns the voucher/s.

Installation
============
Expand Down
2 changes: 2 additions & 0 deletions stock_voucher_ux/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@
'depends': [
'stock_voucher',
'report_aeroo',
'l10n_ar_stock',
],
'data': [
'views/stock_book_views.xml',
'views/stock_picking_views.xml',
'views/report_deliveryslip.xml',
],
'demo': [
],
Expand Down
22 changes: 22 additions & 0 deletions stock_voucher_ux/views/report_deliveryslip.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_delivery_document" inherit_id="l10n_ar_stock.report_delivery_document">
<xpath expr="//t[@t-set='pre_printed_report']" position="replace">
<t t-set="pre_printed_report" t-value="not o.autoprinted"/>
</xpath>
<xpath expr="//div[@name='footer_right_column']" position="replace">
<div name="footer_right_column" class="col-4 text-right">
<div t-if="o.book_id.autoprinted and o.book_id.l10n_ar_cai">
CAI: <span t-field="o.book_id.l10n_ar_cai"/>
</div>
<div t-if="o.book_id.autoprinted and o.book_id.l10n_ar_cai_due">
CAI Due Date: <span t-field="o.book_id.l10n_ar_cai_due"/>
</div>
<div name="pager" t-if="report_type == 'pdf'">
Page: <span class="page"/>
/ <span class="topage"/>
</div>
</div>
</xpath>
</template>
</odoo>
8 changes: 7 additions & 1 deletion stock_voucher_ux/views/stock_book_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
<record id="view_stock_book_form_ux" model="ir.ui.view">
<field name="name">stock.book.form.ux</field>
<field name="model">stock.book</field>
<field name="inherit_id" ref="stock_voucher.view_stock_book_form"/>
<field name="inherit_id" ref="l10n_ar_stock.view_stock_book_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='lines_per_voucher']" position="after">
<field name="autoprinted" widget="boolean_toggle"/>
</xpath>
<xpath expr="//field[@name='lines_per_voucher']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='l10n_ar_cai']" position="attributes">
<attribute name="invisible">autoprinted == False</attribute>
</xpath>
<xpath expr="//field[@name='l10n_ar_cai_due']" position="attributes">
<attribute name="invisible">autoprinted == False</attribute>
</xpath>
</field>
</record>
</odoo>

0 comments on commit af0fc4b

Please sign in to comment.