@@ -612,10 +612,11 @@ class account_invoice(osv.osv):
|
||||
line2 = {}
|
||||
for x, y, l in line:
|
||||
tmp = str(l['account_id'])
|
||||
tmp += '-'+str('tax_code_id' in l and l['tax_code_id'] or "False")
|
||||
tmp += '-'+str('product_id' in l and l['product_id'] or "False")
|
||||
tmp += '-'+str('analytic_account_id' in l and l['analytic_account_id'] or "False")
|
||||
|
||||
tmp += '-'+str(l.get('tax_code_id',"False"))
|
||||
tmp += '-'+str(l.get('product_id',"False"))
|
||||
tmp += '-'+str(l.get('analytic_account_id',"False"))
|
||||
tmp += '-'+str(l.get('date_maturity',"False"))
|
||||
|
||||
if tmp in line2:
|
||||
am = line2[tmp]['debit'] - line2[tmp]['credit'] + (l['debit'] - l['credit'])
|
||||
line2[tmp]['debit'] = (am > 0) and am or 0.0
|
||||
|
||||
@@ -233,7 +233,8 @@
|
||||
<images/>
|
||||
<story>
|
||||
<para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
|
||||
<para style="terp_default_8">[[ setLang(o.partner_id.lang) ]]</para>
|
||||
<para style="terp_default_8">JJJJJ [[ o.partner_id.name ]]</para>
|
||||
<para style="terp_default_8">[[ setLang(o.partner_id.lang) ]] </para>
|
||||
<blockTable colWidths="297.0,233.0" style="Table_Partner_Address">
|
||||
<tr>
|
||||
<td><para style="P8"><font color="white"> </font></para></td>
|
||||
@@ -300,7 +301,7 @@
|
||||
<td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="terp_default_Note">[[ format(l.note or removeParentNode('tr')) ]]</para></td>
|
||||
<td><para style="terp_default_Note">[[ format(l.note) or removeParentNode('tr') ]]</para></td>
|
||||
<td><para style="terp_default_Note"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Note"><font color="white"> </font></para></td>
|
||||
<td><para style="terp_default_Note"><font color="white"> </font></para></td>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<para style="P23">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Canceled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P16"><font>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]]</font><font>[[ o.number ]]</font></para>
|
||||
@@ -163,7 +163,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="terp_default_Note">Note : [[ format(a['note'] or removeParentNode('tr')) ]]</para></td>
|
||||
<td><para style="terp_default_Note">Note : [[ format(a['note']) or removeParentNode('tr') ]]</para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
<td><para><font color="white"></font></para></td>
|
||||
<td><para style="P7"><font color="white"></font></para></td>
|
||||
@@ -173,8 +173,8 @@
|
||||
</blockTable>
|
||||
<blockTable colWidths="453.0,74.0" style="Tableau8">
|
||||
<tr>
|
||||
<td><para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('blockTable') ]]</para></td>
|
||||
<td><para style="P8">[[ a['type']=='text' and '' or removeParentNode('blockTable') ]]</para></td>
|
||||
<td><para style="Table Contents">[[ a['type']=='text' and format(a['name']) or removeParentNode('blockTable') ]]</para></td>
|
||||
<td><para style="P8">[[ a['type']=='text' and '' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
@@ -232,7 +232,7 @@
|
||||
<td><para style="P8">Amount</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11a"><font>[[ repeatIn(o.tax_line,'t') ]]</font>[[ t.name ]]</para></td>
|
||||
<td><para style="P10"><font>[[ repeatIn(o.tax_line,'t') ]]</font><font>[[ t.name ]]</font></para></td>
|
||||
<td><para style="P11">[[ '%.2f' % t.base ]]</para></td>
|
||||
<td><para style="P11">[[ '%.2f' % t.amount]]</para></td>
|
||||
</tr>
|
||||
@@ -257,7 +257,7 @@
|
||||
<para style="P8b">
|
||||
<font color="white"></font>
|
||||
</para>
|
||||
<para style="P19">[[ format(o.comment) or '' ]]</para>
|
||||
<para style="P19">[[ format(o.payment_term and o.payment_term.note) or '' ]]</para>
|
||||
<para style="P19">[[ format(o.comment) or removeParentNode('para') ]]</para>
|
||||
<para style="P19">[[ format(o.payment_term and o.payment_term.note) or removeParentNode('para') ]]</para>
|
||||
</story>
|
||||
</document>
|
||||
@@ -130,7 +130,7 @@
|
||||
<para style="P23">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Canceled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
|
||||
<para style="P23">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P23">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
|
||||
<para style="P16"><font>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]]</font><font>[[ o.number ]]</font></para>
|
||||
@@ -165,7 +165,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P8"><font color="white"></font></para></td>
|
||||
<td><para style="terp_default_Note">Note : [[ format(a['note'] or removeParentNode('tr')) ]]</para></td>
|
||||
<td><para style="terp_default_Note">Note : [[ format(a['note']) or removeParentNode('tr') ]]</para></td>
|
||||
<td><para style="Table Contents"><font color="white"></font></para></td>
|
||||
<td><para><font color="white"></font></para></td>
|
||||
<td><para style="P7"><font color="white"></font></para></td>
|
||||
@@ -175,8 +175,8 @@
|
||||
</blockTable>
|
||||
<blockTable colWidths="453.0,74.0" style="Tableau8">
|
||||
<tr>
|
||||
<td><para style="Table Contents">[[ a['type']=='text' and a['name'] or removeParentNode('blockTable') ]]</para></td>
|
||||
<td><para style="P8">[[ a['type']=='text' and '' or removeParentNode('blockTable') ]]</para></td>
|
||||
<td><para style="Table Contents">[[ a['type']=='text' and format(a['name']) or removeParentNode('blockTable') ]]</para></td>
|
||||
<td><para style="P8">[[ a['type']=='text' and '' ]]</para></td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak>[[ a['type']!='break' and removeParentNode('pageBreak')]]</pageBreak>
|
||||
@@ -234,7 +234,7 @@
|
||||
<td><para style="P8">Amount</para></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><para style="P11a"><font>[[ repeatIn(o.tax_line,'t') ]]</font>[[ t.name ]]</para></td>
|
||||
<td><para style="P10"><font>[[ repeatIn(o.tax_line,'t') ]]</font><font>[[ t.name ]]</font></para></td>
|
||||
<td><para style="P11">[[ '%.2f' % t.base ]]</para></td>
|
||||
<td><para style="P11">[[ '%.2f' % t.amount]]</para></td>
|
||||
</tr>
|
||||
@@ -259,14 +259,14 @@
|
||||
<para style="P8b">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P19">[[ format(o.comment) or '' ]]</para>
|
||||
<para style="P19">[[ format(o.payment_term and o.payment_term.note) or '' ]]</para>
|
||||
<para style="P19">[[ format(o.comment) or removeParentNode('para') ]]</para>
|
||||
<para style="P19">[[ format(o.payment_term and o.payment_term.note) or removeParentNode('para') ]]</para>
|
||||
<para style="P8b">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="P19">[[ repeatIn((spcl_msg(data['form']) and spcl_msg(data['form']).splitlines()) or [], 'note') ]]</para>
|
||||
<para style="P19">[[ note or removeParentNode('para') ]]</para>
|
||||
<para style="P19">[[ format(note) or removeParentNode('para') ]]</para>
|
||||
</section>
|
||||
</story>
|
||||
</document>
|
||||
|
||||
+3
-1
@@ -481,7 +481,9 @@ class crm_case(osv.osv):
|
||||
write['priority'] = action.act_priority
|
||||
if action.act_email_cc:
|
||||
if '@' in (case.email_cc or ''):
|
||||
write['email_cc'] = case.email_cc+','+action.act_email_cc
|
||||
emails = case.email_cc.split(",")
|
||||
if action.act_email_cc not in emails:# and '<'+str(action.act_email_cc)+">" not in emails:
|
||||
write['email_cc'] = case.email_cc+','+action.act_email_cc
|
||||
else:
|
||||
write['email_cc'] = action.act_email_cc
|
||||
write['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
|
||||
Regular → Executable
+3
-5
@@ -101,7 +101,7 @@ class email_parser(object):
|
||||
'email_cc': self._decode_header(msg['Cc'] or ''),
|
||||
'canal_id': self.canal_id,
|
||||
'user_id': False,
|
||||
'history_line': [(0, 0, {'description': message['body'], 'email': msg['From'] })],
|
||||
'history_line': [(0, 0, {'name': 'Create','section_id': self.section_id,'canal_id': self.canal_id,'description': message['body'], 'email': msg['From'] })],
|
||||
}
|
||||
try:
|
||||
data.update(self.partner_get(self._decode_header(msg['From'])))
|
||||
@@ -111,7 +111,6 @@ class email_parser(object):
|
||||
|
||||
try:
|
||||
id = self.rpc('crm.case', 'create', data)
|
||||
|
||||
|
||||
except Exception,e:
|
||||
if getattr(e,'faultCode','') and 'AccessError' in e.faultCode:
|
||||
@@ -192,9 +191,8 @@ class email_parser(object):
|
||||
body['body'] = body_data
|
||||
|
||||
data = {
|
||||
'history_line': [(0, 0, {'description': body['body'], 'email': msg['From']})],
|
||||
'history_line': [(0, 0, {'name': 'Close','section_id': self.section_id,'canal_id': self.canal_id,'description': body['body'], 'email': msg['From']})],
|
||||
}
|
||||
|
||||
act = 'case_close'
|
||||
if 'state' in actions:
|
||||
if actions['state'] in ['draft','close','cancel','open','pending']:
|
||||
@@ -248,7 +246,7 @@ class email_parser(object):
|
||||
self.rpc('crm.case', act, [id])
|
||||
body2 = '\n'.join(map(lambda l: '> '+l, (body or '').split('\n')))
|
||||
data = {
|
||||
'history_line': [(0, 0, {'description': body, 'email': msg['From'][:84]})],
|
||||
'history_line': [(0, 0, {'name': 'Open','section_id': self.section_id,'canal_id': self.canal_id,'description': body, 'email': msg['From'][:84]})],
|
||||
}
|
||||
self.rpc('crm.case', 'write', [id], data)
|
||||
return id
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data noupdate="1">
|
||||
|
||||
<record model="document.directory.content.type" id="pdf">
|
||||
<field name="code">.pdf</field>
|
||||
|
||||
@@ -483,6 +483,14 @@ class mrp_production(osv.osv):
|
||||
result = {'product_uom':uom}
|
||||
return {'value':result}
|
||||
|
||||
def bom_id_change(self, cr, uid, ids, product):
|
||||
if not product:
|
||||
return {}
|
||||
res = self.pool.get('mrp.bom').read(cr, uid, [product], ['routing_id'])[0]
|
||||
routing_id = res['routing_id'] and res['routing_id'][0]
|
||||
result = {'routing_id':routing_id}
|
||||
return {'value':result}
|
||||
|
||||
def action_picking_except(self, cr, uid, ids):
|
||||
self.write(cr, uid, ids, {'state':'picking_except'})
|
||||
return True
|
||||
|
||||
@@ -464,7 +464,7 @@
|
||||
<page string="Consumed Products">
|
||||
<field name="location_src_id" select="2" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
|
||||
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
|
||||
<field name="bom_id" select="2" domain="[('product_id','=',product_id),('bom_id','=',False)]"/>
|
||||
<field name="bom_id" select="2" domain="[('product_id','=',product_id),('bom_id','=',False)]" on_change="bom_id_change(bom_id)"/>
|
||||
<field name="routing_id" groups="base.group_extended" select="1"/>
|
||||
<newline/>
|
||||
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list"/>
|
||||
|
||||
@@ -45,7 +45,7 @@ class product_by_location(wizard.interface):
|
||||
<field name="to_date"/>
|
||||
<newline/>
|
||||
<label string=""/>
|
||||
<label string="(Keep empty to open the current situation. Adjust HH:MM:SS to 00:00:00 to filter all resources of the day)" align="0.0" colspan="3"/>
|
||||
<label string="(Keep empty to open the current situation. Adjust HH:MM:SS to 00:00:00 to filter all resources of the day for the 'From' date and 23:59:59 for the 'To' date)" align="0.0" colspan="3"/>
|
||||
</form>'''
|
||||
form1_fields = {
|
||||
'from_date': {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data noupdate="1">
|
||||
<record id="wiki_wiki_main" model="wiki.wiki">
|
||||
<field name="name">The Open ERP wiki</field>
|
||||
<field name="tags">help, quick start, wiki, formatting</field>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data noupdate="1">
|
||||
<record id="wiki_groups_wikiformatting0" model="wiki.groups">
|
||||
<field name="name">Help - Using The Wiki</field>
|
||||
<field eval="1" name="section"/>
|
||||
|
||||
Reference in New Issue
Block a user