update lang in config, production order
							parent
							
								
									2e5e5328ff
								
							
						
					
					
						commit
						cc2fb2900d
					
				|  | @ -0,0 +1,123 @@ | ||||||
|  | <?xml version="1.0"?> | ||||||
|  | <document filename="Picking_Auftrag.pdf"> | ||||||
|  |   <template pageSize="(595.0,842.0)" title="Picking Auftrag" author="www.camadeus.at" allowSplitting="20"> | ||||||
|  |     <pageTemplate id="first"> | ||||||
|  |       <frame id="first" x1="15.0" y1="42.0" width="539" height="758"/> | ||||||
|  |     </pageTemplate> | ||||||
|  |   </template> | ||||||
|  |   | ||||||
|  |   <story> | ||||||
|  |   	 | ||||||
|  |     <para> | ||||||
|  |       <seqReset id="L1"/> | ||||||
|  |     </para>   | ||||||
|  |     | ||||||
|  |     <para>[[ repeatIn(objects,'o') ]] [[ o.partner_id and setLang(o.partner_id.lang) ]]</para> | ||||||
|  |   | ||||||
|  |      <blockTable colWidths="260,260" style="Struktur" hAlign="RIGHT"> | ||||||
|  |       <tr> | ||||||
|  |         <td> | ||||||
|  |             <para style="normal">AUFTRAGSNUMMER: [[ o.origin or '' ]]</para> | ||||||
|  |         </td> | ||||||
|  |         <td> | ||||||
|  |             <para style="normal_rechts"></para> | ||||||
|  |         </td> | ||||||
|  |       </tr> | ||||||
|  |     </blockTable>      | ||||||
|  |      | ||||||
|  |      <blockTable colWidths="292,100,126" style="Struktur" hAlign="RIGHT"> | ||||||
|  |       <tr> | ||||||
|  |         <td>  | ||||||
|  |         	<para style="fett"></para> | ||||||
|  |         	<!-- | ||||||
|  |         	<spacer length="0.5cm"/> | ||||||
|  |         	<para style="fett">Fertigung für:</para> | ||||||
|  |         	<para style="normal">KEINE partner_id in mrp.production!</para>	 | ||||||
|  |             <spacer length="0.5cm"/> 	 | ||||||
|  | 
 | ||||||
