Fall 5556: Dokumentenvorlage - Lieferschein
							parent
							
								
									5dded76140
								
							
						
					
					
						commit
						9457c8d3bb
					
				|  | @ -42,3 +42,18 @@ class StockProductionLot(models.Model): | ||||||
|     def write(self, vals): |     def write(self, vals): | ||||||
|         tools.image_resize_images(vals) |         tools.image_resize_images(vals) | ||||||
|         return super(StockProductionLot, self).write(vals) |         return super(StockProductionLot, self).write(vals) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class StockPicking(models.Model): | ||||||
|  |     _inherit = 'stock.picking' | ||||||
|  | 
 | ||||||
|  |     @api.model | ||||||
|  |     def _formatLang(self, value): | ||||||
|  |         lang = self.partner_id.lang | ||||||
|  |         lang_objs = self.env['res.lang'].search([('code', '=', lang)]) | ||||||
|  |         if not lang_objs: | ||||||
|  |             lang_objs = self.env['res.lang'].search([], limit=1) | ||||||
|  |         lang_obj = lang_objs[0] | ||||||
|  | 
 | ||||||
|  |         res = lang_obj.format('%.' + str(2) + 'f', value, grouping=True, monetary=True) | ||||||
|  |         return res | ||||||
|  |  | ||||||
|  | @ -54,6 +54,10 @@ | ||||||
|                         </t> |                         </t> | ||||||
|                         <span t-field="o.quote_name"/> |                         <span t-field="o.quote_name"/> | ||||||
|                     </p> |                     </p> | ||||||
|  |                     <p t-if="o._name == 'stock.picking' and is_picking"> | ||||||
|  |                             <span>Lieferschein</span> | ||||||
|  |                         <span t-field="o.name"/> | ||||||
|  |                     </p> | ||||||
|                 </div> |                 </div> | ||||||
|                 <div class="col-xs-4 header-logo"> |                 <div class="col-xs-4 header-logo"> | ||||||
|                     <img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo.decode()" |                     <img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo.decode()" | ||||||
|  |  | ||||||
|  | @ -18,8 +18,8 @@ msgstr "" | ||||||
| 
 | 
 | ||||||
| #. module: dp_reports_stock | #. module: dp_reports_stock | ||||||
| #: model:ir.ui.view,arch_db:dp_reports_stock.report_stockpicking_document | #: model:ir.ui.view,arch_db:dp_reports_stock.report_stockpicking_document | ||||||
| msgid "<span><strong>Customer Address:</strong></span>" | msgid ""<strong>Customer Address:</strong>" | ||||||
| msgstr "<span><strong>Kundenadresse:</strong></span>" | msgstr "<strong>Kundenadresse:</strong>" | ||||||
| 
 | 
 | ||||||
| #. module: dp_reports_stock | #. module: dp_reports_stock | ||||||
| #: model:ir.ui.view,arch_db:dp_reports_stock.report_stockpicking_document | #: model:ir.ui.view,arch_db:dp_reports_stock.report_stockpicking_document | ||||||
|  |  | ||||||
|  | @ -32,11 +32,7 @@ | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     </div> | ||||||
| 
 | 
 | ||||||
|                     <h2> |                     <table class="table table-condensed mt32"> | ||||||
|                         <span t-field="o.name"/> |  | ||||||
|                     </h2> |  | ||||||
| 
 |  | ||||||
