Merge pull request #2005 from expsa/manar_preprod_transaction_30_12
UPDATE exp_transation_letters & exp_transaction_documents
This commit is contained in:
commit
a64b758bac
|
|
@ -90,10 +90,13 @@ class AttachmentRule(models.Model):
|
|||
description = fields.Char(string='Description')
|
||||
signed = fields.Boolean(string='Signed',readonly=True)
|
||||
created_from_system = fields.Boolean(readonly=True)
|
||||
signed_user_id = fields.Many2one('res.users')
|
||||
|
||||
def action_signature(self):
|
||||
for rec in self:
|
||||
x = self.env['letters.letters'].search([('internal_transaction_id','=',rec.internal_transaction_id.id)],limit=1)
|
||||
rec.signed_user_id = self.env.user.id
|
||||
x.signed_user_id = self.env.user.id
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': 'Preferences',
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@
|
|||
<field name="external_drive_link" widget="url"/>
|
||||
<field name="attachment_filename" invisible="True"/>
|
||||
<field name="created_from_system" invisible="1"/>
|
||||
<field name="signed_user_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="attachment_num"/>
|
||||
|
|
@ -250,7 +251,7 @@
|
|||
<field name="external_drive_link" widget="url"/>
|
||||
<field name="attachment_filename" invisible="True"/>
|
||||
<field name="created_from_system" invisible="1"/>
|
||||
|
||||
<field name="signed_user_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="attachment_num"/>
|
||||
|
|
@ -371,6 +372,7 @@
|
|||
<field name="external_drive_link" widget="url"/>
|
||||
<field name="attachment_filename" invisible="True"/>
|
||||
<field name="created_from_system" invisible="1"/>
|
||||
<field name="signed_user_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="attachment_num"/>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ class Letters(models.Model):
|
|||
internal_transaction_id = fields.Many2one(comodel_name='internal.transaction', string='Internal Transaction')
|
||||
outgoing_transaction_id = fields.Many2one(comodel_name='outgoing.transaction', string='Outgoing Transaction')
|
||||
attachment_generated = fields.Boolean()
|
||||
signed_user_id = fields.Many2one('res.users')
|
||||
|
||||
|
||||
@api.depends('transaction_type','name')
|
||||
def compute_img(self):
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@
|
|||
<template id="custom_external_formal_layout_standard">
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: 'DroidKufi';
|
||||
src: url("/exp_transation_letters/static/src/fonts/DroidKufi-Regular.ttf") format("truetype");
|
||||
font-family: 'Al-Mohanad';
|
||||
src: url("/exp_transation_letters/static/src/fonts/Al-Mohanad.ttf") format("truetype");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.droidkufi-font {
|
||||
font-family: 'DroidKufi', sans-serif;
|
||||
font-family: 'Al-Mohanad', sans-serif;
|
||||
}
|
||||
</style>
|
||||
<t t-if="o.incoming_transaction_id">
|
||||
|
|
@ -274,14 +274,14 @@
|
|||
<t t-call="exp_transation_letters.formal_letter_external_layout">
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: 'DroidKufi';
|
||||
src: url("/exp_transation_letters/static/src/fonts/DroidKufi-Bold.ttf") format("truetype");
|
||||
font-family: 'Al-Mohanad';
|
||||
src: url("/exp_transation_letters/static/src/fonts/Al-Mohanad.ttf") format("truetype");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.droidkufi-font {
|
||||
font-family: 'DroidKufi', sans-serif;
|
||||
font-family: 'Al-Mohanad', sans-serif;
|
||||
}
|
||||
</style>
|
||||
<div class="page droidkufi-font">
|
||||
|
|
@ -296,17 +296,13 @@
|
|||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
<div style="margin-top: 0px;" dir="ltr">
|
||||
<div style="margin-top: 0px; page-break-inside: avoid;" dir="ltr">
|
||||
<div style="margin-bottom: 10px; text-align: left;">
|
||||
<strong>اﻹسم:</strong>
|
||||
<span t-esc="o.unite.user_id.name"/>
|
||||
<span t-esc="o.signed_user_id.name"/>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px; text-align: left;">
|
||||
<strong>الوظيفة:</strong>
|
||||
<span t-esc="o.unite.employee_id.job_id.name"/>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px; text-align: left;">
|
||||
<strong>التوقيع:</strong>
|
||||
<span t-esc="o.signed_user_id.employee_id.job_id.name"/>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 10px; text-align: left;">
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
</tr>
|
||||
<tr style="border:0px">
|
||||
<td colspan="2" style="border:0px">
|
||||
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%`s&height=%s' % ('Code128', o.incoming_transaction_id.name, 600, 100)"
|
||||
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.incoming_transaction_id.name, 600, 100)"
|
||||
style="width:250px;height:40px;margin-top:5px;"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -295,17 +295,13 @@
|
|||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
<div style="margin-top: 0px;" dir="ltr">
|
||||
<div style="margin-top: 0px; page-break-inside: avoid;" dir="ltr">
|
||||
<div style="margin-bottom: 10px; text-align: left;">
|
||||
<strong>اﻹسم:</strong>
|
||||
<span t-esc="o.unite.user_id.name"/>
|
||||
<span t-esc="o.signed_user_id.name"/>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px; text-align: left;">
|
||||
<strong>الوظيفة:</strong>
|
||||
<span t-esc="o.unite.employee_id.job_id.name"/>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px; text-align: left;">
|
||||
<strong>التوقيع:</strong>
|
||||
<span t-esc="o.signed_user_id.employee_id.job_id.name"/>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 10px; text-align: left;">
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<form string="Letters">
|
||||
<header>
|
||||
<button name="action_generate_attachment" string="Add As Attachment to Transaction" class="oe_highlight" type="object"
|
||||
attrs="{'invisible': [('attachment_generated','=', True)]}"/>
|
||||
attrs="{'invisible': [('new_signature','!=', False)]}"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
|
|
@ -29,6 +29,7 @@
|
|||
<field name="unite" required="1"/>
|
||||
<field name="letter_template" options="{'no_create':True,'no_open':True}"/>
|
||||
<field name="attachment_generated" invisible="1"/>
|
||||
<field name="signed_user_id" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date" required="1"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue