Merge lp:~dorian-kemps/unifield-server/US-6536 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5613
Proposed branch: lp:~dorian-kemps/unifield-server/US-6536
Merge into: lp:unifield-server
Diff against target: 426 lines (+96/-17)
2 files modified
bin/addons/msf_profile/i18n/fr_MF.po (+36/-11)
bin/addons/stock_override/report/report_stock_move.py (+60/-6)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-6536
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+378106@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
--- bin/addons/msf_profile/i18n/fr_MF.po 2019-11-21 16:33:04 +0000
+++ bin/addons/msf_profile/i18n/fr_MF.po 2020-01-27 10:41:38 +0000
@@ -1477,7 +1477,7 @@
1477msgid "Partner Form"1477msgid "Partner Form"
1478msgstr "Formulaire du Partenaire"1478msgstr "Formulaire du Partenaire"
14791479
1480#. modules: purchase, tender_flow, service_purchasing, sale, purchase_allocation_report, purchase_followup, return_claim, order_types, purchase_compare_rfq, sourcing, consumption_calculation, stock1480#. modules: purchase, tender_flow, service_purchasing, sale, purchase_allocation_report, purchase_followup, return_claim, order_types, purchase_compare_rfq, sourcing, consumption_calculation, stock, stock_override
1481#: selection:stock.move,order_category:01481#: selection:stock.move,order_category:0
1482#: view:purchase.order:01482#: view:purchase.order:0
1483#: selection:purchase.order,categ:01483#: selection:purchase.order,categ:0
@@ -1499,6 +1499,7 @@
1499#: selection:sale.order.line,categ:01499#: selection:sale.order.line,categ:0
1500#: selection:internal.request.import,imp_categ:01500#: selection:internal.request.import,imp_categ:0
1501#: selection:stock.reception.wizard,order_category:01501#: selection:stock.reception.wizard,order_category:0
1502#: code:addons/stock_override/report/report_stock_move.py:529
1502msgid "Medical"1503msgid "Medical"
1503msgstr "Médical"1504msgstr "Médical"
15041505
@@ -1858,6 +1859,7 @@
1858#: selection:stock.reception.wizard,order_type:01859#: selection:stock.reception.wizard,order_type:0
1859#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:361860#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:36
1860#: field:supplier.performance.wizard,po_type_donation_exp:01861#: field:supplier.performance.wizard,po_type_donation_exp:0
1862#: code:addons/stock_override/report/report_stock_move.py:28
1861#, python-format1863#, python-format
1862msgid "Donation before expiry"1864msgid "Donation before expiry"
1863msgstr "Donation avant expiration"1865msgstr "Donation avant expiration"
@@ -3626,7 +3628,7 @@
3626msgid "You cannot add any new move while validating the picking, rather you can split the lines prior to validation!"3628msgid "You cannot add any new move while validating the picking, rather you can split the lines prior to validation!"
3627msgstr "Vous ne pouvez ajouter aucun nouveau mouvement tout en validant le picking. Veuillez plutôt fractionner les lignes avant Validation!"3629msgstr "Vous ne pouvez ajouter aucun nouveau mouvement tout en validant le picking. Veuillez plutôt fractionner les lignes avant Validation!"
36283630
3629#. modules: purchase_allocation_report, service_purchasing, stock, purchase_followup, sale, msf_supply_doc_export, procurement_request3631#. modules: purchase_allocation_report, service_purchasing, stock, purchase_followup, sale, msf_supply_doc_export, procurement_request, stock_override
3630#: report:addons/purchase_allocation_report/report/po_allocation_report.mako:1583632#: report:addons/purchase_allocation_report/report/po_allocation_report.mako:158
3631#: report:po.line.allocation.report:03633#: report:po.line.allocation.report:0
3632#: field:purchase.order.followup,categ:03634#: field:purchase.order.followup,categ:0
@@ -3644,6 +3646,7 @@
3644#: report:addons/stock/report/stock_reception_report_xls.mako:2303646#: report:addons/stock/report/stock_reception_report_xls.mako:230
3645#: field:stock.reception.wizard,order_category:03647#: field:stock.reception.wizard,order_category:0
3646#: report:addons/stock/report/stock_delivery_report_xls.mako:2133648#: report:addons/stock/report/stock_delivery_report_xls.mako:213
3649#: code:addons/stock_override/report/report_stock_move.py:826
3647msgid "Order Category"3650msgid "Order Category"
3648msgstr "Catégorie de Commande"3651msgstr "Catégorie de Commande"
36493652
@@ -4054,16 +4057,19 @@
4054msgid "UoM Stock"4057msgid "UoM Stock"
4055msgstr "Stock UdM"4058msgstr "Stock UdM"
40564059
4057#. modules: stock, sync_client, base, stock_override, stock_move_tracking4060#. modules: stock, sync_client, base, stock_move_tracking
4058#: view:stock.move:04061#: view:stock.move:0
4059#: field:ir.translation,src:04062#: field:ir.translation,src:0
4060#: view:sync.client.message_received:04063#: view:sync.client.message_received:0
4061#: view:sync.client.update_received:04064#: view:sync.client.update_received:0
4062#: report:addons/stock_override/report/report_stock_move_xls.mako:142
4063#: report:tracking.move.report:04065#: report:tracking.move.report:0
4066msgid "Source"
4067msgstr "Origine"
4068
4069#. module: stock_override
4064#: code:addons/stock_override/report/report_stock_move.py:7594070#: code:addons/stock_override/report/report_stock_move.py:759
4065msgid "Source"4071msgid "Source"
4066msgstr "Origine"4072msgstr "Source"
40674073
4068#. module: base4074#. module: base
4069#: field:ir.actions.report.xml,auto:04075#: field:ir.actions.report.xml,auto:0
@@ -5533,6 +5539,7 @@
5533#: selection:stock.reception.wizard,order_type:05539#: selection:stock.reception.wizard,order_type:0
5534#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:375540#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:37
5535#: field:supplier.performance.wizard,po_type_donation_st:05541#: field:supplier.performance.wizard,po_type_donation_st:0
5542#: code:addons/stock_override/report/report_stock_move.py:29
5536#, python-format5543#, python-format
5537msgid "Standard donation"5544msgid "Standard donation"
5538msgstr "Donation normale"5545msgstr "Donation normale"
@@ -10179,6 +10186,7 @@
10179#: selection:account.invoice.line,partner_type:010186#: selection:account.invoice.line,partner_type:0
10180#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:3210187#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:32
10181#: field:supplier.performance.wizard,partner_type_intermission:010188#: field:supplier.performance.wizard,partner_type_intermission:0
10189#: code:addons/stock_override/report/report_stock_move.py:23
10182msgid "Intermission"10190msgid "Intermission"
10183msgstr "Intermission"10191msgstr "Intermission"
1018410192
@@ -13054,6 +13062,7 @@
13054#: selection:account.invoice.line,partner_type:013062#: selection:account.invoice.line,partner_type:0
13055#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:3013063#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:30
13056#: field:supplier.performance.wizard,partner_type_external:013064#: field:supplier.performance.wizard,partner_type_external:0
13065#: code:addons/stock_override/report/report_stock_move.py:21
13057msgid "External"13066msgid "External"
13058msgstr "Externe"13067msgstr "Externe"
1305913068
@@ -20712,6 +20721,7 @@
20712#: selection:stock.picking,partner_type_stock_picking:020721#: selection:stock.picking,partner_type_stock_picking:0
20713#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:2920722#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:29
20714#: field:supplier.performance.wizard,partner_type_section:020723#: field:supplier.performance.wizard,partner_type_section:0
20724#: code:addons/stock_override/report/report_stock_move.py:20
20715msgid "Inter-section"20725msgid "Inter-section"
20716msgstr "Inter-section"20726msgstr "Inter-section"
2071720727
@@ -24287,6 +24297,7 @@
24287#: selection:stock.reception.wizard,order_type:024297#: selection:stock.reception.wizard,order_type:0
24288#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:3824298#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:38
24289#: field:supplier.performance.wizard,po_type_loan:024299#: field:supplier.performance.wizard,po_type_loan:0
24300#: code:addons/stock_override/report/report_stock_move.py:27
24290#, python-format24301#, python-format
24291msgid "Loan"24302msgid "Loan"
24292msgstr "Prêt"24303msgstr "Prêt"
@@ -30133,6 +30144,7 @@
30133#: selection:stock.reception.wizard,order_type:030144#: selection:stock.reception.wizard,order_type:0
30134#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:3530145#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:35
30135#: field:supplier.performance.wizard,po_type_regular:030146#: field:supplier.performance.wizard,po_type_regular:0
30147#: code:addons/stock_override/report/report_stock_move.py:27
30136#, python-format30148#, python-format
30137msgid "Regular"30149msgid "Regular"
30138msgstr "Normal"30150msgstr "Normal"
@@ -45887,7 +45899,7 @@
45887msgid "Activate the payroll feature"45899msgid "Activate the payroll feature"
45888msgstr "Activer l'attribut Paie"45900msgstr "Activer l'attribut Paie"
4588945901
45890#. modules: purchase, product, purchase_allocation_report, service_purchasing, consumption_calculation, sale, sales_followup, purchase_compare_rfq, sourcing, order_types, tender_flow, return_claim, purchase_followup, stock45902#. modules: purchase, product, purchase_allocation_report, service_purchasing, consumption_calculation, sale, sales_followup, purchase_compare_rfq, sourcing, order_types, tender_flow, return_claim, purchase_followup, stock, stock_override
45891#: selection:real.average.consumption,categ:045903#: selection:real.average.consumption,categ:0
45892#: selection:stock.move,order_category:045904#: selection:stock.move,order_category:0
45893#: view:product.product:045905#: view:product.product:0
@@ -45912,6 +45924,7 @@
45912#: selection:purchase.report,categ:045924#: selection:purchase.report,categ:0
45913#: selection:tender,categ:045925#: selection:tender,categ:0
45914#: selection:stock.reception.wizard,order_category:045926#: selection:stock.reception.wizard,order_category:0
45927#: code:addons/stock_override/report/report_stock_move.py:532
45915msgid "Transport"45928msgid "Transport"
45916msgstr "Transport"45929msgstr "Transport"
4591745930
@@ -46312,6 +46325,7 @@
46312#: selection:account.invoice.line,partner_type:046325#: selection:account.invoice.line,partner_type:0
46313#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:3146326#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:31
46314#: field:supplier.performance.wizard,partner_type_esc:046327#: field:supplier.performance.wizard,partner_type_esc:0
46328#: code:addons/stock_override/report/report_stock_move.py:22
46315msgid "ESC"46329msgid "ESC"
46316msgstr "ESC"46330msgstr "ESC"
4631746331
@@ -50991,11 +51005,12 @@
50991msgid "Search Donation"51005msgid "Search Donation"
50992msgstr "Rechercher Donation"51006msgstr "Rechercher Donation"
5099351007
50994#. modules: sale, account_override, account51008#. modules: sale, account_override, account, stock_override
50995#: report:addons/sale/report/sale_donation_stock_moves_report_xls.mako:12751009#: report:addons/sale/report/sale_donation_stock_moves_report_xls.mako:127
50996#: field:sale.donation.stock.moves,partner_type:051010#: field:sale.donation.stock.moves,partner_type:0
50997#: field:account.invoice,partner_type:051011#: field:account.invoice,partner_type:0
50998#: field:account.invoice.line,partner_type:051012#: field:account.invoice.line,partner_type:0
51013#: code:addons/stock_override/report/report_stock_move.py:826
50999msgid "Partner Type"51014msgid "Partner Type"
51000msgstr "Type de Partenaire"51015msgstr "Type de Partenaire"
5100151016
@@ -52553,6 +52568,7 @@
52553#: selection:stock.reception.wizard,order_type:052568#: selection:stock.reception.wizard,order_type:0
52554#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:4052569#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:40
52555#: field:supplier.performance.wizard,po_type_purchase_list:052570#: field:supplier.performance.wizard,po_type_purchase_list:0
52571#: code:addons/stock_override/report/report_stock_move.py:32
52556#, python-format52572#, python-format
52557msgid "Purchase List"52573msgid "Purchase List"
52558msgstr "Liste d'Achats"52574msgstr "Liste d'Achats"
@@ -53308,6 +53324,7 @@
53308#: selection:stock.reception.wizard,order_type:053324#: selection:stock.reception.wizard,order_type:0
53309#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:4153325#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:41
53310#: field:supplier.performance.wizard,po_type_direct:053326#: field:supplier.performance.wizard,po_type_direct:0
53327#: code:addons/stock_override/report/report_stock_move.py:33
53311#, python-format53328#, python-format
53312msgid "Direct Purchase Order"53329msgid "Direct Purchase Order"
53313msgstr "Bon de Commande Direct"53330msgstr "Bon de Commande Direct"
@@ -56396,6 +56413,7 @@
56396#: selection:stock.reception.wizard,order_type:056413#: selection:stock.reception.wizard,order_type:0
56397#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:3956414#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:39
56398#: field:supplier.performance.wizard,po_type_in_kind:056415#: field:supplier.performance.wizard,po_type_in_kind:0
56416#: code:addons/stock_override/report/report_stock_move.py:27
56399#, python-format56417#, python-format
56400msgid "In Kind Donation"56418msgid "In Kind Donation"
56401msgstr "Donation en Nature"56419msgstr "Donation en Nature"
@@ -56406,7 +56424,7 @@
56406msgid "Other Types"56424msgid "Other Types"
56407msgstr "Autres Types"56425msgstr "Autres Types"
5640856426
56409#. modules: purchase, tender_flow, service_purchasing, sale, purchase_allocation_report, purchase_followup, return_claim, order_types, purchase_compare_rfq, sourcing, consumption_calculation, stock56427#. modules: purchase, tender_flow, service_purchasing, sale, purchase_allocation_report, purchase_followup, return_claim, order_types, purchase_compare_rfq, sourcing, consumption_calculation, stock, stock_override
56410#: selection:stock.move,order_category:056428#: selection:stock.move,order_category:0
56411#: view:purchase.order:056429#: view:purchase.order:0
56412#: selection:purchase.order,categ:056430#: selection:purchase.order,categ:0
@@ -56428,6 +56446,7 @@
56428#: selection:sale.order.line,categ:056446#: selection:sale.order.line,categ:0
56429#: selection:internal.request.import,imp_categ:056447#: selection:internal.request.import,imp_categ:0
56430#: selection:stock.reception.wizard,order_category:056448#: selection:stock.reception.wizard,order_category:0
56449#: code:addons/stock_override/report/report_stock_move.py:530
56431msgid "Logistic"56450msgid "Logistic"
56432msgstr "Logistique"56451msgstr "Logistique"
5643356452
@@ -61929,6 +61948,7 @@
61929#: field:stock.reception.wizard,order_type:061948#: field:stock.reception.wizard,order_type:0
61930#: code:addons/msf_supply_doc_export/msf_supply_doc_export.py:88261949#: code:addons/msf_supply_doc_export/msf_supply_doc_export.py:882
61931#: report:addons/stock/report/stock_delivery_report_xls.mako:21261950#: report:addons/stock/report/stock_delivery_report_xls.mako:212
61951#: code:addons/stock_override/report/report_stock_move.py:826
61932msgid "Order Type"61952msgid "Order Type"
61933msgstr "Type de Commande"61953msgstr "Type de Commande"
6193461954
@@ -74705,6 +74725,7 @@
74705#: report:addons/stock/report/stock_reception_report_xls.mako:23474725#: report:addons/stock/report/stock_reception_report_xls.mako:234
74706#: report:tracking.move.report:074726#: report:tracking.move.report:0
74707#: report:addons/stock/report/stock_delivery_report_xls.mako:21074727#: report:addons/stock/report/stock_delivery_report_xls.mako:210
74728#: code:addons/stock_override/report/report_stock_move.py:826
74708#, python-format74729#, python-format
74709msgid "Origin"74730msgid "Origin"
74710msgstr "Origine"74731msgstr "Origine"
@@ -90411,7 +90432,7 @@
90411msgid "Export search result"90432msgid "Export search result"
90412msgstr "Exporter le résultat de la recherche"90433msgstr "Exporter le résultat de la recherche"
9041390434
90414#. modules: purchase, tender_flow, msf_outgoing, reason_types_moves, product_asset, sale, purchase_allocation_report, base, order_types, specific_locations, return_claim, service_purchasing, purchase_followup, purchase_compare_rfq, sourcing, consumption_calculation, stock90435#. modules: purchase, tender_flow, msf_outgoing, reason_types_moves, product_asset, sale, purchase_allocation_report, base, order_types, specific_locations, return_claim, service_purchasing, purchase_followup, purchase_compare_rfq, sourcing, consumption_calculation, stock, stock_override
90415#: selection:res.partner.address,type:090436#: selection:res.partner.address,type:0
90416#: field:shipment,carrier_other:090437#: field:shipment,carrier_other:0
90417#: field:shipment,consignee_other:090438#: field:shipment,consignee_other:0
@@ -90440,6 +90461,7 @@
90440#: selection:sale.order.line,categ:090461#: selection:sale.order.line,categ:0
90441#: selection:internal.request.import,imp_categ:090462#: selection:internal.request.import,imp_categ:0
90442#: selection:stock.reception.wizard,order_category:090463#: selection:stock.reception.wizard,order_category:0
90464#: code:addons/stock_override/report/report_stock_move.py:533
90443msgid "Other"90465msgid "Other"
90444msgstr "Autre"90466msgstr "Autre"
9044590467
@@ -95651,6 +95673,7 @@
95651#: selection:account.invoice.line,partner_type:095673#: selection:account.invoice.line,partner_type:0
95652#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:2895674#: code:addons/msf_supply_doc_export/wizard/supplier_performance_wizard.py:28
95653#: field:supplier.performance.wizard,partner_type_internal:095675#: field:supplier.performance.wizard,partner_type_internal:0
95676#: code:addons/stock_override/report/report_stock_move.py:19
95654#, python-format95677#, python-format
95655msgid "Internal"95678msgid "Internal"
95656msgstr "Interne"95679msgstr "Interne"
@@ -96649,7 +96672,7 @@
96649msgid "America/Port-au-Prince"96672msgid "America/Port-au-Prince"
96650msgstr "Amériques/Port-au-Prince"96673msgstr "Amériques/Port-au-Prince"
9665196674
96652#. modules: purchase, tender_flow, purchase_allocation_report, supplier_catalogue, service_purchasing, consumption_calculation, sale, msf_config_locations, procurement, sourcing, order_types, return_claim, purchase_compare_rfq, purchase_followup, stock96675#. modules: purchase, tender_flow, purchase_allocation_report, supplier_catalogue, service_purchasing, consumption_calculation, sale, msf_config_locations, procurement, sourcing, order_types, return_claim, purchase_compare_rfq, purchase_followup, stock, stock_override
96653#: selection:real.average.consumption,categ:096676#: selection:real.average.consumption,categ:0
96654#: model:stock.location,name:msf_config_locations.stock_location_service96677#: model:stock.location,name:msf_config_locations.stock_location_service
96655#: selection:stock.move,order_category:096678#: selection:stock.move,order_category:0
@@ -96674,6 +96697,7 @@
96674#: view:tender:096697#: view:tender:0
96675#: selection:tender,categ:096698#: selection:tender,categ:0
96676#: selection:stock.reception.wizard,order_category:096699#: selection:stock.reception.wizard,order_category:0
96700#: code:addons/stock_override/report/report_stock_move.py:531
96677msgid "Service"96701msgid "Service"
96678msgstr "Service"96702msgstr "Service"
9667996703
@@ -103236,7 +103260,7 @@
103236msgid "Specific Destination Location"103260msgid "Specific Destination Location"
103237msgstr "Zone de Destination Spécifique"103261msgstr "Zone de Destination Spécifique"
103238103262
103239#. module: stock103263#. module: stock, stock_override
103240#: report:addons/stock/report/stock_expired_damaged_report_xls.mako:206103264#: report:addons/stock/report/stock_expired_damaged_report_xls.mako:206
103241#: report:addons/stock/report/stock_expired_damaged_report_xls.mako:217103265#: report:addons/stock/report/stock_expired_damaged_report_xls.mako:217
103242#: field:stock.expired.damaged.report,nomen_manda_0:0103266#: field:stock.expired.damaged.report,nomen_manda_0:0
@@ -103244,6 +103268,7 @@
103244#: field:stock.reception.wizard,nomen_manda_0:0103268#: field:stock.reception.wizard,nomen_manda_0:0
103245#: report:addons/stock/report/stock_delivery_report_xls.mako:190103269#: report:addons/stock/report/stock_delivery_report_xls.mako:190
103246#: field:stock.delivery.wizard,nomen_manda_0:0103270#: field:stock.delivery.wizard,nomen_manda_0:0
103271#: code:addons/stock_override/report/report_stock_move.py:826
103247msgid "Product Main Type"103272msgid "Product Main Type"
103248msgstr "Type Principal du Produit"103273msgstr "Type Principal du Produit"
103249103274
103250103275
=== modified file 'bin/addons/stock_override/report/report_stock_move.py'
--- bin/addons/stock_override/report/report_stock_move.py 2019-10-30 16:33:21 +0000
+++ bin/addons/stock_override/report/report_stock_move.py 2020-01-27 10:41:38 +0000
@@ -15,6 +15,7 @@
15import tempfile15import tempfile
16import base6416import base64
1717
18
18class report_stock_move(osv.osv):19class report_stock_move(osv.osv):
19 _name = "report.stock.move"20 _name = "report.stock.move"
20 _rec_name = 'location_id'21 _rec_name = 'location_id'
@@ -503,10 +504,35 @@
503 )504 )
504505
505 def getLines(self, cr, uid, datas, currency_id, context=None):506 def getLines(self, cr, uid, datas, currency_id, context=None):
506
507 if context is None:507 if context is None:
508 context = {}508 context = {}
509509
510 PARTNER_TYPES = {
511 'internal': _('Internal'),
512 'section': _('Inter-section'),
513 'external': _('External'),
514 'esc': _('ESC'),
515 'intermission': _('Intermission'),
516 }
517
518 ORDER_TYPES = {
519 'regular': _('Regular'),
520 'donation_exp': _('Donation before expiry'),
521 'donation_st': _('Standard donation'),
522 'loan': _('Loan'),
523 'in_kind': _('In Kind Donation'),
524 'purchase_list': _('Purchase List'),
525 'direct': _('Direct Purchase Order'),
526 }
527
528 ORDER_CATEGORIES = {
529 'medical': _('Medical'),
530 'log': _('Logistic'),
531 'service': _('Service'),
532 'transport': _('Transport'),
533 'other': _('Other'),
534 }
535
510 _logger = logging.getLogger('in.out.report')536 _logger = logging.getLogger('in.out.report')
511 prod_obj = self.pool.get('product.product')537 prod_obj = self.pool.get('product.product')
512 curr_obj = self.pool.get('res.currency')538 curr_obj = self.pool.get('res.currency')
@@ -552,12 +578,19 @@
552 pick.name as pick_name,578 pick.name as pick_name,
553 m.date as date,579 m.date as date,
554 uom.name as uom_name,580 uom.name as uom_name,
581 nom.name as nom_name,
555 t.standard_price as standard_price,582 t.standard_price as standard_price,
556 m.location_id as location_src_id,583 m.location_id as location_src_id,
557 m.location_dest_id as location_dest_id,584 m.location_dest_id as location_dest_id,
585 par.name as partner_name,
586 par.partner_type as partner_type,
558 m.reason_type_id as reason_type_id,587 m.reason_type_id as reason_type_id,
559 lot.name as lot_name,588 lot.name as lot_name,
560 lot.life_date as life_date,589 lot.life_date as life_date,
590 COALESCE(pick.origin, m.origin) as origin,
591 pi.ref as pi_name,
592 case when m.sale_line_id is not null and not so.procurement_request then so.order_type when m.purchase_line_id is not null then po.order_type end as order_type,
593 case when m.sale_line_id is not null then so.categ when m.purchase_line_id is not null then po.categ end as order_category,
561 case when pick.subtype not in ('ppl', 'packing') then null when so.procurement_request then %s else pl.currency_id end as bug_pl594 case when pick.subtype not in ('ppl', 'packing') then null when so.procurement_request then %s else pl.currency_id end as bug_pl
562 from595 from
563 stock_move m596 stock_move m
@@ -566,10 +599,16 @@
566 inner join product_template t on t.id = p.product_tmpl_id599 inner join product_template t on t.id = p.product_tmpl_id
567 left join stock_picking pick on m.picking_id = pick.id600 left join stock_picking pick on m.picking_id = pick.id
568 left join stock_production_lot lot on lot.id = m.prodlot_id601 left join stock_production_lot lot on lot.id = m.prodlot_id
569 left join ir_translation trans on trans.name='product.template,name' and trans.res_id=t.id and lang=%s602 left join ir_translation trans on trans.name='product.template,name' and trans.res_id=t.id and trans.lang=%s
570 left join sale_order_line sol on m.sale_line_id = sol.id603 left join sale_order_line sol on m.sale_line_id = sol.id
571 left join sale_order so on sol.order_id = so.id604 left join sale_order so on sol.order_id = so.id
605 left join purchase_order_line pol on m.purchase_line_id = pol.id
606 left join purchase_order po on pol.order_id = po.id
572 left join product_pricelist pl on so.pricelist_id = pl.id607 left join product_pricelist pl on so.pricelist_id = pl.id
608 left join product_nomenclature nom on nom.id = t.nomen_manda_0
609 left join res_partner par on par.id = m.partner_id
610 left join physical_inventory_discrepancy pi_discr on pi_discr.move_id = m.id
611 left join physical_inventory pi on pi.id = pi_discr.inventory_id
573 where612 where
574 m.id in %s613 m.id in %s
575 order by p.default_code, m.date asc, lot.name614 order by p.default_code, m.date asc, lot.name
@@ -607,7 +646,6 @@
607 else:646 else:
608 prod_stock = prod_stock_cache[move['product_id']]['stock']647 prod_stock = prod_stock_cache[move['product_id']]['stock']
609648
610
611 if move['prodlot_id']:649 if move['prodlot_id']:
612 ctx.update({'prodlot_id': move['prodlot_id'], 'from_strict_date': bn_stock_cache.get(move['prodlot_id'], {}).get('to_date', False)})650 ctx.update({'prodlot_id': move['prodlot_id'], 'from_strict_date': bn_stock_cache.get(move['prodlot_id'], {}).get('to_date', False)})
613 if ctx['to_date'] != ctx['from_strict_date']:651 if ctx['to_date'] != ctx['from_strict_date']:
@@ -645,6 +683,7 @@
645 move['default_code'],683 move['default_code'],
646 move['product_name'],684 move['product_name'],
647 move['uom_name'],685 move['uom_name'],
686 move['nom_name'],
648 move_date and datetime.datetime.strptime(move_date, '%Y-%m-%d %H:%M:%S') or '',687 move_date and datetime.datetime.strptime(move_date, '%Y-%m-%d %H:%M:%S') or '',
649 move['lot_name'] or '',688 move['lot_name'] or '',
650 move['life_date'] and datetime.datetime.strptime(move['life_date'], '%Y-%m-%d'),689 move['life_date'] and datetime.datetime.strptime(move['life_date'], '%Y-%m-%d'),
@@ -655,8 +694,13 @@
655 prod_stock,694 prod_stock,
656 location_info.get(move['location_src_id']),695 location_info.get(move['location_src_id']),
657 location_info.get(move['location_dest_id']),696 location_info.get(move['location_dest_id']),
697 move['partner_name'],
698 PARTNER_TYPES.get(move['partner_type']) or '',
658 reason_info.get(move['reason_type_id']) or '',699 reason_info.get(move['reason_type_id']) or '',
659 move['pick_name'] or move['move_name'] or '',700 move['pi_name'] or move['pick_name'] or move['move_name'] or '',
701 move['pi_name'] and move['move_name'] or move['origin'] or '',
702 ORDER_TYPES.get(move['order_type']) or '',
703 ORDER_CATEGORIES.get(move['order_category']) or '',
660 ]704 ]
661705
662 raise StopIteration706 raise StopIteration
@@ -726,6 +770,13 @@
726 """)770 """)
727 row_style.borders = borders771 row_style.borders = borders
728772
773 row_left_style = easyxf("""
774 font: height 200;
775 font: name Calibri;
776 align: wrap on, vert center, horiz left;
777 """)
778 row_left_style.borders = borders
779
729 date_time_format = easyxf(780 date_time_format = easyxf(
730 """781 """
731 font: height 200;782 font: height 200;
@@ -774,7 +825,7 @@
774825
775 row_count += 1826 row_count += 1
776 pos = 0827 pos = 0
777 headers = [(_('Product Code'), '', 25), (_('Product Description'), '', 70), (_('UoM'), '', 11), (_('Stock Move Date'), date_time_format,20), (_('Batch'), '',30), (_('Exp Date'), date_format, 11), (_('Quantity'), '', 10), (_('Unit Price (%s)') % (currency.name,), '', 10), (_('Movement value (%s)') % (currency.name,) , '', 10), (_('BN stock after movement (instance)'), '', 10), (_('Total stock after movement (instance)'), '', 10), (_('Source'), '', 40), (_('Destination'), '', 40), (_('Reason Type'), '', 30), (_('Document Ref.'), '', 40)]828 headers = [(_('Product Code'), '', 25), (_('Product Description'), '', 70), (_('UoM'), '', 11), (_('Product Main Type'), '', 11), (_('Stock Move Date'), date_time_format,20), (_('Batch'), '',30), (_('Exp Date'), date_format, 11), (_('Quantity'), '', 10), (_('Unit Price (%s)') % (currency.name,), '', 10), (_('Movement value (%s)') % (currency.name,) , '', 10), (_('BN stock after movement (instance)'), '', 10), (_('Total stock after movement (instance)'), '', 10), (_('Source'), '', 40), (_('Destination'), '', 40), (_('Partner'), '', 30), (_('Partner Type'), '', 15), (_('Reason Type'), '', 30), (_('Document Ref.'), '', 40), (_('Origin'), '', 70), (_('Order Type'), '', 15), (_('Order Category'), '', 11)]
778829
779 for header_row, col_type, size in headers:830 for header_row, col_type, size in headers:
780 sheet.col(pos).width = size * 256831 sheet.col(pos).width = size * 256
@@ -793,7 +844,10 @@
793 if value and headers[col_count][1]:844 if value and headers[col_count][1]:
794 style = headers[col_count][1]845 style = headers[col_count][1]
795 else:846 else:
796 style = row_style847 if col_count == 18: # Change style on Origin column
848 style = row_left_style
849 else:
850 style = row_style
797 sheet.write(row_count, col_count, value, style)851 sheet.write(row_count, col_count, value, style)
798 col_count += 1852 col_count += 1
799 #sheet.row(row_count).height = 60*20853 #sheet.row(row_count).height = 60*20
800854
=== removed file 'bin/addons/stock_override/report/report_stock_move_xls.mako.THIS'

Subscribers

People subscribed via source and target branches