|                     <table class="table table-condensed"> |  | ||||||
|                         <thead class="table-header"> |                         <thead class="table-header"> | ||||||
|                             <tr> |                             <tr> | ||||||
|                                 <th t-if="o.origin"> |                                 <th t-if="o.origin"> | ||||||
|  | @ -99,7 +95,7 @@ | ||||||
|                                     <span t-field="move.product_id"/> |                                     <span t-field="move.product_id"/> | ||||||
|                                 </td> |                                 </td> | ||||||
|                                 <td> |                                 <td> | ||||||
|                                     <span t-field="move.ordered_qty"/> |                                     <span t-esc="o._formatLang(move_line.ordered_qty).strip('0').strip(',').strip('.')"/> | ||||||
|                                     <span t-field="move.product_uom"/> |                                     <span t-field="move.product_uom"/> | ||||||
|                                 </td> |                                 </td> | ||||||
|                             </tr> |                             </tr> | ||||||
|  | @ -153,7 +149,7 @@ | ||||||
|                                                 </td> |                                                 </td> | ||||||
|                                                 <td name="lot_qty"> |                                                 <td name="lot_qty"> | ||||||
|                                                     <t t-if="move_line.product_qty"> |                                                     <t t-if="move_line.product_qty"> | ||||||
|                                                         <span t-field="move_line.product_qty"/> |                                                         <span t-esc="o._formatLang(move_line.product_qty).strip('0').strip(',').strip('.')"/> | ||||||
|                                                     </t> |                                                     </t> | ||||||
|                                                 </td> |                                                 </td> | ||||||
|                                             </tr> |                                             </tr> | ||||||
|  | @ -163,14 +159,14 @@ | ||||||
|                                 <td class="text-center"> |                                 <td class="text-center"> | ||||||
|                                     <span t-field="move_line.package_id"/> |                                     <span t-field="move_line.package_id"/> | ||||||
|                                     <span t-if="move_line.package_id">:</span> |                                     <span t-if="move_line.package_id">:</span> | ||||||
|                                     <span t-field="move_line.ordered_qty"/> |                                     <span t-esc="o._formatLang(move_line.ordered_qty).strip('0').strip(',').strip('.')"/> | ||||||
|                                     <span t-field="move_line.product_uom_id"/> |                                     <span t-field="move_line.product_uom_id"/> | ||||||
|                                 </td> |                                 </td> | ||||||
|                                 <td class="text-right" t-if="move_line.state == 'done'"> |                                 <td class="text-right" t-if="move_line.state == 'done'"> | ||||||
|                                     <t t-if="move_line.ordered_qty != move_line.qty_done"> |                                     <t t-if="move_line.ordered_qty != move_line.qty_done"> | ||||||
|                                         <t t-set="backorder" t-value="True"/> |                                         <t t-set="backorder" t-value="True"/> | ||||||
|                                     </t> |                                     </t> | ||||||
|                                     <span t-field="move_line.qty_done"/> |                                     <span t-esc="o._formatLang(move_line.qty_done).strip('0').strip(',').strip('.')"/> | ||||||
|                                     <span t-field="move_line.product_uom_id"/> |                                     <span t-field="move_line.product_uom_id"/> | ||||||
|                                 </td> |                                 </td> | ||||||
|                             </tr> |                             </tr> | ||||||
|  | @ -187,7 +183,7 @@ | ||||||
|                         <div class="col-xs-6"> |                         <div class="col-xs-6"> | ||||||
|                             <span class="pull-right" style="padding-top: 5px; border-top: 1px solid;"> |                             <span class="pull-right" style="padding-top: 5px; border-top: 1px solid;"> | ||||||
|                                 <strong>Total Amount:</strong> |                                 <strong>Total Amount:</strong> | ||||||
|                                 <span t-field="o.weight"/> |                                 <span t-field="o.number_of_packages"/> | ||||||
|                             </span> |                             </span> | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     </div> | ||||||
|  | @ -211,6 +207,7 @@ | ||||||
|         <template id="stock.report_deliveryslip"> |         <template id="stock.report_deliveryslip"> | ||||||
|             <t t-call="web.html_container"> |             <t t-call="web.html_container"> | ||||||
|                 <t t-foreach="docs" t-as="o"> |                 <t t-foreach="docs" t-as="o"> | ||||||
|  |                     <t t-set="is_picking" t-value="True"/> | ||||||
|                     <t t-call="dp_reports_stock.report_stockpicking_document" t-lang="o.partner_id.lang"/> |                     <t t-call="dp_reports_stock.report_stockpicking_document" t-lang="o.partner_id.lang"/> | ||||||
|                 </t> |                 </t> | ||||||
|             </t> |             </t> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue