[MERGE] merge with main branch
bzr revid: mra@mra-laptop-20100714130231-tofrc470on8r52or
This commit is contained in:
@@ -152,8 +152,8 @@ and users"),
|
||||
\nIf the case is in progress the state is set to \'Open\'.\
|
||||
\nWhen the case is over, the state is set to \'Done\'.\
|
||||
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)]),
|
||||
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)]),
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)], readonly=True),
|
||||
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)], readonly=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
||||
@@ -120,22 +120,21 @@ class crm_send_new_email(osv.osv_memory):
|
||||
|
||||
if not flag:
|
||||
raise osv.except_osv(_('Error!'), _('Unable to send mail. Please check SMTP is configured properly.'))
|
||||
if flag:
|
||||
case_pool.history(cr, uid, [case], _('Send'), history=True, \
|
||||
email=obj.email_to, details=body, \
|
||||
subject=obj.subject, email_from=email_from, \
|
||||
email_cc=email_cc, message_id=message_id, \
|
||||
references=ref_id or message_id, attach=attach)
|
||||
if obj.state == 'unchanged':
|
||||
pass
|
||||
elif obj.state == 'done':
|
||||
case_pool.case_close(cr, uid, [case.id])
|
||||
elif obj.state == 'draft':
|
||||
case_pool.case_reset(cr, uid, [case.id])
|
||||
elif obj.state in ['cancel', 'open', 'pending']:
|
||||
act = 'case_' + obj.state
|
||||
getattr(case_pool, act)(cr, uid, [case.id])
|
||||
cr.commit()
|
||||
|
||||
case_pool.history(cr, uid, [case], _('Send'), history=True, \
|
||||
email=obj.email_to, details=body, \
|
||||
subject=obj.subject, email_from=email_from, \
|
||||
email_cc=email_cc, message_id=message_id, \
|
||||
references=ref_id or message_id, attach=attach)
|
||||
if obj.state == 'unchanged':
|
||||
pass
|
||||
elif obj.state == 'done':
|
||||
case_pool.case_close(cr, uid, [case.id])
|
||||
elif obj.state == 'draft':
|
||||
case_pool.case_reset(cr, uid, [case.id])
|
||||
elif obj.state in ['cancel', 'open', 'pending']:
|
||||
act = 'case_' + obj.state
|
||||
getattr(case_pool, act)(cr, uid, [case.id])
|
||||
|
||||
return {}
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ class mailgate_thread(osv.osv):
|
||||
_description = 'Mailgateway Thread'
|
||||
|
||||
_columns = {
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True)]),
|
||||
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False)]),
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True)], readonly=True),
|
||||
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False)], readonly=True),
|
||||
}
|
||||
|
||||
def message_new(self, cr, uid, msg, context):
|
||||
@@ -149,23 +149,23 @@ class mailgate_message(osv.osv):
|
||||
_description = 'Mailgateway Message'
|
||||
_order = 'id desc'
|
||||
_columns = {
|
||||
'name':fields.text('Subject'),
|
||||
'model': fields.char('Object Name', size=128, select=1),
|
||||
'res_id': fields.integer('Resource ID', select=1),
|
||||
'name':fields.text('Subject', readonly=True),
|
||||
'model': fields.char('Object Name', size=128, select=1, readonly=True),
|
||||
'res_id': fields.integer('Resource ID', select=1, readonly=True),
|
||||
'ref_id': fields.char('Reference Id', size=256, readonly=True, help="Message Id in Email Server.", select=True),
|
||||
'date': fields.datetime('Date'),
|
||||
'history': fields.boolean('Is History?'),
|
||||
'date': fields.datetime('Date', readonly=True),
|
||||
'history': fields.boolean('Is History?', readonly=True),
|
||||
'user_id': fields.many2one('res.users', 'User Responsible', readonly=True),
|
||||
'message': fields.text('Description'),
|
||||
'email_from': fields.char('From', size=128, help="Email From"),
|
||||
'email_to': fields.char('To', help="Email Recipients", size=256),
|
||||
'email_cc': fields.char('Cc', help="Carbon Copy Email Recipients", size=256),
|
||||
'email_bcc': fields.char('Bcc', help='Blind Carbon Copy Email Recipients', size=256),
|
||||
'message': fields.text('Description', readonly=True),
|
||||
'email_from': fields.char('From', size=128, help="Email From", readonly=True),
|
||||
'email_to': fields.char('To', help="Email Recipients", size=256, readonly=True),
|
||||
'email_cc': fields.char('Cc', help="Carbon Copy Email Recipients", size=256, readonly=True),
|
||||
'email_bcc': fields.char('Bcc', help='Blind Carbon Copy Email Recipients', size=256, readonly=True),
|
||||
'message_id': fields.char('Message Id', size=1024, readonly=True, help="Message Id on Email.", select=True),
|
||||
'references': fields.text('References', readonly=True, help="References emails."),
|
||||
'description': fields.text('Description'),
|
||||
'description': fields.text('Description', readonly=True),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner', required=False),
|
||||
'attachment_ids': fields.many2many('ir.attachment', 'message_attachment_rel', 'message_id', 'attachment_id', 'Attachments'),
|
||||
'attachment_ids': fields.many2many('ir.attachment', 'message_attachment_rel', 'message_id', 'attachment_id', 'Attachments', readonly=True),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
|
||||
+36
-67
@@ -118,7 +118,7 @@
|
||||
<lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="4,0" stop="4,0"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table8">
|
||||
<blockTableStyle id="Table11">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
@@ -126,7 +126,7 @@
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table9">
|
||||
<blockTableStyle id="Table12">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
@@ -135,15 +135,7 @@
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table7">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
|
||||
</blockTableStyle>
|
||||
<blockTableStyle id="Table10">
|
||||
<blockTableStyle id="Table13">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
|
||||
@@ -186,10 +178,9 @@
|
||||
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
<paraStyle name="terp_default_space" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(objects,'o') ]] </para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
@@ -204,7 +195,7 @@
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="193.0,106.0,96.0,132.0" style="Table3">
|
||||
<blockTable colWidths="193.0,83.0,122.0,129.0" style="Table3">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Product </para>
|
||||
@@ -220,7 +211,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="193.0,106.0,96.0,132.0" style="Table5">
|
||||
<blockTable colWidths="193.0,83.0,122.0,129.0" style="Table5">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.product_id.code ]] [[ o.product_id.name ]]</para>
|
||||
@@ -236,16 +227,16 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="terp_default_space">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="118.0,147.0,132.0,131.0" repeatRows="1" style="Table1">
|
||||
<blockTable colWidths="193.0,83.0,122.0,129.0" repeatRows="1" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Printing date</para>
|
||||
<para style="terp_tblheader_General_Centre">Planned Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Planned Date </para>
|
||||
<para style="terp_tblheader_General_Centre">Printing date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Partner Ref</para>
|
||||
@@ -256,31 +247,31 @@
|
||||
</tr>
|
||||
</blockTable>
|
||||
<section>
|
||||
<blockTable colWidths="118.0,147.0,132.0,131.0" style="Table2">
|
||||
<blockTable colWidths="193.0,83.0,122.0,129.0" style="Table2">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(o.date_planned, date_time = True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ 'sale_ref' in o._columns.keys() and o.sale_ref or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date = True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ 'sale_name' in o._columns.keys() and o.sale_name or removeParentNode('para') ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ ('sale_ref' in o._columns.keys() and o.sale_ref) or '' ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ ('sale_name' in o._columns.keys() and o.sale_name) or '' ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="terp_default_space">
|
||||
<para style="terp_default_Bold_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_Bold_8">Work Orders</para>
|
||||
<para style="terp_default_8">
|
||||
<para style="terp_default_Bold_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="81.0,155.0,125.0,84.0,83.0" style="Table6">
|
||||
<blockTable colWidths="74.0,203.0,121.0,66.0,64.0" style="Table6">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Sequence</para>
|
||||
@@ -301,7 +292,7 @@
|
||||
</blockTable>
|
||||
<section>
|
||||
<para style="terp_default_8">[[ repeatIn(o.workcenter_lines,'line2') ]]</para>
|
||||
<blockTable colWidths="81.0,155.0,125.0,84.0,83.0" style="Table4">
|
||||
<blockTable colWidths="74.0,203.0,121.0,66.0,64.0" style="Table4">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ line2.sequence ]]</para>
|
||||
@@ -324,17 +315,19 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<para style="terp_default_space">
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_Bold_9">Bill Of Material </para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<section>
|
||||
<para style="terp_default_Bold_9">Products to Consume</para>
|
||||
<blockTable colWidths="235.0,82.0,107.0,104.0" style="Table8">
|
||||
<para> <font color="white"> [[ o.move_lines ==[] and removeParentNode('section')]]</font></para>
|
||||
<para style="terp_default_Bold_9">Consumed Products [[ o.move_lines2 ==[] and removeParentNode('para')]]</para>
|
||||
<para style="terp_default_Bold_9">Products to Consume [[ o.move_lines ==[] and removeParentNode('para')]]</para>
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<blockTable colWidths="250.0,66.0,107.0,104.0" style="Table11">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Product </para>
|
||||
@@ -350,10 +343,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<section>
|
||||
<blockTable colWidths="235.0,47.0,34.0,108.0,104.0" style="Table9">
|
||||
<para style="terp_default_8">[[ repeatIn(o.move_lines,'line') ]]</para>
|
||||
<para style="terp_default_8">[[ repeatIn(o.move_lines,'line') ]]</para>
|
||||
<blockTable colWidths="250.0,42.0,23.0,109.0,104.0" style="Table12">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line.product_id.code ]] [[ line.product_id.name ]]</para>
|
||||
@@ -372,34 +364,10 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<para style="terp_default_space">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
<para style="terp_default_Bold_9">Consumed Products</para>
|
||||
|
||||
<blockTable colWidths="235.0,82.0,107.0,104.0" style="Table7">
|
||||
<para> <font color="white"> [[ o.move_lines2 ==[] and removeParentNode('section')]]</font></para>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details">Product </para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Quantity</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Source Location</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Centre">Destination Location</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</section>
|
||||
<section>
|
||||
<blockTable colWidths="235.0,47.0,34.0,108.0,104.0" style="Table10">
|
||||
<para style="terp_default_8">[[ repeatIn(o.move_lines2,'line2') ]]</para>
|
||||
<para style="terp_default_8">[[ repeatIn(o.move_lines2,'line2') ]]</para>
|
||||
<blockTable colWidths="251.0,41.0,23.0,109.0,104.0" style="Table13">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line2.product_id.code ]] [[ line2.product_id.name ]]</para>
|
||||
@@ -418,8 +386,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
<para style="terp_default_2">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
|
||||
Reference in New Issue
Block a user