diff --git a/balance_sale_party.py b/balance_sale_party.py index 8710257..01b92dd 100644 --- a/balance_sale_party.py +++ b/balance_sale_party.py @@ -60,7 +60,9 @@ class PrintBalanceSaleParty(Wizard): data = { 'company': self.start.company.id, 'party': party, - 'party_type': party_type + 'party_type': party_type, + 'start_period': self.start.start_period.id, + 'end_period' : self.start.end_period.id } return action, data @@ -88,7 +90,7 @@ class BalanceSaleParty(Report): if data.get('party'): party = data['party'] dom_sale.append(('party', '=', party)) - + if data.get('start_period'): start_period = Period(data['start_period']) dom_sale.append(('sale_date', '>=', start_period.start_date)) @@ -130,4 +132,9 @@ class BalanceSaleParty(Report): report_context['end_period'] = end_period.name if end_period else '*' report_context['company'] = company + residual_amount = 0 + for sale in sales: + residual_amount += sale.residual_amount + report_context['residual_amount'] = residual_amount + return report_context diff --git a/locale/es.po b/locale/es.po index c8dd01b..3068a2f 100644 --- a/locale/es.po +++ b/locale/es.po @@ -1423,6 +1423,34 @@ msgctxt "field:stock.shipment.out,service_maintenance_initial:" msgid "Maintenance Initial" msgstr "Mantenimiento Inicial" +msgctxt "field:optical_equipment.print_balance_sale_party.start,company:" +msgid "Company" +msgstr "Empresa" + +msgctxt "field:optical_equipment.print_balance_sale_party.start,party:" +msgid "Party" +msgstr "Tercero" + +msgctxt "field:optical_equipment.print_balance_sale_party.start,start_period:" +msgid "Start Period" +msgstr "Periodo Inicial" + +msgctxt "field:optical_equipment.print_balance_sale_party.start,end_period:" +msgid "End Period" +msgstr "Periodo Final" + +msgctxt "field:optical_equipment.print_balance_sale_party.start,party_type:" +msgid "Party Type" +msgstr "Tipo" + +msgctxt "selection:optical_equipment.print_balance_sale_party.start,party_type:" +msgid "out" +msgstr "Cliente" + +msgctxt "model:ir.ui.menu,name:menu_print_balance_sale_party" +msgid "Print Balance Sale by Party" +msgstr "Estado de Cuenta por Tercero" + msgctxt "model:ir.model.button,string:maintenance_initial_button" msgid "Maintenance Initial" msgstr "Mantenimiento Inicial" @@ -1501,4 +1529,5 @@ msgstr "Pesas de Calibración" msgctxt "model:optical_equipment.use_pattern,name_pattern:calibration_spheres" msgid "Calibration Spheres" -msgstr "Esferas de Calibración" \ No newline at end of file +msgstr "Esferas de Calibración" + diff --git a/report/balance_sale_party.fods b/report/balance_sale_party.fods index 083bc51..1978ceb 100644 --- a/report/balance_sale_party.fods +++ b/report/balance_sale_party.fods @@ -1,25 +1,25 @@ - 2015-03-21T09:18:00.143995121P0D1LibreOffice/7.4.6.2$Linux_X86_64 LibreOffice_project/40$Build-2 + 2015-03-21T09:18:00.143995121P0D1LibreOffice/7.4.6.2$Linux_X86_64 LibreOffice_project/40$Build-2 187 0 30177 - 9823 + 10797 view1 - 2 - 48 + 7 + 25 2 0 0 0 - 29 + 0 0 100 160 @@ -128,8 +128,8 @@ - - + + @@ -541,7 +541,7 @@ - + @@ -633,6 +633,18 @@ ) + + $ + + + + + ( + $ + + ) + + @@ -693,7 +705,7 @@ - + @@ -725,11 +737,6 @@ - - - - - @@ -749,7 +756,7 @@ - + @@ -834,7 +841,7 @@ - + @@ -845,7 +852,7 @@ - + @@ -892,7 +899,7 @@ - + @@ -924,7 +931,7 @@ - + @@ -935,7 +942,7 @@ company.party.identifiers and company.party.identifiers[0].code - + @@ -951,15 +958,15 @@ company.party.get_contact_mechanism('phone') - - + + - + @@ -1030,7 +1037,8 @@ Orden de Venta #: - + sale.number + @@ -1133,7 +1141,7 @@ - sale.residual_amount + sale.residual_amount @@ -1152,6 +1160,19 @@ + + + + + SALDO X COBRAR + + + + residual_amount + + + + /for @@ -1160,12 +1181,15 @@ - + + + + - +