|  |         	<spacer length="0.2cm"/> | ||||||
|  | 		    <para style="normal">[[ o.partner_id.commercial_partner_id.name ]]</para> | ||||||
|  | 		    <spacer length="0.1cm"/> | ||||||
|  | 		    <para style="normal">[[ (o.partner_id.commercial_partner_id.id != o.partner_id.id and o.partner_id.name) or '' ]] </para> | ||||||
|  | 		    <spacer length="0.1cm"/> | ||||||
|  | 		    <para style="normal">[[ (o.partner_id.street ) or '']]</para> | ||||||
|  | 		    <spacer length="0.1cm"/> | ||||||
|  | 		    <para style="normal">[[ (o.partner_id.street2) or removeParentNode('para') ]]</para> | ||||||
|  | 		    <spacer length="0.1cm"/> | ||||||
|  | 		    <para style="normal">[[ (o.partner_id.zip) or '' ]] [[ (o.partner_id and o.partner_id.city) or '' ]]</para> | ||||||
|  | 		    <spacer length="0.1cm"/> | ||||||
|  | 		    <para style="normal">[[ (o.partner_id.state_id and o.partner_id.state_id.name) or removeParentNode('para')]]</para> | ||||||
|  | 		    <spacer length="0.1cm"/> | ||||||
|  | 		    <para style="normal">[[ (o.partner_id.country_id and o.partner_id.country_id.name) or '' ]]</para> | ||||||
|  | 		    <spacer length="0.5cm"/>  | ||||||
|  |         	--> | ||||||
|  |         </td> | ||||||
|  |         <td> | ||||||
|  |         	<spacer length="1.0cm"/> | ||||||
|  |             <para style="normal_center"></para> | ||||||
|  |         </td> | ||||||
|  |         <td> | ||||||
|  |         	<spacer length="1.0cm"/> | ||||||
|  | 		    <para style="normal_rechts"></para> | ||||||
|  |         </td> | ||||||
|  |       </tr> | ||||||
|  |      </blockTable>  | ||||||
|  |      <blockTable colWidths="292,226" style="Struktur" hAlign="RIGHT"> | ||||||
|  |       <tr> | ||||||
|  |         <td>  | ||||||
|  | 		   <para style="normal_big"><b>FERTIGUNG: [[ o.name ]]</b></para> | ||||||
|  | 		   <spacer length="0.2cm"/> | ||||||
|  |         </td> | ||||||
|  |         <td> | ||||||
|  |         	<para style="normal_rechts_big">DATUM: [[ formatLang(o.date_planned,date=True) or formatLang(time.strftime('%Y-%m-%d'),date=True) ]]</para> | ||||||
|  |         	<spacer length="0.2cm"/> | ||||||
|  |         </td> | ||||||
|  |       </tr> | ||||||
|  |     </blockTable>    | ||||||
|  |      | ||||||
|  |     <spacer length="0.5cm"/>      | ||||||
|  |      | ||||||
|  |     <blockTable colWidths="100, 210,210" style="Struktur" hAlign="RIGHT"> | ||||||
|  |       <tr> | ||||||
|  |         <td> | ||||||
|  |           <para style="tabelle_daten_links"></para> | ||||||
|  |         </td>	 | ||||||
|  |         <td>  | ||||||
|  |         	<para style="tabelle_daten_links"><b>Fertigungsartikel: [[ (o.product_id.default_code and '['+o.product_id.default_code+']') or '']] [[ o.product_id.name ]]</b></para> | ||||||
|  |         </td> | ||||||
|  |         <td> | ||||||
|  |         	<para style="tabelle_daten_links"><b>Zu fertigende Menge: [[ o.product_qty ]]</b></para> | ||||||
|  |         </td> | ||||||
|  |       </tr> | ||||||
|  |      </blockTable>    | ||||||
|  |      | ||||||
|  |     <spacer length="0.5cm"/>  		 | ||||||
|  |     | ||||||
|  |     <blockTable colWidths="100, 210,210" style="Struktur" hAlign="RIGHT"> | ||||||
|  |        <tr> | ||||||
|  |         <td> | ||||||
|  |           <para style="tabelle_daten_links">Bestandteile:</para> | ||||||
|  |          <spacer length="0.2cm"/>    | ||||||
|  |         </td> | ||||||
|  |         <td> | ||||||
|  |           <para style="tabelle_daten_links">Artikel</para> | ||||||
|  |         </td> | ||||||
|  |         <td> | ||||||
|  |           <para style="tabelle_daten_links">Menge</para> | ||||||
|  |         </td> | ||||||
|  |       </tr> | ||||||
|  |       <tr>[[repeatIn(o.move_lines,'line')]] | ||||||
|  |         <td> | ||||||
|  |           <para style="tabelle_daten_links"></para> | ||||||
|  |         </td>	 | ||||||
|  |         <td> | ||||||
|  |           <para style="tabelle_daten_links">[[ (line.product_id.default_code and '['+line.product_id.default_code+']') or '']] [[ line.product_id.name]]</para> | ||||||
|  |         </td> | ||||||
|  |         <td> | ||||||
|  |           <para style="tabelle_daten_links">[[ line.product_qty ]]</para> | ||||||
|  |         </td>         | ||||||
|  |       </tr> | ||||||
|  |     </blockTable>   | ||||||
|  | 
 | ||||||
|  |   </story> | ||||||
|  | </document> | ||||||
|  | @ -25,5 +25,10 @@ | ||||||
|             <field name="report_rml">cam_reports/report/purchase.order.rml</field> |             <field name="report_rml">cam_reports/report/purchase.order.rml</field> | ||||||
|             <field name="report_type">pdf</field> |             <field name="report_type">pdf</field> | ||||||
|         </record> |         </record> | ||||||
|  |          | ||||||
|  |         <record id="mrp.action_report_production_order" model="ir.actions.report.xml"> | ||||||
|  |             <field name="report_rml">cam_reports/report/mrp.production.rml</field> | ||||||
|  |             <field name="report_type">pdf</field> | ||||||
|  |         </record>           | ||||||
|     </data> |     </data> | ||||||
| </openerp> | </openerp> | ||||||
|  | @ -4,6 +4,7 @@ class Config(): | ||||||
| 
 | 
 | ||||||
