Skip to content
Open
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
21 changes: 20 additions & 1 deletion sqp-addons/jrxml_reports/custom_reports.xml
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,26 @@
<field name="invisible">not context.get('is_subcontract',False)</field>
</record>

<!-- END -->
<!-- END -->

<report string="PO Subcontract - Print (SQP)"
model="purchase.order"
auto="False"
name="sqp.po.subcontract.print"
rml="jrxml_reports/custom_reports/sqp_po_subcontract_print.jrxml"
id="report_sqp_po_subcontract_print"
menu="True"
header="False"
attachment=""
groups=""
/>
<record id="report_sqp_po_subcontract_print" model="ir.actions.report.xml">
<field name="jasper_report">True</field>
<field name="jasper_output">pdf</field>
<field name="invisible">not context.get('is_subcontract',False)</field>
</record>

<!-- END -->

<report string="Internal Move Form (SQP)"
model="stock.picking"
Expand Down
246 changes: 246 additions & 0 deletions sqp-addons/jrxml_reports/custom_reports/sqp_po_subcontract_print.jrxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="sqp_po_subcontract_print" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["/home/pod/workspace/odoo/sqp/odoo/addons/sqp/sqp-addons/jrxml_reports/custom_reports/"]]></defaultValueExpression>
</parameter>
<queryString language="xPath">
<![CDATA[/data/record]]>
</queryString>
<field name="sale_order" class="java.lang.String">
<fieldDescription><![CDATA[ref_order_id/name]]></fieldDescription>
</field>
<field name="supplier_name" class="java.lang.String">
<fieldDescription><![CDATA[partner_id/display_name]]></fieldDescription>
</field>
<field name="customer_name" class="java.lang.String">
<fieldDescription><![CDATA[ref_order_id/partner_id/display_name]]></fieldDescription>
</field>
<field name="project_name" class="java.lang.String">
<fieldDescription><![CDATA[ref_project_name]]></fieldDescription>
</field>
<field name="id" class="java.lang.Integer">
<fieldDescription><![CDATA[id]]></fieldDescription>
</field>
<field name="po_name" class="java.lang.String">
<fieldDescription><![CDATA[name]]></fieldDescription>
</field>
<pageHeader>
<band height="152" splitType="Stretch">
<staticText>
<reportElement mode="Transparent" x="0" y="12" width="555" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[บริษัท สแควร์ พาแนล ซิสเต็ม จำกัด]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="0" y="36" width="555" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Center" verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[รายงานการอนุมัติ]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="426" y="60" width="32" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[Ref.]]></text>
</staticText>
<textField>
<reportElement mode="Transparent" x="458" y="60" width="100" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{po_name}]]></textFieldExpression>
</textField>
<staticText>
<reportElement mode="Transparent" x="0" y="84" width="176" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[ชื่อ/นามสกุลผู้รับเหมา :]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="0" y="108" width="90" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[Sale Order :]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="0" y="132" width="106" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[ขื่อโครงการ : ]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="213" y="108" width="90" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[ชื่อลูกค้า :]]></text>
</staticText>
<textField>
<reportElement mode="Transparent" x="125" y="84" width="430" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{supplier_name}]]></textFieldExpression>
</textField>
<textField>
<reportElement mode="Transparent" x="80" y="108" width="133" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{sale_order}]]></textFieldExpression>
</textField>
<textField>
<reportElement mode="Transparent" x="270" y="108" width="463" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{customer_name}]]></textFieldExpression>
</textField>
<textField>
<reportElement mode="Transparent" x="80" y="132" width="653" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{project_name}]]></textFieldExpression>
</textField>
</band>
</pageHeader>
<columnHeader>
<band height="45" splitType="Stretch">
<staticText>
<reportElement mode="Transparent" x="0" y="5" width="347" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[อนุมัติ]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="347" y="5" width="208" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[คงเหลือ]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="0" y="25" width="60" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[ครั้งที่]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="60" y="25" width="80" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[Due Date]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="140" y="25" width="50" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[%]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="190" y="25" width="157" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[จำนวนเงิน (บาท)]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="347" y="25" width="50" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[%]]></text>
</staticText>
<staticText>
<reportElement mode="Transparent" x="397" y="25" width="158" height="20" forecolor="#000000" backcolor="#FFFFFF"/>
<box>
<pen lineWidth="1.0"/>
<topPen lineWidth="1.0"/>
<leftPen lineWidth="1.0"/>
<bottomPen lineWidth="1.0"/>
<rightPen lineWidth="1.0"/>
</box>
<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single" markup="none">
<font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Garuda.ttf" pdfEncoding="Identity-H" isPdfEmbedded="false"/>
</textElement>
<text><![CDATA[จำนวนเงิน (บาท)]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="21" splitType="Stretch">
<subreport>
<reportElement x="0" y="0" width="555" height="20"/>
<subreportParameter name="id">
<subreportParameterExpression><![CDATA[$F{id}]]></subreportParameterExpression>
</subreportParameter>
<connectionExpression><![CDATA[java.sql.DriverManager.getConnection("jdbc:postgresql://localhost:5432/SQP","openerp", "openerppwd")]]></connectionExpression>
<subreportExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "sqp_po_subcontract_print_subreport1.jasper"]]></subreportExpression>
</subreport>
</band>
</detail>
</jasperReport>
Loading