|     def __init__(self): |     def __init__(self): | ||||||
|          |          | ||||||
|  |         self.lang = 'de_DE' #                 de_DE, en_US | ||||||
|         self.chart_of_accounts = 'l10n_at' |         self.chart_of_accounts = 'l10n_at' | ||||||
|         self.sales_tax = '20% MwSt' |         self.sales_tax = '20% MwSt' | ||||||
|         self.purchase_tax = '20% VSt' |         self.purchase_tax = '20% VSt' | ||||||
|  | @ -43,7 +44,7 @@ class Config(): | ||||||
|          |          | ||||||
|         # Nur für Lager |         # Nur für Lager | ||||||
|         # Wenn nicht gesetzt, dann wird der Firmenname genommen |         # Wenn nicht gesetzt, dann wird der Firmenname genommen | ||||||
|         self.warehouse_name = False         |         self.warehouse_name = 'Bademeisterei'         | ||||||
|          |          | ||||||
|         self.valid_taxes = [ |         self.valid_taxes = [ | ||||||
|             '20% MwSt', |             '20% MwSt', | ||||||
|  | @ -104,6 +105,7 @@ class Config(): | ||||||
|         self.stock_config = { |         self.stock_config = { | ||||||
|             'group_stock_multiple_locations': True,      # Verwalten Sie mehrere Lager und Lagerorte |             'group_stock_multiple_locations': True,      # Verwalten Sie mehrere Lager und Lagerorte | ||||||
|             'group_stock_tracking_lot': False,           # Benutze Verpackungen: Paletten, Boxen, ... |             'group_stock_tracking_lot': False,           # Benutze Verpackungen: Paletten, Boxen, ... | ||||||
|  |             'group_stock_production_lot': True,          # Verfolgen Sie Los- und Seriennummern. | ||||||
|             'group_stock_packaging': False,              # Ermöglicht die Auswahl einer Verpackung             |             'group_stock_packaging': False,              # Ermöglicht die Auswahl einer Verpackung             | ||||||
|         }   |         }   | ||||||
| 
 | 
 | ||||||
|  | @ -157,6 +159,7 @@ class Config(): | ||||||
|             #'product.product_uom_meter': 'lfm', |             #'product.product_uom_meter': 'lfm', | ||||||
|             #'product.product_uom_litre': 'l', |             #'product.product_uom_litre': 'l', | ||||||
|             #'product.product_uom_hour': 'h', |             #'product.product_uom_hour': 'h', | ||||||
|  |             #'product.product_uom_kgm': 'kg', | ||||||
|         }         |         }         | ||||||
| 
 | 
 | ||||||
|         #Lieferbedingungen |         #Lieferbedingungen | ||||||
|  | @ -185,7 +188,7 @@ class Config(): | ||||||
|             'sale', |             'sale', | ||||||
|             #'cam_hr_overtime', |             #'cam_hr_overtime', | ||||||
|             #'cam_hr', |             #'cam_hr', | ||||||
|             #'sale_order_optiona', |             #'sale_order_optional', | ||||||
|             #'sale_order_reminder', |             #'sale_order_reminder', | ||||||
|         ] |         ] | ||||||
|          |          | ||||||
|  |  | ||||||
|  | @ -9,7 +9,6 @@ class Environment(): | ||||||
|         self.pwd = pwd |         self.pwd = pwd | ||||||
|         self.port = port |         self.port = port | ||||||
|         self.host = host |         self.host = host | ||||||
|         self.lang = 'de_DE' |  | ||||||
|         self.basic_auth = basic_auth or ('user', 'pass') # HTTP authentification |         self.basic_auth = basic_auth or ('user', 'pass') # HTTP authentification | ||||||
|      |      | ||||||
|     def __str__(self): |     def __str__(self): | ||||||
|  |  | ||||||
|  | @ -22,7 +22,7 @@ class CamadeusFunctions(): | ||||||
|         payload = {'fields': [  {'name': 'super_admin_pwd', 'value': self.env.admin_pw}, |         payload = {'fields': [  {'name': 'super_admin_pwd', 'value': self.env.admin_pw}, | ||||||
|                                 {'name': 'db_name', 'value': self.env.dbname}, |                                 {'name': 'db_name', 'value': self.env.dbname}, | ||||||
|                                 {'name': 'demo_data', 'value': False}, |                                 {'name': 'demo_data', 'value': False}, | ||||||
|                                 {'name': 'db_lang', 'value': self.env.lang}, |                                 {'name': 'db_lang', 'value': self.config.lang}, | ||||||
|                                 {'name': 'create_admin_pwd', 'value': self.env.pwd}, |                                 {'name': 'create_admin_pwd', 'value': self.env.pwd}, | ||||||
|                             ] |                             ] | ||||||
|                   } |                   } | ||||||
|  | @ -87,7 +87,7 @@ class CamadeusFunctions(): | ||||||
|     def set_date_format(self): |     def set_date_format(self): | ||||||
|         """Setzen des Datumsformats """ |         """Setzen des Datumsformats """ | ||||||
|          |          | ||||||
|         lang_ids = self._execute('res.lang', 'search',  [('code','=','de_DE')]) |         lang_ids = self._execute('res.lang', 'search',  [('code','=',self.config.lang)]) | ||||||
|         if lang_ids: |         if lang_ids: | ||||||
|             vals = { |             vals = { | ||||||
|                 'date_format': '%d.%m.%Y', |                 'date_format': '%d.%m.%Y', | ||||||
|  | @ -377,7 +377,7 @@ class CamadeusFunctions(): | ||||||
|     def set_uom(self): |     def set_uom(self): | ||||||
|         """Mengeneinheiten setzen""" |         """Mengeneinheiten setzen""" | ||||||
|          |          | ||||||
|         context = {'lang': 'de_DE'} |         context = {'lang': self.config.lang} | ||||||
|         c = self.config |         c = self.config | ||||||
|         active_uoms = c.active_uoms.keys() |         active_uoms = c.active_uoms.keys() | ||||||
| 
 | 
 | ||||||
|  | @ -585,19 +585,19 @@ class CamadeusFunctions(): | ||||||
|     def set_translations(self): |     def set_translations(self): | ||||||
|         """Übersetzungen aktualisieren """ |         """Übersetzungen aktualisieren """ | ||||||
|              |              | ||||||
|         if hasattr(self.config, 'translation_files'): |         if hasattr(self.config, 'translation_files') and self.config.lang != 'en_US': | ||||||
|             for file in self.config.translation_files: |             for file in self.config.translation_files: | ||||||
|                 data = self._readAndReturnFile(file,encode='base64') |                 data = self._readAndReturnFile(file,encode='base64') | ||||||
|                 vals = { |                 vals = { | ||||||
|                     'name': 'test', |                     'name': 'test', | ||||||
|                     'code': 'de_DE', |                     'code': self.config.lang, | ||||||
|                     'data': data, |                     'data': data, | ||||||
|                     'overwrite': True, |                     'overwrite': True, | ||||||
|                 } |                 } | ||||||
|                 wizard_id = self._execute('base.language.import', 'create', vals)             |                 wizard_id = self._execute('base.language.import', 'create', vals)             | ||||||
|                 self._execute('base.language.import', 'import_lang', [wizard_id]) |                 self._execute('base.language.import', 'import_lang', [wizard_id]) | ||||||
|                 return True |                 return True | ||||||
|         return False |         return True | ||||||
|      |      | ||||||
|     def default_set_order_policy(self): |     def default_set_order_policy(self): | ||||||
|         """Setze Rechnung von Lieferschein""" |         """Setze Rechnung von Lieferschein""" | ||||||
|  | @ -620,7 +620,7 @@ class CamadeusFunctions(): | ||||||
|                 return False |                 return False | ||||||
|              |              | ||||||
|             return self._execute('stock.location', 'write', stock_id,{'removal_strategy_id':strategy_ids[0]}) |             return self._execute('stock.location', 'write', stock_id,{'removal_strategy_id':strategy_ids[0]}) | ||||||
|         return False |         return True | ||||||
| 
 | 
 | ||||||
|     def set_default_values(self): |     def set_default_values(self): | ||||||
|         """Defaultwerte für Dokumente setzen""" |         """Defaultwerte für Dokumente setzen""" | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue