bzr revid: rvalyi@gmail.com-20100708221140-qm59fabmpi8bjzim
This commit is contained in:
Raphaël Valyi 2010-07-08 19:11:40 -03:00
commit 424cbecb02
124 changed files with 2824 additions and 2591 deletions

View File

@ -623,7 +623,7 @@ class account_journal(osv.osv):
'centralisation': fields.boolean('Centralised counterpart', help="Check this box to determine that each entry of this journal won't create a new counterpart but will share the same counterpart. This is used in fiscal year closing."),
'update_posted': fields.boolean('Allow Cancelling Entries', help="Check this box if you want to allow the cancellation the entries related to this journal or of the invoice related to this journal"),
'group_invoice_lines': fields.boolean('Group invoice lines', help="If this box is checked, the system will try to group the accounting lines when generating them from invoices."),
'sequence_id': fields.many2one('ir.sequence', 'Entry Sequence', help="The sequence gives the display order for a list of journals", required=True),
'sequence_id': fields.many2one('ir.sequence', 'Entry Sequence', help="The sequence gives the display order for a list of journals", required=False),
'user_id': fields.many2one('res.users', 'User', help="The user responsible for this journal"),
'groups_id': fields.many2many('res.groups', 'account_journal_group_rel', 'journal_id', 'group_id', 'Groups'),
'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'),
@ -646,8 +646,58 @@ class account_journal(osv.osv):
raise osv.except_osv(_('Warning !'), _('You cannot modify company of this journal as its related record exist in Entry Lines'))
return super(account_journal, self).write(cr, uid, ids, vals, context=context)
def create_sequence(self, cr, uid, ids, context={}):
"""
Create new entry sequence for every new Joural
@param cr: cursor to database
@param user: id of current user
@param ids: list of record ids to be process
@param context: context arguments, like lang, time zone
@return: return a result
"""
seq_pool = self.pool.get('ir.sequence')
seq_typ_pool = self.pool.get('ir.sequence.type')
result = True
journal = self.browse(cr, uid, ids[0], context)
code = journal.code.lower()
types = {
'name':journal.name,
'code':code
}
type_id = seq_typ_pool.create(cr, uid, types)
seq = {
'name':journal.name,
'code':code,
'active':True,
'prefix':journal.code + "/%(year)s/",
'padding':4,
'number_increment':1
}
seq_id = seq_pool.create(cr, uid, seq)
res = {}
if not journal.sequence_id:
res.update({
'sequence_id':seq_id
})
if not journal.invoice_sequence_id:
res.update({
'invoice_sequence_id':seq_id
})
result = self.write(cr, uid, [journal.id], res)
return result
def create(self, cr, uid, vals, context={}):
journal_id = super(account_journal, self).create(cr, uid, vals, context)
self.create_sequence(cr, uid, [journal_id], context)
# journal_name = self.browse(cr, uid, [journal_id])[0].code
# periods = self.pool.get('account.period')
# ids = periods.search(cr, uid, [('date_stop','>=',time.strftime('%Y-%m-%d'))])
@ -1202,9 +1252,11 @@ class account_move(osv.osv):
def validate(self, cr, uid, ids, context={}):
if context and ('__last_update' in context):
del context['__last_update']
ok = True
valid_moves = [] #Maintains a list of moves which can be responsible to create analytic entries
for move in self.browse(cr, uid, ids, context):
#unlink analytic lines on move_lines
# Unlink old analytic lines on move_lines
for obj_line in move.line_id:
for obj in obj_line.analytic_lines:
self.pool.get('account.analytic.line').unlink(cr,uid,obj.id)
@ -1213,7 +1265,7 @@ class account_move(osv.osv):
amount = 0
line_ids = []
line_draft_ids = []
company_id=None
company_id = None
for line in move.line_id:
amount += line.debit - line.credit
line_ids.append(line.id)
@ -1230,45 +1282,59 @@ class account_move(osv.osv):
raise osv.except_osv(_('Error'), _("""Couldn't create move with currency different from the secondary currency of the account "%s - %s". Clear the secondary currency field of the account definition if you want to accept all currencies.""" % (line.account_id.code, line.account_id.name)))
if abs(amount) < 10 ** -4:
# If the move is balanced
# Add to the list of valid moves
# (analytic lines will be created later for valid moves)
valid_moves.append(move)
# Check whether the move lines are confirmed
if not len(line_draft_ids):
continue
# Update the move lines (set them as valid)
self.pool.get('account.move.line').write(cr, uid, line_draft_ids, {
'journal_id': move.journal_id.id,
'period_id': move.period_id.id,
'state': 'valid'
}, context, check=False)
todo = []
account = {}
account2 = {}
if journal.type not in ('purchase','sale'):
continue
if journal.type in ('purchase','sale'):
for line in move.line_id:
code = amount = 0
key = (line.account_id.id, line.tax_code_id.id)
if key in account2:
code = account2[key][0]
amount = account2[key][1] * (line.debit + line.credit)
elif line.account_id.id in account:
code = account[line.account_id.id][0]
amount = account[line.account_id.id][1] * (line.debit + line.credit)
if (code or amount) and not (line.tax_code_id or line.tax_amount):
self.pool.get('account.move.line').write(cr, uid, [line.id], {
'tax_code_id': code,
'tax_amount': amount
}, context, check=False)
elif journal.centralisation:
# If the move is not balanced, it must be centralised...
# Add to the list of valid moves
# (analytic lines will be created later for valid moves)
valid_moves.append(move)
for line in move.line_id:
code = amount = 0
key = (line.account_id.id, line.tax_code_id.id)
if key in account2:
code = account2[key][0]
amount = account2[key][1] * (line.debit + line.credit)
elif line.account_id.id in account:
code = account[line.account_id.id][0]
amount = account[line.account_id.id][1] * (line.debit + line.credit)
if (code or amount) and not (line.tax_code_id or line.tax_amount):
self.pool.get('account.move.line').write(cr, uid, [line.id], {
'tax_code_id': code,
'tax_amount': amount
}, context, check=False)
#
# Compute VAT
# Update the move lines (set them as valid)
#
continue
if journal.centralisation:
self._centralise(cr, uid, move, 'debit', context=context)
self._centralise(cr, uid, move, 'credit', context=context)
self.pool.get('account.move.line').write(cr, uid, line_draft_ids, {
'state': 'valid'
}, context, check=False)
continue
else:
# We can't validate it (it's unbalanced)
# Setting the lines as draft
self.pool.get('account.move.line').write(cr, uid, line_ids, {
'journal_id': move.journal_id.id,
'period_id': move.period_id.id,
@ -1276,13 +1342,12 @@ class account_move(osv.osv):
#'tax_amount': False,
'state': 'draft'
}, context, check=False)
ok = False
if ok:
list_ids = []
for tmp in move.line_id:
list_ids.append(tmp.id)
self.pool.get('account.move.line').create_analytic_lines(cr, uid, list_ids, context)
return ok
# Create analytic lines for the valid moves
for record in valid_moves:
self.pool.get('account.move.line').create_analytic_lines(cr, uid, [line.id for line in record.line_id], context)
return len(valid_moves) > 0
account_move()
class account_move_reconcile(osv.osv):

View File

@ -3,8 +3,8 @@
<data noupdate="1">
<!--
Fiscal year
-->
Fiscal year
-->
<record id="data_fiscalyear" model="account.fiscalyear">
<field eval="'Fiscal Year '+time.strftime('%Y')" name="name"/>
@ -15,8 +15,8 @@
</record>
<!--
Fiscal Periods
-->
Fiscal Periods
-->
<record id="period_1" model="account.period">
<field eval="'Jan.'+time.strftime('%Y')" name="name"/>

View File

@ -330,53 +330,50 @@
<field name="arch" type="xml">
<form string="Account Journal">
<group colspan="4" col="6">
<field name="name" select="1" colspan="4"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="type" on_change="onchange_type(type)"/>
<field name="refund_journal" attrs="{'readonly':[('type','=','general'),('type','=','cash'),('type','=','situation')]}"/>
</group>
<notebook colspan="4">
<page string="General Information">
<group colspan="2" col="2">
<separator string="Journal View" colspan="4"/>
<field name="view_id" widget="selection"/>
<group col="2" colspan="2">
<group colspan="2" col="2">
<separator string="Accounts" colspan="4"/>
<field name="default_debit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="default_credit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
</group>
<group colspan="2" col="2">
<separator string="Journal View" colspan="4"/>
<field name="view_id" widget="selection"/>
</group>
</group>
<group colspan="2" col="2">
<separator string="Sequence" colspan="4"/>
<field name="sequence_id"/>
</group>
<group colspan="2" col="2">
<separator string="Accounts" colspan="4"/>
<field name="default_debit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="default_credit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
</group>
<group colspan="2" col="2">
<separator string="Invoicing Data" colspan="4"/>
<field name="invoice_sequence_id"/>
<field name="group_invoice_lines"/>
</group>
<group colspan="2" col="2">
<separator string="Company" colspan="4"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="user_id" groups="base.group_extended"/>
<field name="currency"/>
</group>
<group col="2" colspan="2">
<group colspan="2" col="2">
<separator string="Validations" colspan="4"/>
<field name="allow_date" groups="base.group_extended"/>
</group>
<group colspan="2" col="2">
<separator string="Validations" colspan="4"/>
<field name="allow_date" groups="base.group_extended"/>
</group>
<group colspan="2" col="2">
<separator string="Other Configuration" colspan="4"/>
<field name="centralisation" groups="base.group_extended"/>
<field name="entry_posted"/>
<!-- <field name="update_posted"/> -->
</group>
<group colspan="2" col="2">
<separator string="Other Configuration" colspan="4"/>
<field name="centralisation" groups="base.group_extended"/>
<field name="entry_posted"/>
<field name="update_posted"/>
</group>
<group colspan="2" col="2">
<separator string="Invoicing Data" colspan="4"/>
<field name="invoice_sequence_id" groups="base.group_extended"/>
<field name="group_invoice_lines"/>
</group>
<group colspan="2" col="2" groups="base.group_extended">
<separator string="Sequence" colspan="4"/>
<field name="sequence_id"/>
</group>
</page>
<page string="Entry Controls" groups="base.group_extended">
@ -1194,7 +1191,7 @@
<!-- <menuitem id="next_id_29" name="Search Entries" parent="account.menu_finance_entries" sequence="40"/>-->
<!-- <menuitem action="action_move_line_form" id="menu_action_move_line_form" parent="next_id_29"/>-->
<record id="action_move_line_form_encode_by_move" model="ir.actions.act_window">
<!-- <record id="action_move_line_form_encode_by_move" model="ir.actions.act_window">
<field name="name">Journal Entries</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
@ -1203,7 +1200,7 @@
<field name="search_view_id" ref="view_account_move_filter"/>
</record>
<menuitem action="action_move_line_form_encode_by_move" id="menu_encode_entries_by_move" parent="menu_finance_entries"/>
<menuitem action="action_move_line_form_encode_by_move" id="menu_encode_entries_by_move" parent="menu_finance_entries"/>-->
<record id="action_account_moves_sale" model="ir.actions.act_window">
<field name="name">Journal Items</field>
@ -2237,22 +2234,6 @@
id="menu_action_account_fiscal_position_form_template"
parent="account_template_folder" sequence="20"/>
<record id="action_move_journal_line" model="ir.actions.act_window">
<field name="name">Journal Entries</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
</record>
<menuitem
icon="STOCK_JUSTIFY_FILL"
action="action_move_journal_line"
id="menu_action_move_journal_line_form"
parent="account.menu_finance_entries"
sequence="5"/>
<record id="action_account_moves_all" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>

View File

@ -3,8 +3,8 @@
<data noupdate="1">
<!--
Payment term
-->
Payment term
-->
<record id="account_payment_term" model="account.payment.term">
<field name="name">30 Days End of Month</field>
</record>
@ -17,10 +17,10 @@
</record>
<!--
Account Journal View
-->
Account Journal View
-->
<record id="account_journal_bank_view" model="account.journal.view">
<field name="name">Cash Journal View</field>
<field name="name">Bank/Cash Journal View</field>
</record>
<record id="bank_col1" model="account.journal.column">
<field name="view_id" ref="account_journal_bank_view"/>
@ -74,12 +74,6 @@
<field name="field">credit</field>
<field eval="11" name="sequence"/>
</record>
<record id="bank_col11" model="account.journal.column">
<field name="view_id" ref="account_journal_bank_view"/>
<field name="name">Tax</field>
<field name="field">account_tax_id</field>
<field eval="12" name="sequence"/>
</record>
<record id="bank_col12" model="account.journal.column">
<field name="view_id" ref="account_journal_bank_view"/>
<field name="name">Analytic Account</field>
@ -100,7 +94,7 @@
</record>
<record id="account_journal_bank_view_multi" model="account.journal.view">
<field name="name">Multi-Currency Cash Journal View</field>
<field name="name">Bank/Cash Journal (Multi-Currency) View</field>
</record>
<record id="bank_col1_multi" model="account.journal.column">
<field name="view_id" ref="account_journal_bank_view_multi"/>
@ -203,6 +197,12 @@
<field name="field">ref</field>
<field eval="3" name="sequence"/>
</record>
<record id="journal_col5" model="account.journal.column">
<field name="view_id" ref="account_journal_view"/>
<field name="name">Partner</field>
<field name="field">partner_id</field>
<field eval="4" name="sequence"/>
</record>
<record id="journal_col4" model="account.journal.column">
<field name="view_id" ref="account_journal_view"/>
<field name="name">Account</field>
@ -210,12 +210,6 @@
<field eval="True" name="required"/>
<field eval="5" name="sequence"/>
</record>
<record id="journal_col5" model="account.journal.column">
<field name="view_id" ref="account_journal_view"/>
<field name="name">Partner</field>
<field name="field">partner_id</field>
<field eval="4" name="sequence"/>
</record>
<record id="journal_col6" model="account.journal.column">
<field name="view_id" ref="account_journal_view"/>
<field name="name">Name</field>
@ -223,12 +217,6 @@
<field eval="6" name="sequence"/>
<field eval="True" name="required"/>
</record>
<record id="journal_col7" model="account.journal.column">
<field name="view_id" ref="account_journal_view"/>
<field name="name">Maturity Date</field>
<field name="field">date_maturity</field>
<field eval="7" name="sequence"/>
</record>
<record id="journal_col8" model="account.journal.column">
<field name="view_id" ref="account_journal_view"/>
<field name="name">Debit</field>
@ -241,41 +229,206 @@
<field name="field">credit</field>
<field eval="9" name="sequence"/>
</record>
<record id="journal_col10" model="account.journal.column">
<field name="view_id" ref="account_journal_view"/>
<field name="name">Tax</field>
<field name="field">account_tax_id</field>
<field eval="10" name="sequence"/>
</record>
<record id="journal_col11" model="account.journal.column">
<field name="view_id" ref="account_journal_view"/>
<field name="name">Analytic Account</field>
<field name="field">analytic_account_id</field>
<field eval="11" name="sequence"/>
</record>
<record id="journal_col25" model="account.journal.column">
<field name="view_id" ref="account_journal_view"/>
<field name="name">Tax Acc.</field>
<field name="field">tax_code_id</field>
<field eval="12" name="sequence"/>
</record>
<record id="journal_col26" model="account.journal.column">
<field name="view_id" ref="account_journal_view"/>
<field name="name">Tax</field>
<field name="field">tax_amount</field>
<field eval="13" name="sequence"/>
</record>
<record id="journal_col24" model="account.journal.column">
<field name="view_id" ref="account_journal_view"/>
<field name="name">State</field>
<field name="field">state</field>
<field eval="14" name="sequence"/>
</record>
<record id="account_sp_journal_view" model="account.journal.view">
<field name="name">Sale/Purchase Journal View</field>
</record>
<record id="sp_journal_col1" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Date</field>
<field name="field">date</field>
<field eval="True" name="required"/>
<field eval="1" name="sequence"/>
</record>
<record id="sp_journal_col2" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">N. Piece</field>
<field name="field">move_id</field>
<field eval="False" name="required"/>
<field eval="2" name="sequence"/>
</record>
<record id="sp_journal_col3" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Ref</field>
<field name="field">ref</field>
<field eval="3" name="sequence"/>
</record>
<record id="sp_journal_col4" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Account</field>
<field name="field">account_id</field>
<field eval="True" name="required"/>
<field eval="5" name="sequence"/>
</record>
<record id="sp_journal_col5" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Partner</field>
<field name="field">partner_id</field>
<field eval="4" name="sequence"/>
</record>
<record id="sp_journal_col6" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Name</field>
<field name="field">name</field>
<field eval="6" name="sequence"/>
<field eval="True" name="required"/>
</record>
<record id="sp_journal_col7" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Maturity Date</field>
<field name="field">date_maturity</field>
<field eval="7" name="sequence"/>
</record>
<record id="sp_journal_col8" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Debit</field>
<field name="field">debit</field>
<field eval="8" name="sequence"/>
</record>
<record id="sp_journal_col9" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Credit</field>
<field name="field">credit</field>
<field eval="9" name="sequence"/>
</record>
<record id="sp_journal_col10" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Tax</field>
<field name="field">account_tax_id</field>
<field eval="10" name="sequence"/>
</record>
<record id="sp_journal_col11" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Analytic Account</field>
<field name="field">analytic_account_id</field>
<field eval="11" name="sequence"/>
</record>
<record id="sp_journal_col25" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Tax Acc.</field>
<field name="field">tax_code_id</field>
<field eval="12" name="sequence"/>
</record>
<record id="sp_journal_col26" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">Tax</field>
<field name="field">tax_amount</field>
<field eval="13" name="sequence"/>
</record>
<record id="sp_journal_col24" model="account.journal.column">
<field name="view_id" ref="account_sp_journal_view"/>
<field name="name">State</field>
<field name="field">state</field>
<field eval="14" name="sequence"/>
</record>
<record id="account_sp_refund_journal_view" model="account.journal.view">
<field name="name">Sale/Purchase Refund Journal View</field>
</record>
<record id="sp_refund_journal_col1" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Date</field>
<field name="field">date</field>
<field eval="True" name="required"/>
<field eval="1" name="sequence"/>
</record>
<record id="sp_refund_journal_col2" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">N. Piece</field>
<field name="field">move_id</field>
<field eval="False" name="required"/>
<field eval="2" name="sequence"/>
</record>
<record id="sp_refund_journal_col3" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Ref</field>
<field name="field">ref</field>
<field eval="3" name="sequence"/>
</record>
<record id="sp_refund_journal_col4" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Account</field>
<field name="field">account_id</field>
<field eval="True" name="required"/>
<field eval="5" name="sequence"/>
</record>
<record id="sp_refund_journal_col5" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Partner</field>
<field name="field">partner_id</field>
<field eval="4" name="sequence"/>
</record>
<record id="sp_refund_journal_col6" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Name</field>
<field name="field">name</field>
<field eval="6" name="sequence"/>
<field eval="True" name="required"/>
</record>
<record id="sp_refund_journal_col7" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Maturity Date</field>
<field name="field">date_maturity</field>
<field eval="7" name="sequence"/>
</record>
<record id="sp_refund_journal_col8" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Debit</field>
<field name="field">debit</field>
<field eval="8" name="sequence"/>
</record>
<record id="sp_refund_journal_col9" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Credit</field>
<field name="field">credit</field>
<field eval="9" name="sequence"/>
</record>
<record id="sp_refund_journal_col10" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Tax</field>
<field name="field">account_tax_id</field>
<field eval="10" name="sequence"/>
</record>
<record id="sp_refund_journal_col11" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Analytic Account</field>
<field name="field">analytic_account_id</field>
<field eval="11" name="sequence"/>
</record>
<record id="sp_refund_journal_col25" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Tax Acc.</field>
<field name="field">tax_code_id</field>
<field eval="12" name="sequence"/>
</record>
<record id="sp_refund_journal_col26" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">Tax</field>
<field name="field">tax_amount</field>
<field eval="13" name="sequence"/>
</record>
<record id="sp_refund_journal_col24" model="account.journal.column">
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="name">State</field>
<field name="field">state</field>
<field eval="14" name="sequence"/>
</record>
<!--
Account Journal Sequences
-->
Account Journal Sequences
-->
<record id="sequence_journal_type" model="ir.sequence.type">
<field name="name">Account Journal</field>
@ -298,8 +451,8 @@
</record>
<!--
Account Statement Sequences
-->
Account Statement Sequences
-->
<record id="sequence_reconcile" model="ir.sequence.type">
<field name="name">Account reconcile sequence</field>

View File

@ -5,10 +5,10 @@
<field name="name">Invoice</field>
<field name="object">account.invoice</field>
</record>
<!--
Sequences types for invoices
-->
Sequences types for invoices
-->
<record id="seq_type_out_invoice" model="ir.sequence.type">
<field name="name">Account Invoice Out</field>
<field name="code">account.invoice.out_invoice</field>
@ -27,8 +27,8 @@
</record>
<!--
Sequences for invoices
-->
Sequences for invoices
-->
<record id="seq_out_invoice" model="ir.sequence">
<field name="name">Account Invoice Out</field>
<field name="code">account.invoice.out_invoice</field>
@ -55,16 +55,16 @@
</record>
<!--
Sequences types for analytic account
-->
Sequences types for analytic account
-->
<record id="seq_type_analytic_account" model="ir.sequence.type">
<field name="name">Analytic account</field>
<field name="code">account.analytic.account</field>
</record>
<!--
Sequence for analytic account
-->
Sequence for analytic account
-->
<record id="seq_analytic_account" model="ir.sequence">
<field name="name">Analytic account sequence</field>
<field name="code">account.analytic.account</field>

View File

@ -170,14 +170,14 @@ your own chart of account.
<!--
Account Journal
-->
Account Journal
-->
<record id="sales_journal" model="account.journal">
<field name="name">x Sales Journal</field>
<field name="code">SAJ</field>
<field name="type">sale</field>
<field name="view_id" ref="account_journal_view"/>
<field name="view_id" ref="account_sp_journal_view"/>
<field name="sequence_id" ref="sequence_sale_journal"/>
<field name="invoice_sequence_id" ref="seq_type_out_invoice"/>
<field model="account.account" name="default_credit_account_id" ref="a_sale"/>
@ -188,8 +188,7 @@ your own chart of account.
<field name="name">x Sales Credit Note Journal</field>
<field name="code">SCNJ</field>
<field name="type">sale_refund</field>
<field name="refund_journal">True</field>
<field name="view_id" ref="account_journal_view"/>
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="sequence_id" ref="sequence_sale_journal"/>
<field model="account.account" name="default_credit_account_id" ref="a_sale"/>
<field model="account.account" name="default_debit_account_id" ref="a_sale"/>
@ -200,7 +199,7 @@ your own chart of account.
<field name="name">x Expenses Journal</field>
<field name="code">EXJ</field>
<field name="type">purchase</field>
<field name="view_id" ref="account_journal_view"/>
<field name="view_id" ref="account_sp_journal_view"/>
<field name="sequence_id" ref="sequence_purchase_journal"/>
<field name="invoice_sequence_id" ref="seq_type_in_invoice"/>
<field model="account.account" name="default_debit_account_id" ref="a_expense"/>
@ -211,8 +210,7 @@ your own chart of account.
<field name="name">x Expenses Credit Notes Journal</field>
<field name="code">ECNJ</field>
<field name="type">purchase_refund</field>
<field name="refund_journal">True</field>
<field name="view_id" ref="account_journal_view"/>
<field name="view_id" ref="account_sp_refund_journal_view"/>
<field name="sequence_id" ref="sequence_purchase_journal"/>
<field model="account.account" name="default_debit_account_id" ref="a_expense"/>
<field model="account.account" name="default_credit_account_id" ref="a_expense"/>
@ -241,8 +239,8 @@ your own chart of account.
</record>
<!--
Product income and expense accounts, default parameters
-->
Product income and expense accounts, default parameters
-->
<record id="property_account_expense_prd" model="ir.property">
<field name="name">property_account_expense</field>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -217,11 +217,11 @@
<td><para style="P10">Balance</para></td>
</tr>
<tr>
<td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
<td><para style="P14"><font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font color="white">[[ '..'*(a['level']-1) ]]</font><font>[[ a['name'] ]]</font></para></td>
<td><para style="P3"><font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]]</font></para></td>
<td><para style="P3"><font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]]</font></para></td>
<td><para style="P3"><font>[[ a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"}) ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]]</font></para></td>
<td><para style="P14">[[ repeatIn(lines(data['form']), 'a') ]]<font>[[ (a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><i>[[ a['code'] or removeParentNode('tr') ]]</i></para></td>
<td><para style="P14"><font>[[ (a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font color="white">[[ '..'*(a['level']-1) ]]</font><font>[[ a['name'] ]]</font></para></td>
<td><para style="P3"><font>[[ (a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]]</font></para></td>
<td><para style="P3"><font>[[ (a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font')]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]]</font></para></td>
<td><para style="P3"><font>[[ (a['level']&gt;2 and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]]</font><font>[[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]]</font><font>[[ a['type']&lt;&gt;'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]]</font></para></td>
</tr>
</blockTable>
</story>

View File

@ -50,36 +50,42 @@
<field name="arch" type="xml">
<search string="Entries Analysis">
<group colspan="10" col="12">
<filter string="Income" name="profit" icon="terp-document-new" domain="[('user_type.report_type','=','income')]"/>
<filter string="Expense" name="loss" icon="terp-document-new" domain="[('user_type.report_type','=','expense')]"/>
<separator orientation="vertical"/>
<filter string="Asset" name="asset" icon="terp-document-new" domain="[('user_type.report_type','=','asset')]"/>
<filter string="Liability" name="liability" icon="terp-document-new" domain="[('user_type.report_type','=','liability')]"/>
<filter string="Receivable" name="asset" icon="terp-document-new" domain="[('type','=','receivable')]"/>
<filter string="Payable" name="asset" icon="terp-document-new" domain="[('type','=','payable')]"/>
<filter icon="terp-go-year" string="This Year"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Tasks performed in this year"/>
<filter icon="terp-go-month" string="This Month"
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Tasks performed in this month"/>
<filter icon="terp-go-week"
string="7 Days"
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Tasks during last 7 days"/>
<separator orientation="vertical"/>
<filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]" help = "Draft entries"/>
<filter string="Posted" icon="terp-camera_test" domain="[('state','=','posted')]" help = "Posted entries"/>
<separator orientation="vertical"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="account_id"/>
<field name="analytic_account_id"/>
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="Journal" name="group_journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<filter string="Account" name="group_account" icon="terp-folder-orange" context="{'group_by':'account_id'}"/>
<filter string="Fiscal Year" icon="terp-go-month" context="{'group_by':'fiscalyear_id'}"/>
<filter string="Period" icon="terp-go-month" name="group_period" context="{'group_by':'period_id'}"/>
<filter string="Journal" name="group_journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<separator orientation="vertical"/>
<filter string="Analytic" name="analytic_account" icon="terp-folder-orange" context="{'group_by':'analytic_account_id'}"/>
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'user_type'}"/>
<filter string="Int.Type" icon="terp-stock_symbol-selection" context="{'group_by':'type'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Analytic" name="analytic_account" icon="terp-folder-orange" context="{'group_by':'analytic_account_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="Period" icon="terp-go-month" name="group_period" context="{'group_by':'period_id'}"/>
<filter string="Fiscal Year" icon="terp-go-month" context="{'group_by':'fiscalyear_id'}"/>
<separator orientation="vertical"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'date'}"/>
@ -88,12 +94,20 @@
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="journal_id"/>
<field name="fiscalyear_id"/>
<field name="period_id"/>
<separator orientation="vertical"/>
<field name="analytic_account_id"/>
<separator orientation="vertical"/>
<field name="product_id"/>
<field name="partner_id"/>
<separator orientation="vertical"/>
<field name="company_id" groups="base.group_multi_company"/>
<newline/>
<field name="date"/>
<field name="date_created"/>
<field name="date_maturity"/>
<separator orientation="vertical"/>
<field name="product_id" />
<field name="partner_id" />
</group>
</search>
</field>
@ -103,7 +117,7 @@
<field name="res_model">account.entries.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_profit': 1,'search_default_group_journal':1,'search_default_group_period': 1, 'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{'search_default_profit': 1,'search_default_group_account':1,'search_default_group_month': 1, 'group_by_no_leaf':1,'group_by':[]}</field>
</record>
<menuitem action="action_account_entries_report_all" id="menu_action_account_entries_report_all" parent="account.menu_finance_statistic_report_statement" sequence="2"/>
</data>

View File

@ -77,84 +77,83 @@ class account_invoice_report(osv.osv):
tools.drop_view_if_exists(cr, 'account_invoice_report')
cr.execute("""
create or replace view account_invoice_report as (
select
min(l.id) as id,
s.date_invoice as date,
to_char(s.date_invoice, 'YYYY') as year,
to_char(s.date_invoice, 'MM') as month,
to_char(s.date_invoice, 'YYYY-MM-DD') as day,
l.product_id as product_id,
sum(case when s.type in ('out_refund','in_invoice') then
l.quantity * u.factor * -1
else
l.quantity * u.factor
end) as product_qty,
s.partner_id as partner_id,
s.reconciled::integer,
s.payment_term as payment_term,
s.period_id as period_id,
u.name as uom_name,
s.currency_id as currency_id,
s.journal_id as journal_id,
s.fiscal_position as fiscal_position,
s.user_id as user_id,
s.company_id as company_id,
sum(case when s.type in ('out_refund','in_invoice') then
l.quantity*l.price_unit * -1
else
l.quantity*l.price_unit
end) as price_total,
sum(case when s.type in ('out_refund','in_invoice') then
l.quantity*l.price_unit * -1
else
l.quantity*l.price_unit
end) / sum(l.quantity * u.factor)::decimal(16,2) as price_average,
count(*) as nbr,
s.type as type,
s.state,
pt.categ_id,
s.date_due as date_due,
s.address_contact_id as address_contact_id,
s.address_invoice_id as address_invoice_id,
s.account_id as account_id,
s.partner_bank as partner_bank,
sum(case when s.type in ('out_refund','in_invoice') then
s.residual * -1
else
s.residual
end) as residual,
case when s.state != 'paid' then null else
extract(epoch from avg(am.date_created-l.create_date))/(24*60*60)::decimal(16,2)
end as delay_to_pay
from account_invoice_line l
left join account_invoice s on (s.id=l.invoice_id)
left join product_template pt on (pt.id=l.product_id)
left join product_uom u on (u.id=l.uos_id),
account_move_line am left join account_invoice i on (i.move_id=am.move_id)
where am.account_id=i.account_id
group by
s.type,
s.date_invoice,
s.partner_id,
l.product_id,
u.name,
l.uos_id,
s.reconciled,
s.user_id,
s.state,
s.residual,
pt.categ_id,
s.company_id,
s.payment_term,
s.period_id,
s.fiscal_position,
s.currency_id,
s.journal_id,
s.date_due,
s.address_contact_id,
s.address_invoice_id,
s.account_id,
s.partner_bank
select min(ail.id) as id,
ai.date_invoice as date,
to_char(ai.date_invoice, 'YYYY') as year,
to_char(ai.date_invoice, 'MM') as month,
to_char(ai.date_invoice, 'YYYY-MM-DD') as day,
ail.product_id,
ai.partner_id as partner_id,
ai.reconciled::integer,
ai.payment_term as payment_term,
ai.period_id as period_id,
u.name as uom_name,
ai.currency_id as currency_id,
ai.journal_id as journal_id,
ai.fiscal_position as fiscal_position,
ai.user_id as user_id,
ai.company_id as company_id,
count(ail.*) as nbr,
ai.type as type,
ai.state,
pt.categ_id,
ai.date_due as date_due,
ai.address_contact_id as address_contact_id,
ai.address_invoice_id as address_invoice_id,
ai.account_id as account_id,
ai.partner_bank as partner_bank,
sum(case when ai.type in ('out_refund','in_invoice') then
ail.quantity * u.factor * -1
else
ail.quantity * u.factor
end) as product_qty,
sum(case when ai.type in ('out_refund','in_invoice') then
ail.quantity*ail.price_unit * -1
else
ail.quantity*ail.price_unit
end) as price_total,
sum(ail.quantity*ail.price_unit)/sum(ail.quantity*u.factor)*count(ail.product_id)::decimal(16,2) as price_average,
sum((select extract(epoch from avg(date_trunc('day',aml.date_created)-date_trunc('day',l.create_date)))/(24*60*60)::decimal(16,2)
from account_move_line as aml
left join account_invoice as a ON (a.move_id=aml.move_id)
left join account_invoice_line as l ON (a.id=l.invoice_id)
where a.id=ai.id)) as delay_to_pay,
(case when ai.type in ('out_refund','in_invoice') then
ai.residual * -1
else
ai.residual
end)/(select count(l.*) from account_invoice_line as l
left join account_invoice as a ON (a.id=l.invoice_id)
where a.id=ai.id) as residual
from account_invoice_line as ail
left join account_invoice as ai ON (ai.id=ail.invoice_id)
left join product_template pt on (pt.id=ail.product_id)
left join product_uom u on (u.id=ail.uos_id)
group by ail.product_id,
ai.date_invoice,
ai.id,
to_char(ai.date_invoice, 'YYYY'),
to_char(ai.date_invoice, 'MM'),
to_char(ai.date_invoice, 'YYYY-MM-DD'),
ai.partner_id,
ai.reconciled,
ai.payment_term,
ai.period_id,
u.name,
ai.currency_id,
ai.journal_id,
ai.fiscal_position,
ai.user_id,
ai.company_id,
ai.type,
ai.state,
pt.categ_id,
ai.date_due,
ai.address_contact_id,
ai.address_invoice_id,
ai.account_id,
ai.partner_bank,
ai.residual
)
""")
account_invoice_report()

View File

@ -32,8 +32,8 @@
<field name="reconciled" sum="# Reconciled"/>
<field name="price_average" avg="Average Price"/>
<field name="price_total" sum="Total Price"/>
<field name="residual" sum="Total Residual"/>
<field name="delay_to_pay" avg="Avg. Delay To Pay"/>
<field name="residual" sum="Total Residual" invisible="not context.get('residual_visible',False)"/>
<field name="delay_to_pay" avg="Avg. Delay To Pay" invisible="not context.get('residual_visible',False)"/>
</tree>
</field>
</record>
@ -84,7 +84,7 @@
help = "Done Invoices"/>
<separator orientation="vertical"/>
<field name="partner_id"/>
<field name="user_id" widget="selection">
<field name="user_id" >
<filter icon="terp-dolar"
string="My Invoices"
help="My Invoices"
@ -93,24 +93,24 @@
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="Salesman" name='user' icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
<filter string="Salesman" name='user' icon="terp-personal" context="{'group_by':'user_id','residual_visible':True}"/>
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id','residual_visible':True}"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id','set_visible':True}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'type'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state','residual_visible':True}"/>
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'type','residual_visible':True}"/>
<separator orientation="vertical"/>
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<filter string="Account" icon="terp-folder-orange" context="{'group_by':'account_id'}"/>
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id','residual_visible':True}"/>
<filter string="Account" icon="terp-folder-orange" context="{'group_by':'account_id','residual_visible':True}"/>
<separator orientation="vertical"/>
<filter string="Category of Product" icon="terp-stock_symbol-selection" context="{'group_by':'categ_id'}"/>
<filter string="Force Period" icon="terp-go-month" context="{'group_by':'period_id'}"/>
<filter string="Force Period" icon="terp-go-month" context="{'group_by':'period_id','residual_visible':True}"/>
<separator orientation="vertical"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<newline/>
<filter string="Day" name="day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" name="month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" name="year" icon="terp-go-year" context="{'group_by':'year'}"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id','residual_visible':True}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Day" name="day" icon="terp-go-today" context="{'group_by':'day','residual_visible':True}"/>
<filter string="Month" name="month" icon="terp-go-month" context="{'group_by':'month','residual_visible':True}"/>
<filter string="Year" name="year" icon="terp-go-year" context="{'group_by':'year','residual_visible':True}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">

View File

@ -26,7 +26,7 @@
<lineMode width="0.7"/>
<lines>1cm 27.7cm 20cm 27.7cm</lines>
<lines>0.88cm 27.7cm 20.12cm 27.7cm</lines>
<setFont name="Helvetica" size="8"/>
</pageGraphics>
</pageTemplate>
@ -105,7 +105,7 @@
</blockTable>
<section>
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
<blockTable rowHeights="0.65cm" colWidths="66.0,124.0,70.0,40.0,80.0,59.0,52.0,54.0" style="tbl_content">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<blockTable colWidths="66.0,124.0,70.0,40.0,80.0,59.0,52.0,54.0" style="tbl_content">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<tr>
<td>
<blockTable colWidths="280.0,100.0,52.5,52.5,52.5" style="Table5">
@ -141,7 +141,7 @@
<blockTable colWidths="72.0,93.0,66.0,40.0,100.0,50.0,50.0,50.0,40.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
<blockTable colWidths="72.0,93.0,65.0,40.0,89.0,49.0,49.0,49.0,40.0" style="tbl_header" repeatRows="1">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
<tr>
<td><para style="date">Date</para></td>
<td><para style="P3">Partner</para></td>
@ -156,10 +156,10 @@
</blockTable>
<section>
<para>[[ repeatIn(get_children_accounts(a,data['form']), 'o') ]]</para>
<blockTable rowHeights="0.65cm" colWidths="72.0,93.0,66.0,40.0,100.0,50.0,50.0,50.0,40.0" style="tbl_content">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
<blockTable colWidths="72.0,93.0,65.0,40.0,89.0,49.0,49.0,49.0,40.0" style="tbl_content">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
<tr>
<td>
<blockTable colWidths="264.00,100.0,50.0,50.0,49.0,40.00" style="Table5">
<blockTable colWidths="260.00,93.0,49.0,49.0,48.0,40.00" style="Table5">
<tr>
<td><para style="Standard">[[ o.code or '' ]] [[ o.name or '' ]]</para></td>
<td><para style="Standard"></para></td>

View File

@ -107,182 +107,6 @@
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<blockTableStyle id="TrLevel8">
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel7">
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel6">
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel5">
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel4">
<blockLeftPadding length="0" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel3">
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="1,0"/>
<blockLeftPadding length="0" start="0,3" stop="1,3"/>
</blockTableStyle>
<blockTableStyle id="TrLevel2">
<lineStyle kind="LINEBELOW" colorName="#777777" start="1,0" stop="-1,0"/>
<blockLeftPadding length="0" start="0,0" stop="1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel1">
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<blockLeftPadding length="0" start="0,0" stop="1,0"/>
</blockTableStyle>
<blockTableStyle id="TrLevel0">
<lineStyle kind="LINEBELOW" colorName="#777777" start="0,2" stop="1,2"/>
<lineStyle kind="LINEBELOW" colorName="#ffffff" start="2,2" stop="-1,2"/>
</blockTableStyle>
<blockTableStyle id="LineLevel1">
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,2" stop="-1,-1"/>
</blockTableStyle>
<blockTableStyle id="Line1">
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="Line2">
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
</blockTableStyle>
<paraStyle
name="Level8"
fontName="Helvetica-Bold"
fontSize="8.0" />
<paraStyle
name="Level7"
fontName="Helvetica-Bold"
fontSize="8.0" />
<paraStyle
name="Level6"
fontName="Helvetica-Bold"
fontSize="8.0" />
<paraStyle
name="Level5"
fontName="Helvetica-Bold"
fontSize="8.0" />
<paraStyle
name="Level4"
fontName="Helvetica-Bold"
fontSize="8.0" />
<paraStyle
name="Level3"
fontName="Helvetica-Bold"
fontSize="8.0" />
<paraStyle name="Level2"
fontSize="8.0"
fontName="Helvetica-Bold"
/>
<paraStyle name="Level1"
fontSize="8.0"
fontName="Helvetica-Bold"
/>
<paraStyle
name="Amt_Level8"
fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Amt_Level7"
fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Amt_Level6"
fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Amt_Level5"
fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Amt_Level4"
fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Amt_Level3"
fontName="Helvetica-Bold"
fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Amt_Level2"
fontSize="8.0"
fontName="Helvetica-Bold" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
/>
<paraStyle name="Amt_Level1"
fontSize="8.0"
fontName="Helvetica-Bold" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
/>
<paraStyle
name="Det_Level8"
fontName="Times-Italic"
fontSize="8.0" leading="5"/>
<paraStyle
name="Det_Level7"
fontName="Times-Italic"
fontSize="8.0" leading="5"/>
<paraStyle
name="Det_Level6"
fontName="Times-Italic"
fontSize="8.0" leading="5"/>
<paraStyle
name="Det_Level5"
fontName="Times-Italic"
fontSize="8.0" leading="5"/>
<paraStyle
name="Det_Level4"
fontName="Times-Italic"
fontSize="8.0" leading="5"/>
<paraStyle
name="Det_Level3"
fontName="Times-Italic"
fontSize="8.0" leading="5"/>
<paraStyle name="Det_Level2"
fontSize="8.0" leading="5"
fontName="Times-Italic"
/>
<paraStyle name="Det_Level1"
fontSize="8.0" leading="5"
fontName="Times-Italic"
/>
<paraStyle
name="Det_Amt_Level8"
fontName="Times-Italic"
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Det_Amt_Level7"
fontName="Times-Italic"
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Det_Amt_Level6"
fontName="Times-Italic"
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Det_Amt_Level5"
fontName="Times-Italic"
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Det_Amt_Level4"
fontName="Times-Italic"
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle
name="Det_Amt_Level3"
fontName="Times-Italic"
fontSize="8.0" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Det_Amt_Level2"
fontSize="8.0"
fontName="Times-Italic" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
/>
<paraStyle name="Det_Amt_Level1"
fontSize="8.0"
fontName="Times-Italic" leading="5" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"
/>
</stylesheet>
<story>
<para style="P12a"></para>
@ -305,19 +129,19 @@
</tr>
<tr>
<td><para style="P7">Balance</para></td>
<td><para style="P8"></para></td>
<td><para style="P8"></para></td>
<td><para style="P8">[[ formatLang(solde_debit(data)) ]]</para></td>
<td><para style="P8">[[ formatLang(solde_credit(data)) ]]</para></td>
<td><para style="P8"></para></td>
<td><para style="P8"></para></td>
</tr>
<tr>
<td><para style="P3">[[ repeatIn(lines(data), 'a') ]]<font>[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]][[ a['ref'] ]] [[ a['type']==3 and a['code'] ]]</font></para></td>
<td><para style="P3">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]][[ a['name'] ]]</para></td>
<td><para style="P4">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]][[ formatLang(a['debit']) ]]</para></td>
<td><para style="P4">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]][[ formatLang(a['credit']) ]]</para></td>
<td><para style="P4">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]][[ formatLang(a['balance']) ]]</para></td>
<td><para style="P4">[[ a['type']==3 and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) ]][[ formatLang(a['enlitige'] or 0.00) ]]</para></td>
<td><para style="P3">[[ repeatIn(lines(data), 'a') ]]<font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font><font>[[ a['ref'] ]] [[ a['type']==3 and a['code'] ]]</font></para></td>
<td><para style="P3"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ a['name'] ]]</para></td>
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['debit']) ]]</para></td>
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['credit']) ]]</para></td>
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['balance']) ]]</para></td>
<td><para style="P4"><font>[[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]]</font>[[ formatLang(a['enlitige'] or 0.00) ]]</para></td>
</tr>
</blockTable>
</story>

View File

@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Journal Select">
<label string="Are you sure you want to open Journal Entries!" colspan="4"/>
<label string="Are you sure you want to open Journal Entries?" colspan="4"/>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-17 09:32+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-07-07 09:15+0000\n"
"Last-Translator: Bojan Markovic <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:02+0000\n"
"X-Launchpad-Export-Date: 2010-07-08 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_followup
@ -29,7 +29,7 @@ msgstr "Partneri"
#. module: account_followup
#: rml:account_followup.followup.print:0
msgid "Customer Ref :"
msgstr ""
msgstr "Refernca kupca:"
#. module: account_followup
#: model:ir.actions.act_window,name:account_followup.act_account_partner_account_move_payable_all
@ -102,7 +102,7 @@ msgstr ""
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(followup_amount)s: Total Amount Due"
msgstr ""
msgstr "%(followup_amount): Ukupan dospjeli iznos"
#. module: account_followup
#: view:account_followup.followup.line:0
@ -280,12 +280,12 @@ msgstr "Linije"
#: model:ir.actions.wizard,name:account_followup.action_account_followup_all_wizard
#: model:ir.ui.menu,name:account_followup.account_followup_wizard_menu
msgid "Send followups"
msgstr ""
msgstr "Pošaljite napomene"
#. module: account_followup
#: field:account.move.line,followup_line_id:0
msgid "Follow-up Level"
msgstr ""
msgstr "Stupanj napomene"
#. module: account_followup
#: field:account_followup.stat,credit:0
@ -331,7 +331,7 @@ msgstr ""
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(company_currency)s: User's Company Currency"
msgstr ""
msgstr "%(company_currency): Valuta poduzeća korisnika"
#. module: account_followup
#: field:account_followup.stat,balance:0
@ -412,7 +412,7 @@ msgstr "Dospijeće"
#. module: account_followup
#: model:ir.actions.report.xml,name:account_followup.account_followup_followup_report
msgid "Followup Report"
msgstr ""
msgstr "Izvještaj o napomenama"
#. module: account_followup
#: model:account_followup.followup.line,description:account_followup.demo_followup_line3
@ -454,7 +454,7 @@ msgstr "Sekvenca"
#. module: account_followup
#: wizard_view:account_followup.followup.print.all,next:0
msgid "%(heading)s: Move line header"
msgstr ""
msgstr "%(heading)s: Zaglavlje retka izmjena"
#. module: account_followup
#: view:account_followup.followup.line:0

View File

@ -7,172 +7,173 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-02-03 06:45+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-07-07 09:53+0000\n"
"Last-Translator: Bojan Markovic <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:10+0000\n"
"X-Launchpad-Export-Date: 2010-07-08 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Sub Total"
msgstr ""
msgstr "Suma"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Invoice Date:"
msgstr ""
msgstr "Datum Fakture:"
#. module: account_invoice_layout
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Naziv objekta mora počinjati sa x_ i ne smije sadržavati specijalne znakove!"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Cancelled Invoice"
msgstr ""
msgstr "Poništena faktura"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
#: field:notify.message,name:0
msgid "Title"
msgstr ""
msgstr "Naslov"
#. module: account_invoice_layout
#: model:ir.actions.wizard,name:account_invoice_layout.wizard_notify_message
msgid "Invoices with Layout and Message"
msgstr ""
msgstr "Fakture sa izgledom i porukom"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Disc. (%)"
msgstr ""
msgstr "Rab. (%)"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "(Incl. taxes):"
msgstr ""
msgstr "(Uklj. porez):"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Note"
msgstr ""
msgstr "Bilješka"
#. module: account_invoice_layout
#: wizard_button:wizard.notify_message,init,print:0
msgid "Print"
msgstr ""
msgstr "Ispis"
#. module: account_invoice_layout
#: help:notify.message,msg:0
msgid ""
"This notification will appear at the bottom of the Invoices when printed."
msgstr ""
msgstr "Ova napomena će se pojaviti na dnu fakture prilikom ispisa."
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Unit Price"
msgstr ""
msgstr "Jedinična cijena"
#. module: account_invoice_layout
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Neispravan naziv modela u definiciji zadatka."
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_notify_message
msgid "Notify By Messages"
msgstr ""
msgstr "Napomeni po porukama"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "PRO-FORMA"
msgstr ""
msgstr "PRO-FORMA"
#. module: account_invoice_layout
#: field:account.invoice,abstract_line_ids:0
msgid "Invoice Lines"
msgstr ""
msgstr "Stavke fakture"
#. module: account_invoice_layout
#: view:account.invoice.line:0
msgid "Seq."
msgstr ""
msgstr "Sek."
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_finan_config_notify_message
msgid "Notification Message"
msgstr ""
msgstr "Poruka napomene"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Customer Ref:"
msgstr ""
msgstr "Referenca kupca"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid ")"
msgstr ""
msgstr ")"
#. module: account_invoice_layout
#: field:account.invoice.line,state:0
msgid "Type"
msgstr ""
msgstr "Vrsta"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Price"
msgstr ""
msgstr "Cijena"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "/ ("
msgstr ""
msgstr "/ ("
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Taxes:"
msgstr ""
msgstr "Porezi:"
#. module: account_invoice_layout
#: field:account.invoice.line,functional_field:0
msgid "Source Account"
msgstr ""
msgstr "Izvorni konto"
#. module: account_invoice_layout
#: model:ir.actions.act_window,name:account_invoice_layout.notify_mesage_tree_form
msgid "Write Messages"
msgstr ""
msgstr "Unesi poruke"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Base"
msgstr ""
msgstr "Osnovica"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Fax :"
msgstr ""
msgstr "Fax :"
#. module: account_invoice_layout
#: field:notify.message,msg:0
msgid "Special Message"
msgstr ""
msgstr "Posebna poruka"
#. module: account_invoice_layout
#: view:notify.message:0
msgid "Write a notification or a wishful message."
msgstr ""
msgstr "Unesi napomenu ili molbu."
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Tel. :"
msgstr ""
msgstr "Tel. :"
#. module: account_invoice_layout
#: constraint:ir.ui.view:0
@ -187,77 +188,77 @@ msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Document:"
msgstr ""
msgstr "Dokument:"
#. module: account_invoice_layout
#: wizard_view:wizard.notify_message,init:0
msgid "Select Message"
msgstr ""
msgstr "Odaberi poruku"
#. module: account_invoice_layout
#: view:notify.message:0
msgid "Messages"
msgstr ""
msgstr "Poruke"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Product"
msgstr ""
msgstr "Proizvod"
#. module: account_invoice_layout
#: model:ir.actions.report.xml,name:account_invoice_layout.account_invoices_1
msgid "Invoices with Layout"
msgstr ""
msgstr "Fakture sa izgledom"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Description / Taxes"
msgstr ""
msgstr "Opis / Porezi"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Amount"
msgstr ""
msgstr "Iznos"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Description/Taxes"
msgstr ""
msgstr "Opis/Porezi"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Draft Invoice"
msgstr ""
msgstr "Predračun"
#. module: account_invoice_layout
#: field:account.invoice.line,sequence:0
msgid "Sequence Number"
msgstr ""
msgstr "Broj sekvence"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Quantity"
msgstr ""
msgstr "Količina"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Refund"
msgstr ""
msgstr "Povrat"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "VAT :"
msgstr ""
msgstr "PDV :"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Separator Line"
msgstr ""
msgstr "Linija za razdvajanje"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Supplier Invoice"
msgstr ""
msgstr "Faktura dobavljača"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
@ -267,7 +268,7 @@ msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Tax"
msgstr ""
msgstr "Porez"
#. module: account_invoice_layout
#: model:ir.module.module,shortdesc:account_invoice_layout.module_meta_information
@ -277,34 +278,34 @@ msgstr ""
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Total (Excl. taxes):"
msgstr ""
msgstr "Ukupno (bez poreza):"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Invoice"
msgstr ""
msgstr "Faktura"
#. module: account_invoice_layout
#: wizard_button:wizard.notify_message,init,end:0
msgid "Cancel"
msgstr ""
msgstr "Poništi"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Supplier Refund"
msgstr ""
msgstr "Povrat dobavljača"
#. module: account_invoice_layout
#: wizard_field:wizard.notify_message,init,message:0
msgid "Message"
msgstr ""
msgstr "Poruka"
#. module: account_invoice_layout
#: rml:account.invoice.layout:0
msgid "Total"
msgstr ""
msgstr "Ukupno"
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_notify_mesage_tree_form
msgid "All Notification Messages"
msgstr ""
msgstr "Sve napomene"

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-02-03 07:29+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-07-07 09:59+0000\n"
"Last-Translator: Bojan Markovic <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 03:55+0000\n"
"X-Launchpad-Export-Date: 2010-07-08 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_report
@ -41,7 +41,7 @@ msgstr ""
#. module: account_report
#: field:account.report.report,parent_id:0
msgid "Parent"
msgstr ""
msgstr "Sintetika"
#. module: account_report
#: field:account.report.report,disp_graph:0
@ -56,7 +56,7 @@ msgstr ""
#. module: account_report
#: selection:account.report.report,type:0
msgid "Others"
msgstr ""
msgstr "Ostali"
#. module: account_report
#: view:account.report.report:0
@ -76,7 +76,7 @@ msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "= Goodness Indicator Limit:"
msgstr ""
msgstr "= Limit indikatora dobrote:"
#. module: account_report
#: view:account.report.report:0
@ -87,7 +87,7 @@ msgstr ""
#: field:account.report.history,val:0
#: field:account.report.report,amount:0
msgid "Value"
msgstr ""
msgstr "Vrijednost"
#. module: account_report
#: view:account.report.report:0
@ -133,12 +133,12 @@ msgstr ""
#. module: account_report
#: view:account.report.report:0
msgid "Report Amount:"
msgstr ""
msgstr "Iznos izvještaja:"
#. module: account_report
#: model:ir.actions.report.xml,name:account_report.fiscal_statements
msgid "Fiscal Statements"
msgstr ""
msgstr "Fiskalni izvod"
#. module: account_report
#: wizard_button:print.indicators,init,next:0
@ -148,7 +148,7 @@ msgstr ""
#. module: account_report
#: model:ir.module.module,shortdesc:account_report.module_meta_information
msgid "Reporting for accounting"
msgstr ""
msgstr "Izvještavanje za računovodstvo"
#. module: account_report
#: wizard_button:print.indicators,next,print:0
@ -164,7 +164,7 @@ msgstr ""
#. module: account_report
#: model:ir.actions.report.xml,name:account_report.report_indicator_pdf
msgid "Print Indicators in PDF"
msgstr ""
msgstr "Ispiši indikatore u PDF"
#. module: account_report
#: view:account.report.report:0
@ -249,7 +249,7 @@ msgstr ""
#. module: account_report
#: selection:account.report.report,status:0
msgid "Normal"
msgstr ""
msgstr "Normalno"
#. module: account_report
#: view:account.report.report:0
@ -284,7 +284,7 @@ msgstr ""
#. module: account_report
#: rml:print.indicators:0
msgid "Expression :"
msgstr ""
msgstr "Izraz :"
#. module: account_report
#: view:account.report.report:0
@ -294,7 +294,7 @@ msgstr ""
#. module: account_report
#: field:account.report.report,expression:0
msgid "Expression"
msgstr ""
msgstr "Izraz"
#. module: account_report
#: view:account.report.report:0

View File

@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-02-03 08:09+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-07-07 09:23+0000\n"
"Last-Translator: Bojan Markovic <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:15+0000\n"
"X-Launchpad-Export-Date: 2010-07-08 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_reporting
#: field:color.rml,code:0
msgid "code"
msgstr ""
msgstr "šifra"
#. module: account_reporting
#: constraint:ir.model:0
@ -61,7 +61,7 @@ msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier"
msgstr ""
msgstr "Courier"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
@ -98,7 +98,7 @@ msgstr ""
#. module: account_reporting
#: selection:account.report.bs,report_type:0
msgid "Report Objects With Accounts"
msgstr ""
msgstr "Objekti izvještaja sa kontima"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
@ -144,12 +144,12 @@ msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Courier-Bold"
msgstr ""
msgstr "Courier-Bold"
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Italic"
msgstr ""
msgstr "Times-Italic"
#. module: account_reporting
#: selection:account.report.bs,report_type:0
@ -184,12 +184,12 @@ msgstr ""
#. module: account_reporting
#: selection:account.report.bs,font_style:0
msgid "Times-Bold"
msgstr ""
msgstr "Times-Bold"
#. module: account_reporting
#: view:account.report.bs:0
msgid "General"
msgstr ""
msgstr "Općenito"
#. module: account_reporting
#: wizard_field:account.account.balancesheet.report,init,fiscalyear:0
@ -205,7 +205,7 @@ msgstr ""
#. module: account_reporting
#: wizard_field:account.account.balancesheet.report,init,periods:0
msgid "Periods"
msgstr ""
msgstr "Periodi"
#. module: account_reporting
#: field:account.report.bs,color_back:0

View File

@ -20,14 +20,17 @@
##############################################################################
import time
import netsvc
from osv import fields
from osv import osv
import ir
import pooler
import mx.DateTime
from mx.DateTime import RelativeDateTime
from tools import config
journal2type = {
'cash':'rec_voucher',
'bank':'bank_rec_voucher',
'cash':'pay_voucher',
'sale':'journal_sale_vou',
'purchase':'journal_pur_voucher',
'general':'journal_voucher'
}
type2journal = {
'rec_voucher': 'cash',
@ -68,8 +71,9 @@ class account_voucher(osv.osv):
return False
def _get_type(self, cr, uid, context={}):
type = context.get('type', 'bank_rec_voucher')
return type
vtype = context.get('type', 'bank')
voucher_type = journal2type.get(vtype)
return voucher_type
def _get_reference_type(self, cursor, user, context=None):
return [('none', 'Free Reference')]
@ -91,15 +95,15 @@ class account_voucher(osv.osv):
return False
def _get_currency(self, cr, uid, context):
user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, uid)
user = self.pool.get('res.users').browse(cr, uid, uid)
if user.company_id:
return user.company_id.currency_id.id
else:
return pooler.get_pool(cr.dbname).get('res.currency').search(cr, uid, [('rate','=',1.0)])[0]
return self.pool.get('res.currency').search(cr, uid, [('rate','=',1.0)])[0]
_name = 'account.voucher'
_description = 'Accounting Voucher'
_order = "number"
_order = "id desc"
_columns = {
'name':fields.char('Name', size=256, required=True, readonly=True, states={'draft':[('readonly',False)]}),
'type': fields.selection([
@ -107,7 +111,7 @@ class account_voucher(osv.osv):
('bank_pay_voucher','Bank Payment'),
('rec_voucher','Cash Receipt'),
('bank_rec_voucher','Bank Receipt'),
('cont_voucher','Contra'),
# ('cont_voucher','Contra'),
('journal_sale_vou','Journal Sale'),
('journal_pur_voucher','Journal Purchase'),
('journal_voucher','Journal Voucher'),
@ -117,7 +121,7 @@ class account_voucher(osv.osv):
'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}, domain=[('type','<>','view')]),
'payment_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=False, states={'proforma':[('readonly',True)]}),
'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'posted':[('readonly',True)]}),
'narration':fields.text('Narration', readonly=True, states={'draft':[('readonly',False)]}, required=True),
'narration':fields.text('Narration', readonly=True, states={'draft':[('readonly',False)]}, required=False),
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True),
'state':fields.selection(
@ -133,10 +137,10 @@ class account_voucher(osv.osv):
\n* The \'Posted\' state is used when user create voucher,a voucher number is generated and voucher entries are created in account \
\n* The \'Cancelled\' state is used when user cancel voucher.'),
'amount':fields.float('Amount', readonly=True),
'number':fields.char('Number', size=32, readonly=True),
'reference': fields.char('Voucher Reference', size=64),
'reference_type': fields.selection(_get_reference_type, 'Reference Type',
required=True),
'number': fields.related('move_id', 'name', type="char", readonly=True, string='Number'),
'move_id':fields.many2one('account.move', 'Account Entry'),
'move_ids':fields.many2many('account.move.line', 'voucher_id', 'account_id', 'rel_account_move', 'Real Entry'),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True, states={'draft':[('readonly',False)]})
@ -147,24 +151,17 @@ class account_voucher(osv.osv):
'type': _get_type,
'journal_id':_get_journal,
'currency_id': _get_currency,
'state': lambda *a: 'draft',
'date' : lambda *a: time.strftime('%Y-%m-%d'),
'reference_type': lambda *a: "none",
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher',context=c),
}
# def _get_analityc_lines(self, cr, uid, id):
# inv = self.browse(cr, uid, [id])[0]
# cur_obj = self.pool.get('res.currency')
def onchange_account(self, cr, uid, ids, account_id):
if not account_id:
return {
'value':{'amount':False}
}
account = self.pool.get('account.account').browse(cr, uid, account_id)
balance=account.balance
return {
@ -176,7 +173,6 @@ class account_voucher(osv.osv):
return {
'value':{'account_id':False}
}
journal = self.pool.get('account.journal')
if journal_id and (type in ('rec_voucher','bank_rec_voucher','journal_pur_voucher','journal_voucher')):
@ -196,30 +192,45 @@ class account_voucher(osv.osv):
}
def open_voucher(self, cr, uid, ids, context={}):
obj = self.pool.get('account.voucher').browse(cr, uid, ids)
voucher = self.pool.get('account.voucher').browse(cr, uid, ids)[0]
total = 0
for i in obj[0].payment_ids:
total += i.amount
for line in voucher.payment_ids:
total += line.amount
if total != 0:
self.write(cr, uid, ids, {'amount':total, 'state':'proforma'})
res = {
'amount':total,
'state':'proforma'
}
self.write(cr, uid, ids, res)
else:
raise osv.except_osv('Invalid action !', 'You cannot post to Pro-Forma a voucher with Total amount = 0 !')
return True
def proforma_voucher(self, cr, uid, ids, context={}):
self.action_number(cr, uid, ids)
self.action_move_line_create(cr, uid, ids)
self.write(cr, uid, ids, {'state':'posted'})
return True
def cancel_voucher(self, cr, uid, ids, context={}):
self.action_cancel(cr, uid, ids)
self.write(cr, uid, ids, {'state':'cancel'})
return True
def action_cancel_draft(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state':'draft'})
return True
def cancel_voucher(self, cr, uid, ids, context={}):
move_pool = self.pool.get('account.move')
for voucher in self.browse(cr, uid, ids):
if voucher.move_id:
move_pool.button_cancel(cr, uid, [voucher.move_id.id])
move_pool.unlink(cr, uid, [voucher.move_id.id])
res = {
'state':'cancel',
'move_id':False,
'move_ids':[(6, 0,[])]
}
self.write(cr, uid, ids, res)
return True
def unlink(self, cr, uid, ids, context=None):
vouchers = self.read(cr, uid, ids, ['state'])
@ -231,237 +242,126 @@ class account_voucher(osv.osv):
raise osv.except_osv('Invalid action !', 'Cannot delete Voucher(s) which are already opened or paid !')
return super(account_voucher, self).unlink(cr, uid, unlink_ids, context=context)
def _get_analytic_lines(self, cr, uid, id):
inv = self.browse(cr, uid, [id])[0]
cur_obj = self.pool.get('res.currency')
company_currency = inv.company_id.currency_id.id
if inv.type in ('rec_voucher'):
sign = 1
else:
sign = -1
iml = self.pool.get('account.voucher.line').move_line_get(cr, uid, inv.id)
for il in iml:
if il['account_analytic_id']:
if inv.type in ('pay_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_vou','journal_pur_voucher'):
ref = inv.reference
else:
ref = self._convert_ref(cr, uid, inv.number)
il['analytic_lines'] = [(0, 0, {
'name': il['name'],
'date': inv['date'],
'account_id': il['account_analytic_id'],
'amount': inv['amount'] * sign,
'general_account_id': il['account_id'] or False,
'journal_id': self.pool.get('account.voucher').browse(cr, uid, id).journal_id.analytic_journal_id.id or False,
'ref': ref,
})]
return iml
def action_move_line_create(self, cr, uid, ids, *args):
journal_pool = self.pool.get('account.journal')
sequence_pool = self.pool.get('ir.sequence')
move_pool = self.pool.get('account.move')
move_line_pool = self.pool.get('account.move.line')
analytic_pool = self.pool.get('account.analytic.line')
currency_pool = self.pool.get('res.currency')
for inv in self.browse(cr, uid, ids):
if inv.move_id:
continue
company_currency = inv.company_id.currency_id.id
line_ids = self.read(cr, uid, [inv.id], ['payment_ids'])[0]['payment_ids']
ils = self.pool.get('account.voucher.line').read(cr, uid, line_ids)
iml = self._get_analytic_lines(cr, uid, inv.id)
diff_currency_p = inv.currency_id.id <> company_currency
total = 0
if inv.type in ('pay_voucher', 'journal_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_vou','journal_pur_voucher'):
ref = inv.reference
else:
ref = self._convert_ref(cr, uid, inv.number)
acc_id = None
date = inv.date
total_currency = 0
acc_id = None
for i in iml:
partner_id=i['partner_id']
acc_id = i['account_id']
if inv.currency_id.id != company_currency:
i['currency_id'] = inv.currency_id.id
i['amount_currency'] = i['amount']
else:
i['amount_currency'] = False
i['currency_id'] = False
if inv.type in ('rec_voucher','bank_rec_voucher','journal_pur_voucher','journal_voucher'):
total += i['amount']
total_currency += i['amount_currency'] or i['amount']
i['amount'] = - i['amount']
else:
total -= i['amount']
total_currency -= i['amount_currency'] or i['amount']
name = inv['name'] or '/'
totlines = False
iml.append({
'type': 'dest',
'name': name,
'amount': total or False,
'account_id': acc_id,
'amount_currency': diff_currency_p \
and total_currency or False,
'currency_id': diff_currency_p \
and inv.currency_id.id or False,
'ref': ref,
'partner_id':partner_id or False,
})
date = inv.date
inv.amount=total
line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x,date, context={})) ,iml)
an_journal_id=inv.journal_id.analytic_journal_id.id
journal_id = inv.journal_id.id
journal = self.pool.get('account.journal').browse(cr, uid, journal_id)
ref = inv.reference
journal = journal_pool.browse(cr, uid, inv.journal_id.id)
if journal.sequence_id:
name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id)
name = sequence_pool.get_id(cr, uid, journal.sequence_id.id)
move = {
'name' : name,
'journal_id': journal_id,
'journal_id': journal.id,
'type' : inv.type,
'narration' : inv.narration,
'narration' : inv.narration and inv.narration or inv.name,
'date':inv.date
}
if inv.period_id:
move['period_id'] = inv.period_id.id
for i in line:
i[2]['period_id'] = inv.period_id.id
move_id = self.pool.get('account.move').create(cr, uid, move)
ref = move['name']
amount=0.0
#create the first line our self
move.update({
'period_id': inv.period_id.id
})
move_id = move_pool.create(cr, uid, move)
#create the first line manually
move_line = {
'name': inv.name,
'debit': False,
'credit':False,
'account_id': inv.account_id.id or False,
'move_id':move_id ,
'journal_id':journal_id ,
'period_id':inv.period_id.id,
'move_id': move_id ,
'journal_id': inv.journal_id.id,
'period_id': inv.period_id.id,
'partner_id': False,
'ref': ref,
'date': inv.date
}
if diff_currency_p:
amount_currency = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.amount)
inv.amount = amount_currency
move_line.update({
'amount_currency':amount_currency,
'currency_id':inv.currency_id.id
})
if inv.type in ('rec_voucher', 'bank_rec_voucher', 'journal_pur_voucher', 'journal_voucher'):
move_line['debit'] = inv.amount
else:
move_line['credit'] = inv.amount * (-1)
self.pool.get('account.move.line').create(cr, uid, move_line)
move_line['credit'] = inv.amount
line_ids = []
line_ids += [move_line_pool.create(cr, uid, move_line)]
for line in inv.payment_ids:
amount=0.0
move_line = {
'name':line.name,
'debit':False,
'credit':False,
'account_id':line.account_id.id or False,
'move_id':move_id ,
'journal_id':journal_id ,
'period_id':inv.period_id.id,
'partner_id':line.partner_id.id or False,
'ref':ref,
'date':inv.date
}
if line.type == 'dr':
move_line['debit'] = line.amount or False
amount=line.amount
elif line.type == 'cr':
move_line['credit'] = line.amount or False
amount=line.amount * (-1)
move_line['analytic_account_id'] = line.account_analytic_id.id or False
ml_id=self.pool.get('account.move.line').create(cr, uid, move_line)
if inv.narration:
line.name = inv.narration
else:
line.name = line.name
'name': line.name,
'debit': False,
'credit': False,
'account_id': line.account_id.id or False,
'move_id': move_id ,
'journal_id': inv.journal_id.id,
'period_id': inv.period_id.id,
'partner_id': line.partner_id.id or False,
'ref': ref,
'date': inv.date,
'analytic_account_id': False
}
if diff_currency_p:
amount_currency = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, line.amount)
line.amount = amount_currency
move_line.update({
'amount_currency':amount_currency,
'currency_id':inv.currency_id.id
})
if line.account_analytic_id:
an_line = {
'name':line.name,
'date':inv.date,
'amount':amount,
'account_id':line.account_analytic_id.id or False,
'move_id':ml_id,
'journal_id':an_journal_id ,
'general_account_id':line.account_id.id,
'ref':ref
}
self.pool.get('account.analytic.line').create(cr, uid, an_line)
self.write(cr, uid, [inv.id], {'move_id': move_id})
obj=self.pool.get('account.move').browse(cr, uid, move_id)
for line in obj.line_id :
cr.execute('insert into voucher_id (account_id,rel_account_move) values (%d, %d)',(int(ids[0]),int(line.id)))
move_line.update({
'analytic_account_id':line.account_analytic_id.id
})
if line.type == 'dr':
move_line.update({
'debit': line.amount or False
})
amount = line.amount
elif line.type == 'cr':
move_line.update({
'credit': line.amount or False
})
amount = line.amount * (-1)
move_line_id = move_line_pool.create(cr, uid, move_line)
line_ids += [move_line_id]
rec = {
'move_id': move_id,
'move_ids':[(6, 0,line_ids)]
}
self.write(cr, uid, [inv.id], rec)
return True
def line_get_convert(self, cr, uid, x, date, context={}):
return {
'date':date,
'date_maturity': x.get('date_maturity', False),
'partner_id':x.get('partner_id',False),
'name':x['name'][:64],
'debit':x['amount']>0 and x['amount'],
'credit':x['amount']<0 and -x['amount'],
'account_id':x['account_id'],
'analytic_lines':x.get('analytic_lines', []),
'amount_currency':x.get('amount_currency', False),
'currency_id':x.get('currency_id', False),
'tax_code_id': x.get('tax_code_id', False),
'tax_amount': x.get('tax_amount', False),
'ref':x.get('ref',False)
}
def _convert_ref(self, cr, uid, ref):
return (ref or '').replace('/','')
def action_number(self, cr, uid, ids, *args):
cr.execute('SELECT id, type, number, move_id, reference ' \
'FROM account_voucher ' \
'WHERE id IN %s',(tuple(ids),))
for (id, invtype, number, move_id, reference) in cr.fetchall():
if not number:
number = self.pool.get('ir.sequence').get(cr, uid, invtype)
if type in ('pay_voucher', 'journal_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_vou','journal_pur_voucher'):
ref = reference
else:
ref = self._convert_ref(cr, uid, number)
cr.execute('UPDATE account_voucher SET number=%s ' \
'WHERE id=%s', (number, id))
cr.execute('UPDATE account_move_line SET ref=%s ' \
'WHERE move_id=%s AND (ref is null OR ref = \'\')',
(ref, move_id))
cr.execute('UPDATE account_analytic_line SET ref=%s ' \
'FROM account_move_line ' \
'WHERE account_move_line.move_id = %s ' \
'AND account_analytic_line.move_id = account_move_line.id',
(ref, move_id))
return True
def name_get(self, cr, uid, ids, context={}):
if not len(ids):
return []
@ -498,19 +398,6 @@ class account_voucher(osv.osv):
default['date'] = time.strftime('%Y-%m-%d')
return super(account_voucher, self).copy(cr, uid, id, default, context)
def action_cancel(self, cr, uid, ids, *args):
account_move_obj = self.pool.get('account.move')
voucher = self.read(cr, uid, ids, ['move_id'])
for i in voucher:
if i['move_id']:
account_move_obj.button_cancel(cr, uid, [i['move_id'][0]])
# delete the move this invoice was pointing to
# Note that the corresponding move_lines and move_reconciles
# will be automatically deleted too
account_move_obj.unlink(cr, uid, [i['move_id'][0]])
self.write(cr, uid, ids, {'state':'cancel', 'move_id':False})
return True
account_voucher()
class account_voucher_line(osv.osv):
@ -530,176 +417,52 @@ class account_voucher_line(osv.osv):
'type': lambda *a: 'cr'
}
def move_line_get(self, cr, uid, voucher_id, context={}):
res = []
cur_obj = self.pool.get('res.currency')
inv = self.pool.get('account.voucher').browse(cr, uid, voucher_id)
company_currency = inv.company_id.currency_id.id
cur = inv.currency_id
for line in inv.payment_ids:
res.append(self.move_line_get_item(cr, uid, line, context))
return res
def onchange_partner(self, cr, uid, ids, partner_id, ttype ,type1):
vals = {}
if not partner_id:
return {'value' : {'account_id' : False, 'type' : False ,'amount':False}}
obj = self.pool.get('res.partner')
vals.update({
'account_id': False,
'type': False ,
'amount': False
})
return {
'value' : vals
}
partner_pool = self.pool.get('res.partner')
account_id = False
partner = partner_pool.browse(cr, uid, partner_id)
if type1 in ('rec_voucher','bank_rec_voucher', 'journal_voucher'):
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
balance = obj.browse(cr,uid,partner_id).credit
account_id = partner.property_account_receivable.id
balance = partner.credit
ttype = 'cr'
elif type1 in ('pay_voucher','bank_pay_voucher','cont_voucher') :
account_id = obj.browse(cr, uid, partner_id).property_account_payable
balance = obj.browse(cr,uid,partner_id).debit
account_id = partner.property_account_payable.id
balance = partner.debit
ttype = 'dr'
elif type1 in ('journal_sale_vou') :
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
balance = obj.browse(cr,uid,partner_id).credit
account_id = partner.property_account_receivable.id
balance = partner.credit
ttype = 'dr'
elif type1 in ('journal_pur_voucher') :
account_id = obj.browse(cr, uid, partner_id).property_account_payable
balance = obj.browse(cr,uid,partner_id).debit
account_id = partner.property_account_payable.id
balance = partner.debit
ttype = 'cr'
vals.update({
'account_id': account_id,
'type': ttype,
'amount':balance
})
return {
'value' : {'account_id' : account_id.id, 'type' : ttype, 'amount':balance}
'value' : vals
}
def onchange_amount(self, cr, uid, ids, partner_id, amount, type, type1):
if not amount:
return {'value' : {}}
if partner_id:
obj = self.pool.get('res.partner')
if type1 in ('rec_voucher', 'bank_rec_voucher', 'journal_voucher'):
if amount < 0 :
account_id = obj.browse(cr, uid, partner_id).property_account_payable
type = 'dr'
else:
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
type = 'cr'
elif type1 in ('pay_voucher','bank_pay_voucher','cont_voucher') :
if amount < 0 :
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
type = 'cr'
else:
account_id = obj.browse(cr, uid, partner_id).property_account_payable
type = 'dr'
elif type1 in ('journal_sale_vou') :
if amount < 0 :
account_id = obj.browse(cr, uid, partner_id).property_account_payable
type = 'cr'
else:
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
type = 'dr'
elif type1 in ('journal_pur_voucher') :
if amount< 0 :
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
type = 'dr'
else:
account_id = obj.browse(cr, uid, partner_id).property_account_payable
type = 'cr'
else:
if type1 in ('rec_voucher', 'bank_rec_voucher', 'journal_voucher'):
if amount < 0 :
type = 'dr'
else:
type = 'cr'
elif type1 in ('pay_voucher','bank_pay_voucher','cont_voucher') :
if amount < 0 :
type = 'cr'
else:
type = 'dr'
elif type1 in ('journal_sale_vou') :
if amount < 0 :
type = 'cr'
else:
type = 'dr'
elif type1 in ('journal_pur_voucher') :
if amount< 0 :
type = 'dr'
else:
type = 'cr'
return {
'value' : { 'type' : type , 'amount':amount}
}
def onchange_type(self, cr, uid, ids, partner_id, amount, type, type1):
if partner_id:
obj = self.pool.get('res.partner')
if type1 in ('rec_voucher','bank_rec_voucher', 'journal_voucher'):
if type == 'dr' :
account_id = obj.browse(cr, uid, partner_id).property_account_payable
total=amount*(-1)
else:
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
total=amount*(-1)
elif type1 in ('pay_voucher','bank_pay_voucher','cont_voucher') :
if type == 'cr' :
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
total=amount*(-1)
else:
account_id = obj.browse(cr, uid, partner_id).property_account_payable
total=amount*(-1)
elif type1 in ('journal_sale_vou') :
if type == 'cr' :
account_id = obj.browse(cr, uid, partner_id).property_account_payable
total=amount*(-1)
else:
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
total=amount*(-1)
elif type1 in ('journal_pur_voucher') :
if type == 'dr' :
account_id = obj.browse(cr, uid, partner_id).property_account_receivable
total=amount*(-1)
else:
account_id = obj.browse(cr, uid, partner_id).property_account_payable
total=amount*(-1)
else:
if type1 in ('rec_voucher','bank_rec_voucher', 'journal_voucher'):
if type == 'dr' :
total=amount*(-1)
else:
total=amount*(-1)
elif type1 in ('pay_voucher','bank_pay_voucher','cont_voucher') :
if type == 'cr' :
total=amount*(-1)
else:
total=amount*(-1)
elif type1 in ('journal_sale_vou') :
if type == 'cr' :
total=amount*(-1)
else:
total=amount*(-1)
elif type1 in ('journal_pur_voucher') :
if type == 'dr' :
total=amount*(-1)
else:
total=amount*(-1)
return {
'value' : {'type' : type , 'amount':total}
}
def move_line_get_item(self, cr, uid, line, context={}):
return {
'type':'src',
'name': line.name[:64],
'amount':line.amount,
'account_id':line.account_id.id,
'partner_id':line.partner_id.id or False ,
'account_analytic_id':line.account_analytic_id.id or False,
'ref' : line.ref
}
account_voucher_line()

View File

@ -35,32 +35,19 @@
</group>
<notebook colspan="4">
<page string="Journal Entries">
<field name="payment_ids" colspan="4" nolabel="1" height="260">
<field name="payment_ids" colspan="4" nolabel="1" height="250">
<tree string="Voucher Lines" editable="top">
<field name="account_analytic_id"/>
<field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type)"/>
<field name="account_id"/>
<field name="name"/>
<field name="type"/>
<field name="amount"/>
<field name="account_analytic_id"/>
<field name="ref"/>
</tree>
</field>
<separator string="Narration" colspan="4"/>
<field name="narration" colspan="4" nolabel="1" height="50"/>
<group col="6" colspan="6">
<group col="2" colspan="2">
<field name="state"/>
</group>
<group col="8" colspan="4">
<button name="open_voucher" string="Pro-forma" states="draft" icon="terp-check"/>
<button name="proforma_voucher" string="Create" states="proforma" icon="terp-document-new"/>
<button name="recheck_voucher" string="Validate" states="recheck" icon="terp-check"/>
<button name="audit_complete" string="Audit Pass" states="posted" icon="terp-check"/>
<button name="cancel_voucher" string="Cancel" states="proforma,recheck,posted" icon="gtk-cancel"/>
<button name="cancel_to_draft" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
</group>
</group>
</page>
<page string="Other Info">
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
@ -71,6 +58,15 @@
<field name="move_ids" colspan="4" nolabel="1" readonly="1"/>
</page>
</notebook>
<group col="10" colspan="4">
<field name="state"/>
<button name="open_voucher" string="Pro-forma" states="draft" icon="terp-check"/>
<button name="proforma_voucher" string="Create" states="proforma" icon="terp-document-new"/>
<button name="recheck_voucher" string="Validate" states="recheck" icon="terp-check"/>
<button name="audit_complete" string="Audit Pass" states="posted" icon="terp-check"/>
<button name="cancel_voucher" string="Cancel" states="proforma,recheck,posted" icon="gtk-cancel"/>
<button name="cancel_to_draft" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
</group>
</form>
</field>
</record>
@ -136,7 +132,7 @@
</field>
</record>
<!-- Receipt Vouchers -->
<!-- Receipt Vouchers -->
<record model="ir.actions.act_window" id="action_receipt_vou_voucher_list">
<field name="name">Receivable Vouchers</field>
<field name="res_model">account.voucher</field>
@ -144,6 +140,7 @@
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_voucher_tree"/>
<field name="domain">[('journal_id.type','=','sale')]</field>
<field name="context">{'type':'sale'}</field>
<field name="search_view_id" ref="view_voucher_filter_new"/>
</record>
<menuitem id="menu_action_receipt_vou_voucher_list"
@ -157,6 +154,7 @@
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_voucher_tree"/>
<field name="domain">[('journal_id.type','=','purchase')]</field>
<field name="context">{'type':'purchase'}</field>
<field name="search_view_id" ref="view_voucher_filter_new"/>
</record>
<menuitem id="menu_action_pay_vou_voucher_list"
@ -168,6 +166,7 @@
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'type':'general'}</field>
<field name="view_id" eval="view_voucher_tree"/>
<field name="search_view_id" ref="view_voucher_filter"/>
</record>
@ -179,10 +178,12 @@
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
<field name="context">{'type':'bank'}</field>
<field name="view_id" ref="view_voucher_tree"/>
<field name="search_view_id" ref="view_voucher_filter_new"/>
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
</record>
<menuitem action="action_cheque_register" id="menu_action_cheque_register" parent="account.menu_finance_bank_and_cash"/>
<record model="ir.ui.view" id="view_account_journal_form_inherit">

View File

@ -41,7 +41,7 @@
<record id="act_cancel" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">cancel</field>
<field name="action">write({'state':'cancel'})</field>
<field name="action">cancel_voucher()</field>
<field name="kind">function</field>
</record>

View File

@ -38,170 +38,127 @@ class account_voucher(osv.osv):
def action_move_line_create(self, cr, uid, ids, *args):
journal_pool = self.pool.get('account.journal')
sequence_pool = self.pool.get('ir.sequence')
move_pool = self.pool.get('account.move')
move_line_pool = self.pool.get('account.move.line')
analytic_pool = self.pool.get('account.analytic.line')
currency_pool = self.pool.get('res.currency')
invoice_pool = self.pool.get('account.invoice')
for inv in self.browse(cr, uid, ids):
if inv.move_id:
continue
company_currency = inv.company_id.currency_id.id
line_ids = self.read(cr, uid, [inv.id], ['payment_ids'])[0]['payment_ids']
ils = self.pool.get('account.voucher.line').read(cr, uid, line_ids)
iml = self._get_analytic_lines(cr, uid, inv.id)
diff_currency_p = inv.currency_id.id <> company_currency
total = 0
if inv.type in ('pay_voucher', 'journal_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_voucher','journal_pur_voucher'):
ref = inv.reference
else:
ref = self._convert_ref(cr, uid, inv.number)
date = inv.date
total_currency = 0
for i in iml:
partner_id=i['partner_id']
acc_id = i['account_id']
if inv.currency_id.id != company_currency:
i['currency_id'] = inv.currency_id.id
i['amount_currency'] = i['amount']
else:
i['amount_currency'] = False
i['currency_id'] = False
if inv.type in ('rec_voucher','bank_rec_voucher','journal_pur_voucher','journal_voucher'):
total += i['amount']
total_currency += i['amount_currency'] or i['amount']
i['amount'] = - i['amount']
else:
total -= i['amount']
total_currency -= i['amount_currency'] or i['amount']
name = inv['name'] or '/'
totlines = False
iml.append({
'type': 'dest',
'name': name,
'amount': total or False,
'account_id': acc_id,
'amount_currency': diff_currency_p \
and total_currency or False,
'currency_id': diff_currency_p \
and inv.currency_id.id or False,
'ref': ref,
'partner_id':partner_id or False,
})
date = inv.date
inv.amount=total
line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x,date, context={})) ,iml)
an_journal_id=inv.journal_id.analytic_journal_id.id
journal_id = inv.journal_id.id
journal = self.pool.get('account.journal').browse(cr, uid, journal_id)
ref = inv.reference
journal = journal_pool.browse(cr, uid, inv.journal_id.id)
if journal.sequence_id:
name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id)
name = sequence_pool.get_id(cr, uid, journal.sequence_id.id)
move = {
'name': name,
'journal_id': journal_id,
'voucher_type':inv.type,
'narration' : inv.narration,
'data':date
'name' : name,
'journal_id': journal.id,
'type' : inv.type,
'narration' : inv.narration and inv.narration or inv.name,
'date':inv.date
}
if inv.period_id:
move['period_id'] = inv.period_id.id
for i in line:
i[2]['period_id'] = inv.period_id.id
move_id = self.pool.get('account.move').create(cr, uid, move)
ref=move['name']
amount=0.0
#create the first line our self
move.update({
'period_id': inv.period_id.id
})
move_id = move_pool.create(cr, uid, move)
#create the first line manually
move_line = {
'name': inv.name,
'voucher_invoice' : iml and iml[0]['invoice'] and iml[0]['invoice'].id or False,
'debit': False,
'credit':False,
'account_id': inv.account_id.id or False,
'move_id':move_id ,
'journal_id':journal_id ,
'period_id':inv.period_id.id,
'move_id': move_id ,
'journal_id': inv.journal_id.id,
'period_id': inv.period_id.id,
'partner_id': False,
'ref': ref,
'date': date
'date': inv.date
}
if diff_currency_p:
amount_currency = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.amount)
inv.amount = amount_currency
move_line.update({
'amount_currency':amount_currency,
'currency_id':inv.currency_id.id
})
if inv.type in ('rec_voucher', 'bank_rec_voucher', 'journal_pur_voucher', 'journal_voucher'):
move_line['debit'] = inv.amount
else:
move_line['credit'] = inv.amount * (-1)
self.pool.get('account.move.line').create(cr, uid, move_line)
id_mapping_dict = {}
mline_ids = []
for line in inv.voucher_line_ids:
move_line['credit'] = inv.amount
line_ids = []
line_ids += [move_line_pool.create(cr, uid, move_line)]
for line in inv.payment_ids:
amount=0.0
move_line = {
'name':line.name,
'voucher_invoice' : iml and iml[0]['invoice'] and iml[0]['invoice'].id or False,
'debit':False,
'credit':False,
'move_id':move_id,
'account_id':line.account_id.id or False,
'journal_id':journal_id ,
'period_id':inv.period_id.id,
'partner_id':line.partner_id.id or False,
'ref':ref,
'date':date
}
if line.type == 'dr':
move_line['debit'] = line.amount or False
amount=line.amount
elif line.type == 'cr':
move_line['credit'] = line.amount or False
amount=line.amount * (-1)
ml_id=self.pool.get('account.move.line').create(cr, uid, move_line)
id_mapping_dict[line.id] = ml_id
total = 0.0
mline = self.pool.get('account.move.line')
if line.invoice_id.id:
invoice = self.pool.get('account.invoice').browse(cr, uid, line.invoice_id.id)
src_account_id = invoice.account_id.id
cr.execute('select id from account_move_line where move_id in ('+str(invoice.move_id.id)+')')
temp_ids = map(lambda x: x[0], cr.fetchall())
temp_ids.append(ml_id)
mlines = mline.browse(cr, uid, temp_ids)
for ml in mlines:
if ml.account_id.id==src_account_id:
mline_ids.append(ml.id)
total += (ml.debit or 0.0) - (ml.credit or 0.0)
#end if line.invoice_id.id:
if inv.narration:
line.name=inv.narration
else:
line.name=line.name
'name': line.name,
'debit': False,
'credit': False,
'account_id': line.account_id.id or False,
'move_id': move_id ,
'journal_id': inv.journal_id.id,
'period_id': inv.period_id.id,
'partner_id': line.partner_id.id or False,
'ref': ref,
'date': inv.date,
'analytic_account_id': False
}
if diff_currency_p:
amount_currency = currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, line.amount)
line.amount = amount_currency
move_line.update({
'amount_currency':amount_currency,
'currency_id':inv.currency_id.id
})
if line.account_analytic_id:
an_line = {
'name':line.name,
'date':date,
'amount':amount,
'account_id':line.account_analytic_id.id or False,
'move_id':ml_id,
'journal_id':an_journal_id ,
'general_account_id':line.account_id.id,
'ref':ref
}
self.pool.get('account.analytic.line').create(cr, uid, an_line)
if mline_ids:
self.pool.get('account.move.line').reconcile_partial(cr, uid, mline_ids, 'manual', context={})
self.write(cr, uid, [inv.id], {'move_id': move_id})
obj=self.pool.get('account.move').browse(cr, uid, move_id)
for line in obj.line_id :
cr.execute('insert into voucher_id (account_id,rel_account_move) values (%d, %d)',(int(ids[0]),int(line.id)))
return True
move_line.update({
'analytic_account_id':line.account_analytic_id.id
})
if line.type == 'dr':
move_line.update({
'debit': line.amount or False
})
amount = line.amount
elif line.type == 'cr':
move_line.update({
'credit': line.amount or False
})
amount = line.amount
if line.invoice_id:
move_line.update({
'invoice_id':line.invoice_id.id
})
invoice_pool.pay_and_reconcile(cr, uid, [line.invoice_id.id], amount, inv.account_id.id, inv.period_id.id, inv.journal_id.id, False, False, False)
move_line_id = move_line_pool.create(cr, uid, move_line)
line_ids += [move_line_id]
rec = {
'move_id': move_id,
'move_ids':[(6, 0,line_ids)]
}
self.write(cr, uid, [inv.id], rec)
return True
account_voucher()
@ -222,18 +179,30 @@ class account_voucher_line(osv.osv):
res['invoice'] = line.invoice_id or False
return res
def onchange_invoice_id(self, cr, uid, ids, invoice_id, context={}):
lines = []
if 'lines' in self.voucher_context:
lines = [x[2] for x in self.voucher_context['lines']]
def onchange_invoice_id(self, cr, uid, ids, invoice_id, currency_id):
currency_pool = self.pool.get('res.currency')
invoice_pool = self.pool.get('account.invoice')
res = {
'amount':0.0
}
if not invoice_id:
return {'value':{}}
return {
'value':res
}
else:
invoice_obj = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context)
residual = invoice_obj.residual
same_invoice_amounts = [x['amount'] for x in lines if x['invoice_id']==invoice_id]
residual -= sum(same_invoice_amounts)
return {'value' : {'amount':residual}}
invoice = invoice_pool.browse(cr, uid, invoice_id)
residual = invoice.residual
if invoice.currency_id.id != currency_id:
residual = currency_pool.compute(cr, uid, invoice.currency_id.id, currency_id, invoice.residual)
res.update({
'amount': residual,
'account_id': invoice.account_id.id
})
return {
'value':res
}
def onchange_line_account(self, cr, uid, ids, account_id, type, type1):
if not account_id:
@ -263,21 +232,4 @@ class account_voucher_line(osv.osv):
}
account_voucher_line()
class account_invoice(osv.osv):
_inherit = "account.invoice"
def action_cancel(self, cr, uid, ids, *args):
res = super(account_invoice, self).action_cancel(cr, uid, ids, *args)
invoices = self.read(cr, uid, ids, ['move_id'])
voucher_db = self.pool.get('account.voucher')
voucher_ids = voucher_db.search(cr, uid, [])
voucher_obj = voucher_db.browse(cr, uid, voucher_ids)
move_db = self.pool.get('account.move')
move_ids = move_db.search(cr, uid, [])
move_obj = move_db.browse(cr, uid, move_ids)
return res
account_invoice()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,21 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--
Voucher line extension
-->
<record id="view_voucher_form" model="ir.ui.view">
<field name="name">account.voucher.line.form.inherit</field>
<field name="model">account.voucher.line</field>
<field name="type">form</field>
<field name="inherit_id" ref="account_voucher.view_voucher_form"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="invoice_id" on_change="onchange_invoice_id(invoice_id)" domain="[('partner_id','=',partner_id),('state','=','open')]"/>
</field>
</field>
</record>
<record id="view_voucher_form" model="ir.ui.view">
<field name="name">account.voucher.form.inherit</field>
<field name="model">account.voucher</field>
@ -23,15 +8,15 @@
<field name="inherit_id" ref="account_voucher.view_voucher_form"/>
<field name="arch" type="xml">
<field name="payment_ids" position="replace">
<field name="voucher_line_ids" default_get="{'lines': voucher_line_ids }" colspan="4" nolabel="1" height="275">
<field name="voucher_line_ids" default_get="{'lines': voucher_line_ids}" colspan="4" nolabel="1" height="275">
<tree string="Voucher Lines" editable="top">
<field name="account_analytic_id"/>
<field name="partner_id" on_change="onchange_partner(partner_id, type, parent.type)"/>
<field name="account_id" on_change="onchange_line_account(account_id, type, parent.type)"/>
<field name="name"/>
<field name="invoice_id" on_change="onchange_invoice_id(invoice_id)" domain="[('partner_id','=',partner_id),('state','=','open'),('residual','&gt;',0.0)]"/>
<field name="invoice_id" on_change="onchange_invoice_id(invoice_id, parent.currency_id)" domain="[('partner_id','=',partner_id),('state','=','open'),('residual','&gt;',0.0)]"/>
<field name="type"/>
<field name="amount"/>
<field name="account_analytic_id"/>
<field name="ref"/>
</tree>
</field>

View File

@ -18,29 +18,45 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
import netsvc
from osv import osv
from osv import fields
class account_voucher_unreconcile(osv.osv_memory):
_name = "account.voucher.unreconcile"
_description = "Account voucher unreconcile"
_columns = {
'remove':fields.boolean('Want to remove accounting entries too ?', required=False),
}
_defaults = {
'remove': lambda *a: True,
}
def trans_unrec(self, cr, uid, ids, context=None):
res = self.browse(cr, uid, ids[0])
if context is None:
context = {}
obj_voucher = self.pool.get('account.voucher')
obj_reconcile = self.pool.get('account.move.reconcile')
voucher_pool = self.pool.get('account.voucher')
reconcile_pool = self.pool.get('account.move.reconcile')
if context.get('active_id'):
voucher = obj_voucher.browse(cr, uid, context.get('active_id'), context=context)
voucher = voucher_pool.browse(cr, uid, context.get('active_id'), context)
recs = []
for line in voucher.move_ids:
if line.reconcile_id:
recs = [line.reconcile_id.id]
for rec in recs:
obj_reconcile.unlink(cr, uid, rec)
if res.remove:
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', context.get('active_id'), 'cancel_voucher', cr)
return {}
account_voucher_unreconcile()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -2,28 +2,38 @@
<openerp>
<data>
<record id="view_account_voucher_unreconcile" model="ir.ui.view">
<record id="view_account_voucher_unreconcile" model="ir.ui.view">
<field name="name">Account voucher unreconcile</field>
<field name="model">account.voucher.unreconcile</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Unreconciliation">
<separator colspan="4" string="Unreconciliation transactions" />
<label string="If you unreconciliate transactions, you must also verify all the actions that are linked to those transactions because they will not be disable" colspan="2"/>
<separator colspan="4"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="trans_unrec" default_focus="1" string="Unreconcile" type="object" icon="gtk-ok"/>
<separator colspan="4" string="Unreconciliation transactions" />
<label string="If you unreconciliate transactions, you must also verify all the actions that are linked to those transactions because they will not be disable" colspan="2"/>
<separator colspan="4"/>
<field name="remove"/>
<separator colspan="4"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="trans_unrec" default_focus="1" string="Unreconcile" type="object" icon="gtk-ok"/>
</form>
</field>
</record>
<act_window name="Unreconcile entries"
res_model="account.voucher.unreconcile"
src_model="account.voucher"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_view_account_voucher_unreconcile"/>
</record>
<record model="ir.actions.act_window" id="action_view_account_voucher_unreconcile">
<field name="name">Unreconcile entries</field>
<field name="res_model">account.voucher.unreconcile</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_account_voucher_unreconcile"/>
<field name="target">new</field>
</record>
<!-- <act_window name="Unreconcile entries" -->
<!-- res_model="account.voucher.unreconcile"-->
<!-- src_model="account.voucher"-->
<!-- view_mode="form"-->
<!-- target="new" -->
<!-- key2="client_action_multi" -->
<!-- id="action_view_account_voucher_unreconcile"/>-->
</data>
</openerp>
</openerp>

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2008-10-30 04:07+0000\n"
"Last-Translator: Sergei Kostigoff <sergei.kostigoff@gmail.com>\n"
"PO-Revision-Date: 2010-07-07 22:35+0000\n"
"Last-Translator: Pomazan Bogdan <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 03:55+0000\n"
"X-Launchpad-Export-Date: 2010-07-08 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_iban
@ -55,7 +55,7 @@ msgstr ""
#. module: base_iban
#: model:res.partner.bank.type,name:base_iban.bank_iban
msgid "IBAN Account"
msgstr ""
msgstr "IBAN Аккаунт"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_acc_number_field

View File

@ -38,7 +38,6 @@ the "Dashboard" menu.
'update_xml': [
'security/ir.model.access.csv',
'wizard/report_menu_create_view.xml',
'wizard/report_open_view.xml',
'base_report_creator_wizard.xml',
'base_report_creator_view.xml'
],

View File

@ -98,7 +98,7 @@ class report_creator(osv.osv):
if context is None:
context = {}
data = context and context.get('report_id', False) or False
data = context and context.get('report_id', False) or False
if (not context) or 'report_id' not in context:
return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
report = self.browse(cr, user, data)
@ -114,7 +114,7 @@ class report_creator(osv.osv):
else:
fields['column_count'] = {'readonly': True, 'type': 'integer', 'string': 'Count', 'size': 64, 'name': 'column_count'}
arch = '<?xml version="1.0" encoding="utf-8"?>\n'
arch = '<?xml version="1.0"?>'
if view_type == 'graph':
orientation_eval = {'horz':'horizontal','vert' :'vertical'}
orientation = eval(report.view_graph_orientation,orientation_eval)
@ -163,14 +163,14 @@ class report_creator(osv.osv):
arch += '''>'''
arch += ''.join(temp_list)
else:
arch += '<%s string="%s">\n' % (view_type, report.name)
arch += '<%s string="%s">' % (view_type, report.name)
i = 0
for f in report.field_ids:
if f.field_id.model:
arch += '<field name="%s" select="1"/>' % ('field' + str(i),)
arch += '<field name="%s"/>' % ('field' + str(i),)
i += 1
else:
arch += '<field name="%s" select="1"/>' % ('column_count',)
arch += '<field name="%s"/>' % ('column_count',)
arch += '</%s>' % (view_type,)
result = {
'arch': arch,
@ -181,7 +181,6 @@ class report_creator(osv.osv):
'action': [],
'relate': []
}
return result
def read(self, cr, user, ids, fields = None, context = None, load = '_classic_read'):
@ -406,55 +405,85 @@ class report_creator(osv.osv):
return result
_columns = {
'name': fields.char('Report Name', size=64, required=True),
'name': fields.char('Report Name', size=64, required=True),
'type': fields.selection([('list', 'Rows And Columns Report'), ], 'Report Type', required=True), #('sum','Summation Report')
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the report without removing it."),
'view_type1': fields.selection([('form', 'Form'),
('tree', 'Tree'),
('graph', 'Graph'),
('calendar', 'Calendar')], 'First View', required=True),
'view_type2': fields.selection([('', '/'),
('form', 'Form'),
('tree', 'Tree'),
('graph', 'Graph'),
('calendar', 'Calendar')], 'Second View'),
'view_type3': fields.selection([('', '/'),
('form', 'Form'),
('tree', 'Tree'),
('graph', 'Graph'),
('calendar', 'Calendar')], 'Third View'),
'view_graph_type': fields.selection([('pie', 'Pie Chart'),
('bar', 'Bar Chart')], 'Graph Type', required=True),
'view_graph_orientation': fields.selection([('horz', 'Horizontal'),
('vert', 'Vertical')], 'Graph Orientation', required=True),
'model_ids': fields.many2many('ir.model', 'base_report_creator_report_model_rel', 'report_id', 'model_id', 'Reported Objects'),
'field_ids': fields.one2many('base_report_creator.report.fields', 'report_id', 'Fields to Display'),
'filter_ids': fields.one2many('base_report_creator.report.filter', 'report_id', 'Filters'),
'state': fields.selection([
('draft', 'Draft'),
('valid', 'Valid')],
'State', required=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed custom report. \
\n* The \'Valid\' state is used when user validates the custom report.'),
'sql_query': fields.function(_sql_query_get, method=True, type="text", string='SQL Query', store=True),
'group_ids': fields.many2many('res.groups', 'base_report_creator_group_rel', 'report_id', 'group_id', 'Authorized Groups'),
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the report without removing it."),
'view_type1': fields.selection([('form', 'Form'),
('tree', 'Tree'),
('graph', 'Graph'),
('calendar', 'Calendar')], 'First View', required=True),
'view_type2': fields.selection([('', '/'),
('form', 'Form'),
('tree', 'Tree'),
('graph', 'Graph'),
('calendar', 'Calendar')], 'Second View'),
'view_type3': fields.selection([('', '/'),
('form', 'Form'),
('tree', 'Tree'),
('graph', 'Graph'),
('calendar', 'Calendar')], 'Third View'),
'view_graph_type': fields.selection([('pie', 'Pie Chart'),
('bar', 'Bar Chart')], 'Graph Type', required=True),
'view_graph_orientation': fields.selection([('horz', 'Horizontal'),
('vert', 'Vertical')], 'Graph Orientation', required=True),
'model_ids': fields.many2many('ir.model', 'base_report_creator_report_model_rel', 'report_id', 'model_id', 'Reported Objects'),
'field_ids': fields.one2many('base_report_creator.report.fields', 'report_id', 'Fields to Display'),
'filter_ids': fields.one2many('base_report_creator.report.filter', 'report_id', 'Filters'),
'sql_query': fields.function(_sql_query_get, method=True, type="text", string='SQL Query', store=True),
'group_ids': fields.many2many('res.groups', 'base_report_creator_group_rel', 'report_id', 'group_id', 'Authorized Groups'),
'menu_id': fields.many2one('ir.ui.menu', "Menu", readonly=True),
}
_defaults = {
'type': lambda *args: 'list',
'state': lambda *args: 'draft',
'active': lambda *args: True,
'view_type1': lambda *args: 'tree',
'view_type2': lambda *args: 'graph',
'view_graph_type': lambda *args: 'bar',
'view_graph_orientation': lambda *args: 'horz',
'type': lambda *args: 'list',
'active': lambda *args: True,
'view_type1': lambda *args: 'tree',
'view_type2': lambda *args: 'graph',
'view_graph_type': lambda *args: 'bar',
'view_graph_orientation': lambda *args: 'horz',
}
def open_report(self, cr, uid, ids, context=None):
"""
This Function opens base creator report view
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of report open's IDs
@param context: A standard dictionary for contextual values
@return : Dictionary value for base creator report form
"""
if not context:
context = {}
rep = self.browse(cr, uid, ids, context=context)
if not rep:
return False
rep = rep[0]
view_mode = rep.view_type1
if rep.view_type2:
view_mode += ',' + rep.view_type2
if rep.view_type3:
view_mode += ',' + rep.view_type3
value = {
'name': rep.name,
'view_type': 'form',
'view_mode': view_mode,
'res_model': 'base_report_creator.report',
'type': 'ir.actions.act_window',
'context': "{'report_id':%d}" % (rep.id,),
'nodestroy': True,
}
return value
def _function_field(self, cr, uid, ids):
"""
constraints function which specify that
constraints function which specify that
not display field which are not stored in Database.
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of Report creator's id.
@param ids: List of Report creator's id.
@return: True if display field which are stored in database.
or false if display field which are not store in dtabase.
"""
@ -514,10 +543,11 @@ class report_creator(osv.osv):
return False
return True
_constraints = [
(_function_field, 'You can not display field which are not stored in Database.', ['field_ids']),
(_aggregation_error, 'You can apply aggregate function to the non calculated field.', ['field_ids']),
(_calander_view_error, "You must have to give calendar view's color,start date and delay.", ['field_ids']),
(_function_field, 'You can not display field which are not stored in Database.', ['field_ids']),
(_aggregation_error, 'You can apply aggregate function to the non calculated field.', ['field_ids']),
(_calander_view_error, "You must have to give calendar view's color,start date and delay.", ['field_ids']),
]
report_creator()
@ -531,25 +561,25 @@ class report_creator_field(osv.osv):
_rec_name = 'field_id'
_order = "sequence,id"
_columns = {
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of fields."),
'field_id': fields.many2one('ir.model.fields', 'Field'),
'report_id': fields.many2one('base_report_creator.report', 'Report', on_delete='cascade'),
'group_method': fields.selection([('group', 'Grouped'),
('sum', 'Sum'),
('min', 'Minimum'),
('count', 'Count'),
('max', 'Maximum'),
('avg', 'Average')], 'Grouping Method', required=True),
'graph_mode': fields.selection([('', '/'),
('x', 'X Axis'),
('y', 'Y Axis')], 'Graph Mode'),
'calendar_mode': fields.selection([('', '/'),
('date_start', 'Starting Date'),
('date_end', 'Ending Date'), ('date_delay', 'Delay'), ('date_stop', 'End Date'), ('color', 'Unique Colors')], 'Calendar Mode'),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of fields."),
'field_id': fields.many2one('ir.model.fields', 'Field'),
'report_id': fields.many2one('base_report_creator.report', 'Report', on_delete='cascade'),
'group_method': fields.selection([('group', 'Grouped'),
('sum', 'Sum'),
('min', 'Minimum'),
('count', 'Count'),
('max', 'Maximum'),
('avg', 'Average')], 'Grouping Method', required=True),
'graph_mode': fields.selection([('', '/'),
('x', 'X Axis'),
('y', 'Y Axis')], 'Graph Mode'),
'calendar_mode': fields.selection([('', '/'),
('date_start', 'Starting Date'),
('date_end', 'Ending Date'), ('date_delay', 'Delay'), ('date_stop', 'End Date'), ('color', 'Unique Colors')], 'Calendar Mode'),
}
_defaults = {
'group_method': lambda *args: 'group',
'graph_mode': lambda *args: '',
'group_method': lambda *args: 'group',
'graph_mode': lambda *args: '',
}
report_creator_field()
@ -561,14 +591,14 @@ class report_creator_filter(osv.osv):
_name = "base_report_creator.report.filter"
_description = "Report Filters"
_columns = {
'name': fields.char('Filter Name', size=64, required=True),
'expression': fields.text('Value', required=True, help='Provide an expression for the field based on which you want to filter the records.\n e.g. res_partner.id=3'),
'report_id': fields.many2one('base_report_creator.report', 'Report', on_delete='cascade'),
'condition': fields.selection([('and', 'AND'),
'name': fields.char('Filter Name', size=64, required=True),
'expression': fields.text('Value', required=True, help='Provide an expression for the field based on which you want to filter the records.\n e.g. res_partner.id=3'),
'report_id': fields.many2one('base_report_creator.report', 'Report', on_delete='cascade'),
'condition': fields.selection([('and', 'AND'),
('or', 'OR')], 'Condition')
}
_defaults = {
'condition': lambda *args: 'and',
'condition': lambda *args: 'and',
}
report_creator_filter()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -10,7 +10,6 @@
<field eval="&quot;tree&quot;" name="view_type1"/>
<field eval="&quot;list&quot;" name="type"/>
<field eval="&quot;horz&quot;" name="view_graph_orientation"/>
<field eval="&quot;valid&quot;" name="state"/>
</record>
<record id="base_report_creator_report_fields_0" model="base_report_creator.report.fields">
<field name="report_id" ref="base_report_creator_report_salesanalysis0"/>

View File

@ -23,7 +23,6 @@
<tree string="Report Creator">
<field name="name"/>
<field name="type"/>
<field name="state"/>
</tree>
</field>
</record>
@ -42,12 +41,21 @@
<notebook colspan="4">
<page string="General Configuration">
<field name="model_ids" colspan="4"
context="{'model_ids':model_ids}" />
<separator string="State" colspan="4"/>
<field name="state"/>
<button string="Create Menu"
name="%(action_report_menu_create)d" type="action"
colspan="2" icon="gtk-justify-fill" />
context="{'model_ids':model_ids}" nolabel="1" />
<separator string="" colspan="4"/>
<group colspan="4" col="4">
<group colspan="2">
<field name="menu_id"/>
</group>
<group colspan="2">
<button string="Create Menu"
name="%(action_report_menu_create)d" type="action"
icon="gtk-justify-fill" attrs="{'invisible':[('menu_id','!=',False)]}"/>
<button string="Open Report"
name="open_report" type="object"
icon="gtk-open" />
</group>
</group>
</page><page string="View parameters">
<separator string="Used View" colspan="4"/>
<field name="view_type1"/>
@ -112,6 +120,17 @@
</field>
</record>
<record id="view_report_filter" model="ir.ui.view">
<field name="name">Report Name</field>
<field name="model">base_report_creator.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Report">
<field name="name"></field>
</search>
</field>
</record>
<!-- Action for Report creator form -->
<record model="ir.actions.act_window" id="base_report_creator_action">
@ -119,6 +138,7 @@
<field name="res_model">base_report_creator.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_report_filter"/>
</record>
<menuitem
@ -152,11 +172,5 @@
id="menu_base_report_creator_action"
action="base_report_creator_action_tree"/>
<act_window id="action_report_open"
key2="client_action_multi" name="Open Report"
res_model="report.open" src_model="base_report_creator.report"
view_mode="form" target="new" view_type="form" />
</data>
</openerp>

View File

@ -3,6 +3,5 @@
<data>
<wizard id="wizard_set_filter_fields" string="Set Filter Fields"
name="base_report_creator.report_filter.fields" />
</data>
</openerp>

View File

@ -21,6 +21,5 @@
import wiz_set_filter_fields
import report_menu_create
import report_open
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,64 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
import time
import pooler
from osv import osv
from tools.translate import _
class report_creator_open(wizard.interface):
def _open_report(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
if context.get('report_id',False):
raise wizard.except_wizard(_('UserError'),_('No Wizards available for this object!'))
rep = pool.get('base_report_creator.report').browse(cr, uid, data['id'], context)
view_mode = rep.view_type1
if rep.view_type2:
view_mode += ','+rep.view_type2
if rep.view_type3:
view_mode += ','+rep.view_type3
value = {
'name': rep.name,
'view_type': 'form',
'view_mode': view_mode,
'res_model': 'base_report_creator.report',
'context': {'report_id': data['id']},
'view_id': False,
'type': 'ir.actions.act_window'
}
return value
states = {
'init' : {
'actions' : [],
'result' : {'type':'action', 'action':_open_report, 'state':'end'}
}
}
report_creator_open('base_report_creator.report.open')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -43,31 +43,41 @@ class report_menu_create(osv.osv_memory):
if not context:
context = {}
context_id = context and context.get('active_id', False) or False
obj_menu = self.pool.get('ir.ui.menu')
data_obj = self.pool.get('ir.model.data')
obj_board = self.pool.get('base_report_creator.report')
if context_id:
board = self.pool.get('base_report_creator.report').browse(cr, uid, context_id)
data = self.browse(cr, uid, ids, context=context)
if not data:
return {}
data = data[0]
board = obj_board.browse(cr, uid, context_id)
view = board.view_type1
if board.view_type2:
view += ',' + board.view_type2
if board.view_type3:
view += ',' + board.view_type3
result = data_obj._get_id(cr, uid, 'base_report_creator', 'view_report_filter')
res = data_obj.read(cr, uid, result, ['res_id'])
action_id = self.pool.get('ir.actions.act_window').create(cr, uid, {
'name': board.name,
'view_type':'form',
'view_mode':view,
'context': "{'report_id':%d}" % (board.id,),
'res_model': 'base_report_creator.report'
})
obj_menu = self.pool.get('ir.ui.menu')
#start Loop
for data in self.read(cr, uid, ids):
obj_menu.create(cr, uid, {
'name': data.get('menu_name'),
'parent_id': data.get('menu_parent_id'),
'res_model': 'base_report_creator.report',
'search_view_id': res['res_id']
})
menu_id = obj_menu.create(cr, uid, {
'name': data.menu_name,
'parent_id': data.menu_parent_id.id,
'icon': 'STOCK_SELECT_COLOR',
'action': 'ir.actions.act_window, ' + str(action_id)
}, context=context)
return {}
#End Loop
obj_board.write(cr, uid, context_id, {'menu_id': menu_id})
return {}
report_menu_create()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,71 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
class report_open(osv.osv_memory):
"""
Open report
"""
_name = "report.open"
_description = __doc__
def open_report(self, cr, uid, ids, context=None):
"""
This Function opens base creator report view
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of report open's IDs
@param context: A standard dictionary for contextual values
@return : Dictionary value for base creator report form
"""
if not context:
context = {}
context_id = context and context.get('active_id', False) or False
if context.get('report_id', False):
raise osv.except_osv(_('UserError'), _('No Wizards available for this object!'))
rep = self.pool.get('base_report_creator.report').browse(cr, uid, context_id, context)
view_mode = rep.view_type1
if rep.view_type2:
view_mode += ',' + rep.view_type2
if rep.view_type3:
view_mode += ',' + rep.view_type3
value = {
'name': rep.name,
'view_type': 'form',
'view_mode': view_mode,
'res_model': 'base_report_creator.report',
'context': {'report_id': context_id},
'view_id': False,
'type': 'ir.actions.act_window'
}
return value
report_open()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Report Open wizard -->
<record id="view_report_open" model="ir.ui.view">
<field name="name">report.open.form</field>
<field name="model">report.open</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Report open">
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel"
string="Cancel" />
<button icon="gtk-open" string="Open Report"
name="open_report" type="object" />
</group>
</form>
</field>
</record>
<record id="action_report_open" model="ir.actions.act_window">
<field name="name">Open Report</field>
<field name="res_model">report.open</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_report_open"/>
<field name="target">new</field>
</record>
</data>
</openerp>

View File

@ -67,7 +67,7 @@
<record id="base_setup_company_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_setup_company"/>
<field name="sequence">1</field>
<field name="sequence">3</field>
<field name="restart">onskip</field>
</record>
</data>

View File

@ -10,50 +10,50 @@
<form position="attributes">
<attribute name="string">Contact Information</attribute>
</form>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">To receive more information, please fill in the form about you and your company. Documentation and/or information will be sent to you as soon as possible.</attribute>
</xpath>
<xpath expr='//separator[@string="title"]' position='attributes'>
<attribute name='string'>Would you like more information or documentation ?</attribute>
<attribute name='colspan'>4</attribute>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='rowspan'>22</attribute>
<attribute name='string'></attribute>
</xpath>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">To receive more information, please fill in the form about you and your company. Documentation and/or information will be sent to you as soon as possible.</attribute>
</xpath>
<xpath expr='//separator[@string="title"]' position='attributes'>
<attribute name='string'>Would you like more information or documentation ?</attribute>
<attribute name='colspan'>4</attribute>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='rowspan'>22</attribute>
<attribute name='string'></attribute>
</xpath>
<group string="res_config_contents" position="replace">
<group colspan="4" height="450" width="600">
<group colspan="4">
<field name="ebook" nolabel="1"/>
<label align="0.0" string="I want to receive the Open ERP ebook (PDF) by email." colspan="3"/>
<field name="updates" nolabel="1"/>
<label align="0.0" string="Yes, I would like to receive information updates from OpenERP." colspan="3"/>
</group>
<group colspan="4" attrs="{'invisible':[('ebook','=',False),('updates','=',False)]}">
<separator colspan="4" string="About You"/>
<field name="name" colspan="2" attrs="{'required':[('ebook','=',True),('updates','=',True)]}"/>
<field name="job" colspan="2"/>
<field name="email" colspan="2" attrs="{'required':[('ebook','=',True),('updates','=',True)]}"/>
<field name="phone" colspan="2" attrs="{'required':[('ebook','=',True),('updates','=',True)]}"/>
<field name="total_employees" colspan="2"/>
<field name="industry" colspan="2"/>
</group>
<group colspan="4" attrs="{'invisible':[('ebook','=',False),('updates','=',False)]}">
<separator string="Your projects with OpenERP" colspan="4"/>
<field name="use_openerp" align="0.0" colspan="1"/>
<field name="already_using_openerp" align="0.0" colspan="1"/>
<field name="sell_openerp" align="0.0" colspan="1"/>
<field name="already_selling__openerp" align="0.0" colspan="1"/>
<separator colspan="4" string="You would like to know more about"/>
<field name="features" align="0.0" colspan="1"/>
<field name="training" align="0.0" colspan="1"/>
<field name="saas" align="0.0" colspan="1"/>
<field name="support" align="0.0" colspan="1"/>
<field name="partners_program" align="0.0" colspan="1"/>
<field name="other" align="0.0" colspan="1"/>
</group>
</group>
</group>
<group colspan="4" height="450" width="600">
<group colspan="4">
<field name="ebook" nolabel="1"/>
<label align="0.0" string="I want to receive the Open ERP ebook (PDF) by email." colspan="3"/>
<field name="updates" nolabel="1"/>
<label align="0.0" string="Yes, I would like to receive information updates from OpenERP." colspan="3"/>
</group>
<group colspan="4" attrs="{'invisible':[('ebook','=',False),('updates','=',False)]}">
<separator colspan="4" string="About You"/>
<field name="name" colspan="2" attrs="{'required':[('ebook','=',True),('updates','=',True)]}"/>
<field name="job" colspan="2"/>
<field name="email" colspan="2" attrs="{'required':[('ebook','=',True),('updates','=',True)]}"/>
<field name="phone" colspan="2" attrs="{'required':[('ebook','=',True),('updates','=',True)]}"/>
<field name="total_employees" colspan="2"/>
<field name="industry" colspan="2"/>
</group>
<group colspan="4" attrs="{'invisible':[('ebook','=',False),('updates','=',False)]}">
<separator string="Your projects with OpenERP" colspan="4"/>
<field name="use_openerp" align="0.0" colspan="1"/>
<field name="already_using_openerp" align="0.0" colspan="1"/>
<field name="sell_openerp" align="0.0" colspan="1"/>
<field name="already_selling__openerp" align="0.0" colspan="1"/>
<separator colspan="4" string="You would like to know more about"/>
<field name="features" align="0.0" colspan="1"/>
<field name="training" align="0.0" colspan="1"/>
<field name="saas" align="0.0" colspan="1"/>
<field name="support" align="0.0" colspan="1"/>
<field name="partners_program" align="0.0" colspan="1"/>
<field name="other" align="0.0" colspan="1"/>
</group>
</group>
</group>
</data>
</field>
</record>
@ -70,7 +70,7 @@
<record id="base_setup_contact_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_contact"/>
<field name="sequence">1</field>
<field name="sequence">5</field>
<field name="restart">never</field>
</record>
</data>

View File

@ -18,5 +18,6 @@
#
##############################################################################
import claim_delivery
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -21,7 +21,7 @@
"name" : "Claim from delivery",
"version" : "1.0",
"author" : "Tiny",
"category" : "Enterprise Specific Modules/Food Industries",
"category" : "Generic Modules/Inventory Control",
"depends" : ["base", "crm_claim", "stock"],
"init_xml" : [],
"demo_xml" : [],
@ -31,5 +31,6 @@
"active": False,
"installable": True
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -24,6 +24,10 @@ from osv import fields, osv
class stock_picking(osv.osv):
_inherit = "stock.picking"
_columns = {
'partner_id': fields.related('address_id','partner_id',type='many2one', relation="res.partner", string="Partner"),
'partner_id': fields.related('address_id', 'partner_id', type='many2one', relation="res.partner", string="Partner"),
}
stock_picking()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -14,19 +14,11 @@
</field>
</record>
<act_window
id="action_claim_from_delivery"
name="Claim"
domain="[]"
target="current"
view_mode="form"
res_model="crm.claim"
src_model="stock.picking"/>
<record id="action_claim_from_delivery" model="ir.actions.act_window">
<field name="context">{'default_partner_address_id': address_id, 'default_partner_id': partner_id}</field>
</record>
<act_window id="action_claim_from_delivery" name="Claim"
domain="[]" target="current"
context="{'default_partner_address_id': address_id, 'default_partner_id': partner_id}"
view_mode="form" res_model="crm.claim"
src_model="stock.picking" />
</data>
</openerp>

View File

@ -168,6 +168,9 @@ and users"),
"""
res = super(crm_lead, self).case_open(cr, uid, ids, *args)
self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
for (id, name) in self.name_get(cr, uid, ids):
message = _('Lead ') + " '" + name + "' "+ _("is Open.")
self.log(cr, uid, id, message)
return res
def case_close(self, cr, uid, ids, *args):
@ -180,6 +183,9 @@ and users"),
"""
res = super(crm_lead, self).case_close(cr, uid, ids, args)
self.write(cr, uid, ids, {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
for (id, name) in self.name_get(cr, uid, ids):
message = _('Lead ') + " '" + name + "' "+ _("is Closed.")
self.log(cr, uid, id, message)
return res
def convert_opportunity(self, cr, uid, ids, context=None):
@ -276,7 +282,10 @@ and users"),
vals.update(res)
res = self.create(cr, uid, vals, context)
message = _('A Lead created') + " '" + subject + "' " + _("from Mailgate.")
self.log(cr, uid, res, message)
attachents = msg.get('attachments', [])
for attactment in attachents or []:
data_attach = {

View File

@ -43,16 +43,15 @@
<group colspan="4" col="7">
<field name="name" required="1" string="Name"/>
<field name="priority"/>
<field name="date_deadline"/>
<button
name="convert_opportunity"
string="Convert to Opportunity"
help="Convert to Opportunity"
icon="gtk-index"
colspan="2"
type="object"/>
<newline />
<field name="section_id" colspan="1"
widget="selection" />
<field name="section_id" widget="selection" />
<field name="user_id" />
<field name="stage_id" widget="selection"
domain="[('object_id.model', '=', 'crm.lead')]" />

View File

@ -65,6 +65,9 @@ class crm_opportunity(osv.osv):
"""
res = super(crm_opportunity, self).case_close(cr, uid, ids, args)
self.write(cr, uid, ids, {'probability' : 100.0, 'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
for (id, name) in self.name_get(cr, uid, ids):
message = _('Opportunity ') + " '" + name + "' "+ _("is Won.")
self.log(cr, uid, id, message)
return res
def case_cancel(self, cr, uid, ids, *args):
@ -77,6 +80,9 @@ class crm_opportunity(osv.osv):
"""
res = super(crm_opportunity, self).case_cancel(cr, uid, ids, args)
self.write(cr, uid, ids, {'probability' : 0.0})
for (id, name) in self.name_get(cr, uid, ids):
message = _('Opportunity ') + " '" + name + "' "+ _("is Lost.")
self.log(cr, uid, id, message)
return res
def case_open(self, cr, uid, ids, *args):

View File

@ -200,7 +200,7 @@
<field name="model">crm.lead</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Opportunities" colors="blue:state=='pending';grey:state in ('cancel', 'done');red:date_deadline &lt; current_date">
<tree string="Opportunities" colors="blue:state=='pending';grey:state in ('cancel', 'done');red:date_deadline and (date_deadline &lt; current_date)">
<field name="date_deadline" invisible="1"/>
<field name="create_date"/>
<field name="name" string="Opportunity"/>

View File

@ -51,7 +51,7 @@ class crm_lead_report(osv.osv):
for case in self.browse(cr, uid, ids, context):
if field_name != 'avg_answers':
state = field_name[5:]
cr.execute("select count(id) from crm_opportunity where \
cr.execute("select count(id) from crm_lead where \
section_id =%s and state='%s'"%(case.section_id.id, state))
state_cases = cr.fetchone()[0]
perc_state = (state_cases / float(case.nbr)) * 100
@ -146,7 +146,7 @@ class crm_lead_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
(SELECT count(id) FROM mailgate_message WHERE model='crm.lead' AND res_id=c.id) AS email,
(SELECT count(id) FROM mailgate_message WHERE model='crm.lead' AND res_id=c.id AND history=True) AS email,
date_trunc('day',c.create_date) as create_date,
extract('epoch' from (c.date_closed-c.create_date))/(3600*24) as delay_close,
extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24) as delay_expected,

View File

@ -41,12 +41,25 @@
<field name="arch" type="xml">
<graph orientation="vertical" string="Leads Analysis" type="bar">
<field name="stage_id"/>
<field name="planned_revenue" operator="+"/>
<field name="nbr" operator="+"/>
<field group="True" name="user_id"/>
</graph>
</field>
</record>
<record id="view_report_crm_opportunity_graph" model="ir.ui.view">
<field name="name">crm.opportunity.report.graph</field>
<field name="model">crm.lead.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph orientation="vertical" string="Leads Analysis" type="bar">
<field name="stage_id"/>
<field name="planned_revenue" operator="+"/>
<field group="True" name="user_id"/>
</graph>
</field>
</record>
<!-- Leads by user and section Search View -->
<record id="view_report_crm_lead_filter" model="ir.ui.view">
@ -56,15 +69,6 @@
<field name="arch" type="xml">
<search string="Leads Analysis">
<group col="20" colspan="8">
<filter icon="terp-check"
string="Opportunities"
name="opportunity"
domain="[('type','=','opportunity')]"/>
<filter icon="terp-check"
string="Leads"
name="lead"
domain="[('type','=','lead')]"/>
<separator orientation="vertical" />
<filter string="Last 365 Days" icon="terp-go-year"
domain="[('create_date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
<filter string="Last 30 Days" icon="terp-go-month" name="this_month"
@ -74,7 +78,7 @@
<separator orientation="vertical" />
<filter icon="terp-check"
string="Current"
domain="[('state','in',('draft','open')]"/>
domain="[('state','in',('draft','open'))]"/>
<filter icon="terp-check"
string="Pending"
domain="[('state','=','pending')]"/>
@ -149,7 +153,7 @@
<field name="model">crm.lead.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Leads Analysis">
<tree string="Opportunities Analysis">
<field name="name" invisible="1"/>
<field name="month" invisible="1"/>
<field name="section_id" invisible="1" groups="base.group_extended"/>
@ -181,7 +185,7 @@
<field name="view_type">form</field>
<field name="context">{'search_default_lead':1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[]</field>
<field name="domain">[('type', '=', 'lead')]</field>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_lead_tree">
@ -204,7 +208,7 @@
<field name="view_type">form</field>
<field name="context">{"search_default_opportunity": 1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[]</field>
<field name="domain">[('type', '=', 'opportunity')]</field>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_opportunity_tree">
@ -217,7 +221,7 @@
<record model="ir.actions.act_window.view" id="action_report_crm_opportunity_graph">
<field name="sequence" eval="2"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_report_crm_lead_graph"/>
<field name="view_id" ref="view_report_crm_opportunity_graph"/>
<field name="act_window_id" ref="action_report_crm_opportunity"/>
</record>

View File

@ -53,7 +53,7 @@ class crm_phonecall_report(osv.osv):
for case in self.browse(cr, uid, ids, context):
if field_name != 'avg_answers':
state = field_name[5:]
cr.execute("select count(*) from crm_opportunity where \
cr.execute("select count(*) from crm_lead where \
section_id =%s and state='%s'"%(case.section_id.id, state))
state_cases = cr.fetchone()[0]
perc_state = (state_cases / float(case.nbr)) * 100
@ -143,7 +143,6 @@ class crm_phonecall_report(osv.osv):
extract('epoch' from (c.date_open-c.create_date))/(3600*24) as delay_open
from
crm_phonecall c
where c.categ_id in (select res_id from ir_model_data where (name = 'categ_phone1' or name ='categ_phone2') and model = 'crm.case.categ')
)""")
crm_phonecall_report()

View File

@ -86,7 +86,8 @@ class crm_lead2opportunity(osv.osv_memory):
if lead.partner_id:
msg_ids = [ x.id for x in lead.message_ids]
self.pool.get('mailgate.message').write(cr, uid, msg_ids, {'partner_id': lead.partner_id.id}, context=context)
message = _('Lead ') + " '" + lead.name + "' "+ _("is converted to Opportunity.")
self.log(cr, uid, lead.id, message)
value = {
'name': _('Opportunity'),
'view_type': 'form',
@ -99,6 +100,7 @@ class crm_lead2opportunity(osv.osv_memory):
'type': 'ir.actions.act_window',
'search_view_id': res['res_id']
}
return value
_columns = {

View File

@ -103,7 +103,7 @@ class crm_send_new_email2(osv.osv_memory):
ref_id = hist.ref_id
case = model_pool.browse(cr, uid, res_id)
emails = [obj.email_to]
email_cc = (obj.email_cc or '').split(',')
email_cc = obj.email_cc and obj.email_cc.split(',') or ''
emails = filter(None, emails)
body = obj.text

View File

@ -76,7 +76,9 @@ class crm_helpdesk(osv.osv, crm.crm_case):
help='The state is set to \'Draft\', when a case is created.\
\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\'.'),
\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)]),
}
_defaults = {

View File

@ -10,18 +10,17 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Available Holidays">
<field name="employee_id"/>
<field name="category_id"/>
<field name="holiday_status_id"/>
<field name="employee_id" invisible="1"/>
<field name="category_id" invisible="1"/>
<field name="holiday_status_id" invisible="1"/>
<field name="department_id" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="year" invisible="1"/>
<field name="date" invisible="1"/>
<field name="max_leave" sum="Allocated Leaves"/>
<field name="taken_leaves" sum="Taken Leaves"/>
<field name="user_id" invisible="1"/>
<field name="remaining_leave" sum="Remaining Leaves"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="date" invisible="1"/>
</tree>
</field>
</record>
@ -48,11 +47,6 @@
<field name="arch" type="xml">
<search string="Leaves">
<group>
<filter icon="terp-personal" string="Employee" domain="[('category_id', '=', False)]"
help="Leaves by empolyee"/>
<filter icon="terp-stock_symbol-selection" string="Category"
domain="[('employee_id', '=', False)]" help="Leaves by category"/>
<separator orientation="vertical"/>
<filter icon="terp-go-year" string="This Year"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Leaves in this year"/>
@ -61,27 +55,26 @@
<filter icon="terp-go-week" string=" 7 Days " separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" help="Leaves during last 7 days"/>
<separator orientation="vertical"/>
<field name="employee_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-personal" string="My Leaves" domain="[('user_id','=',uid)]"/>
</field>
<field name="employee_id"/>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<field name="holiday_status_id" widget="selection"/>
<field name="department_id" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="10" col="12">
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'holiday_status_id'}"/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Department" icon="terp-personal+" context="{'group_by':'department_id'}"/>
<filter icon="terp-personal" string="Employee"
name="user" context="{'group_by':'employee_id'}"
help="Leaves by employee"/>
<separator orientation="vertical"/>
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'holiday_status_id'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<field name="holiday_status_id" widget="selection"/>
<field name="department_id" widget="selection"/>
</group>
</search>
</field>
</record>
@ -91,7 +84,7 @@
<field name="res_model">available.holidays.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_month':1,'search_default_User':1,'group_by':[], "search_default_user_id": uid}</field>
<field name="context">{'search_default_month':1,'search_default_user':1,'group_by':[], "search_default_user_id": uid, 'group_by_no_leaf':1}</field>
<field name="view_id" ref="view_hr_available_holidays_report_search"/>
</record>

View File

@ -9,8 +9,8 @@
<field name="arch" type="xml">
<tree string="Leaves Statistics">
<field name="date" invisible="1"/>
<field name="employee_id"/>
<field name="category_id"/>
<field name="employee_id" invisible="1"/>
<field name="category_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="date_from" invisible="1"/>
<field name="date_to" invisible="1"/>
@ -52,14 +52,13 @@
<filter icon="terp-go-week" string=" 7 Days " separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" help="Leaves during last 7 days"/>
<separator orientation="vertical"/>
<filter string="Current Leaves" icon="terp-gtk-media-pause" domain="[('state', 'in' ,('draft','confirm'))]"
help = "In progress Leaves"/>
<filter string="Future Leaves" icon="terp-gtk-media-pause" domain="[('state', 'in' ,('draft','confirm'))]"
help = "Draft and Confirmed leaves"/>
<filter string="Validated" icon="terp-camera_test" domain="[('state','=','validate')]"
help = "Pending Leaves"/>
<filter icon="terp-gtk-stop" string="Cancelled" domain="[('state','=','cancel')]"/>
<separator orientation="vertical"/>
<field name="department_id"/>
<separator orientation="vertical"/>
<field name="employee_id"/>
</group>
<newline/>
@ -77,7 +76,7 @@
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'date'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
<newline/>

View File

@ -522,7 +522,7 @@ class company_contribution(osv.osv):
'category_id':fields.many2one('hr.allounce.deduction.categoty', 'Heads', required=False),
'name':fields.char('Name', size=256, required=True, readonly=False),
'code':fields.char('Code', size=64, required=True, readonly=False),
'include_in_salary':fields.boolean('Included in Salary ?', help='If company contribute on this deduction then should company contribution is also deducted from Employee Salary'),
# 'include_in_salary':fields.boolean('Included in Salary ?', help='If company contribute on this deduction then should company contribution is also deducted from Employee Salary'),
'gratuity':fields.boolean('Use for Gratuity ?', required=False),
'line_ids':fields.one2many('company.contribution.line', 'contribution_id', 'Calculations', required=False),
'register_id':fields.property(
@ -537,19 +537,20 @@ class company_contribution(osv.osv):
),
'amount_type':fields.selection([
('fix','Fixed Amount'),
('per','Percentage'),
('func','Function Calculation'),
],'Amount Type', select=True),
'contribute_per':fields.float('Contribution', digits=(16, 4), help='Define Company contribution ratio 1.00=100% contribution, If Employee Contribute 5% then company will and here 0.50 defined then company will contribute 50% on employee 5% contribution'),
'account_id':fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Account",
method=True,
view_load=True,
help="Expanse account where company expanse will be encoded",
required=False
),
# 'account_id':fields.property(
# 'account.account',
# type='many2one',
# relation='account.account',
# string="Account",
# method=True,
# view_load=True,
# help="Expanse account where company expanse will be encoded",
# required=False
# ),
'company_id':fields.many2one('res.company', 'Company', required=False),
'active':fields.boolean('Active', required=False),
'note': fields.text('Description'),

View File

@ -644,8 +644,6 @@
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="category_id"/>
<field name="company_id" select="1"/>
<field name="active" select="1"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Contributions"/>
@ -654,9 +652,11 @@
<field name="register_id" attrs="{'required': [('contribute','=',True)]}"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Accounts"/>
<field name="include_in_salary" />
<field name="account_id" attrs="{'required': [('include_in_salary','=',True)]}"/>
<separator colspan="2" string="Other Information"/>
<field name="company_id" select="1"/>
<field name="active" select="1"/>
<!-- <field name="include_in_salary" />-->
<!-- <field name="account_id" attrs="{'required': [('include_in_salary','=',True)]}"/>-->
</group>
<notebook colspan="4">
<page string="Function" attrs="{'readonly': [('amount_type','!=','func')]}">

View File

@ -393,6 +393,11 @@ class hr_payslip(osv.osv):
line_ids += [movel_pool.create(cr, uid, rec)]
for contrub in line.category_id.contribute_ids:
print contrib.name, contrub.code, contrub.amount_type, contrib.contribute_per, line.total
# if line.company_contrib > 0:
# company_contrib = line.company_contrib
## if line.category_id.amount_type == 'per':

View File

@ -277,6 +277,8 @@ class hr_applicant(osv.osv, crm.crm_case):
vals.update(res)
res = self.create(cr, uid, vals, context)
message = _('A Job Request created') + " '" + subject + "' " + _("from Mailgate.")
self.log(cr, uid, res, message)
attachents = msg.get('attachments', [])
for attactment in attachents or []:
@ -338,6 +340,34 @@ class hr_applicant(osv.osv, crm.crm_case):
@param **args: Return Dictionary of Keyword Value
"""
return True
def case_open(self, cr, uid, ids, *args):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case's Ids
@param *args: Give Tuple Value
"""
res = super(hr_applicant, self).case_open(cr, uid, ids, *args)
for (id, name) in self.name_get(cr, uid, ids):
message = _('Job request for') + " '" + name + "' "+ _("is Open.")
self.log(cr, uid, id, message)
return res
def case_close(self, cr, uid, ids, *args):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case's Ids
@param *args: Give Tuple Value
"""
res = super(hr_applicant, self).case_close(cr, uid, ids, *args)
for (id, name) in self.name_get(cr, uid, ids):
message = _('Applicant ') + " '" + name + "' "+ _("is Hired.")
self.log(cr, uid, id, message)
return res
hr_applicant()

View File

@ -48,7 +48,6 @@ to set up a management by affair.
'wizard/hr_timesheet_print_employee_view.xml',
'wizard/hr_timesheet_print_users_view.xml',
'wizard/hr_timesheet_sign_in_out_view.xml',
'report/hr_timesheet_report_view.xml',
],
'demo_xml': ['hr_timesheet_demo.xml'],
'test': ['test/test_hr_timesheet.yml'],

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,11 +15,10 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import hr_timesheet_report
import user_timesheet
import users_timesheet

View File

@ -2,4 +2,3 @@
"access_hr_analytic_timesheet","hr.analytic.timesheet","model_hr_analytic_timesheet","hr.group_hr_user",1,1,1,1
"access_hr_account_analytic_line","account.account.analytic.line","account.model_account_analytic_line","hr.group_hr_user",1,1,1,0
"access_account_analytic_journal","account.account.analytic.journal","account.model_account_analytic_journal","hr.group_hr_user",1,0,0,0
"access_hr_timesheet_report","hr.timesheet.report","model_hr_timesheet_report","hr.group_hr_manager",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_analytic_timesheet hr.analytic.timesheet model_hr_analytic_timesheet hr.group_hr_user 1 1 1 1
3 access_hr_account_analytic_line account.account.analytic.line account.model_account_analytic_line hr.group_hr_user 1 1 1 0
4 access_account_analytic_journal account.account.analytic.journal account.model_account_analytic_journal hr.group_hr_user 1 0 0 0
access_hr_timesheet_report hr.timesheet.report model_hr_timesheet_report hr.group_hr_manager 1 0 0 0

View File

@ -55,9 +55,10 @@ The validation can be configured in the company:
'process/hr_timesheet_sheet_process.xml',
'report/timesheet_report_view.xml',
'board_hr_timesheet_view.xml',
'report/hr_timesheet_report_view.xml',
],
'demo_xml': ['hr_timesheet_sheet_demo.xml',
],
'test':['test/test_hr_timesheet_sheet.yml'],
'installable': True,

View File

@ -20,6 +20,6 @@
##############################################################################
import timesheet_report
import hr_timesheet_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -54,12 +54,11 @@
domain="[('date','=', time.strftime('%%Y-%%m-%%d'))]"
help="Timesheet dof the day"/>
<separator orientation="vertical"/>
<field name="account_id"/>
<field name="user_id" />
<field name="date" />
<field name="account_id"/>
<field name="user_id" />
</group>
<newline/>
<group expand="0" string="Group By...">
<group expand="1" string="Group By...">
<filter string="User" name="group_user_id" icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
@ -79,6 +78,8 @@
<field name="journal_id"/>
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="date" />
</group>
</search>
</field>
@ -94,6 +95,6 @@
<menuitem
action="action_hr_timesheet_report_stat_all"
id="menu_hr_timesheet_report_all"
parent="menu_hr_reporting_timesheet" sequence="0"/>
parent="hr_timesheet.menu_hr_reporting_timesheet" sequence="0"/>
</data>
</openerp>

View File

@ -49,18 +49,18 @@
<field name="arch" type="xml">
<search string="Timesheet">
<group col="10" colspan="12">
<filter icon="terp-go-year" string="This Year"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')),('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet in this year"/>
<filter icon="terp-go-month" string="This Month"
name="month"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet in this month"/>
<filter icon="terp-go-week"
string=" 7 Days "
separator="1"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet during last 7 days"/>
<filter icon="terp-go-month" string="This Month"
name="month"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet in this month"/>
<filter icon="terp-go-year" string="This Year"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')),('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet in this year"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="Draft"

View File

@ -1,4 +1,5 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_hr_timesheet_sheet_sheet","hr_timesheet_sheet.sheet","model_hr_timesheet_sheet_sheet","hr.group_hr_user",1,1,1,1
"access_hr_timesheet_sheet_sheet_day","hr_timesheet_sheet.sheet.day","model_hr_timesheet_sheet_sheet_day","hr.group_hr_user",1,1,1,1
"access_hr_timesheet_sheet_sheet_account","hr_timesheet_sheet.sheet.account","model_hr_timesheet_sheet_sheet_account","hr.group_hr_user",1,1,1,1
"access_hr_timesheet_sheet_sheet_account","hr_timesheet_sheet.sheet.account","model_hr_timesheet_sheet_sheet_account","hr.group_hr_user",1,1,1,1
"access_hr_timesheet_report","hr.timesheet.report","model_hr_timesheet_report","hr.group_hr_manager",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_timesheet_sheet_sheet hr_timesheet_sheet.sheet model_hr_timesheet_sheet_sheet hr.group_hr_user 1 1 1 1
3 access_hr_timesheet_sheet_sheet_day hr_timesheet_sheet.sheet.day model_hr_timesheet_sheet_sheet_day hr.group_hr_user 1 1 1 1
4 access_hr_timesheet_sheet_sheet_account hr_timesheet_sheet.sheet.account model_hr_timesheet_sheet_sheet_account hr.group_hr_user 1 1 1 1
5 access_hr_timesheet_report hr.timesheet.report model_hr_timesheet_report hr.group_hr_manager 1 0 0 0

View File

@ -5,3 +5,4 @@
"access_idea_vote_stat","idea.vote.stat","model_idea_vote_stat","base.group_user",1,0,0,0
"access_idea_category_system","idea.category system","model_idea_category","base.group_system",1,1,1,1
"access_idea_comment","idea.comment","model_idea_comment","base.group_system",1,1,1,1
"access_idea_comment_user","idea.comment","model_idea_comment","base.group_user",1,1,1,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
5 access_idea_vote_stat idea.vote.stat model_idea_vote_stat base.group_user 1 0 0 0
6 access_idea_category_system idea.category system model_idea_category base.group_system 1 1 1 1
7 access_idea_comment idea.comment model_idea_comment base.group_system 1 1 1 1
8 access_idea_comment_user idea.comment model_idea_comment base.group_user 1 1 1 0

View File

@ -44,9 +44,6 @@
!record {model: res.users, id: res_users_user1}:
company_id: base.main_company
context_lang: en_US
groups_id:
- base.group_system
- base.group_user
login: user2
name: user2
password: user2
@ -54,16 +51,12 @@
- |
In order to post vote I connect as user1 and open the idea page
I click on "Submit Vote" wizard button and vote the idea as "Normal"
-
!record {model: idea.post.vote, id: idea_post_vote_0}:
vote: 50
- |
Now I click on "Post" button of this wizard.
-
!python {model: idea.post.vote}: |
uid = ref('res_users_user0')
self.do_vote(cr, uid, [ref("idea_post_vote_0")], {'active_ids': [ref('idea_idea_0')]})
uid = ref('res_users_user0')
new_id = self.create(cr, uid, {'vote': 50}, {"active_ids": [ref("idea_idea_0")]})
self.do_vote(cr, uid, [new_id], {"active_ids": [ref("idea_idea_0")]})
- |
To add other vote I connect as user2 and open the idea page.
@ -72,16 +65,11 @@
and put comment "We can learn many things from technical presentation".
-
!record {model: idea.post.vote, id: idea_post_vote_1}:
vote: 100
note: 'We can learn many things from technical presentation'
- |
I click on "Post" button of this wizard.
-
!python {model: idea.post.vote}: |
uid = ref('res_users_user1')
self.do_vote(cr, uid, [ref("idea_post_vote_1")], {'active_ids': [ref('idea_idea_0')]})
new_id = self.create(cr, uid, {'vote': 100, 'note': 'We can learn many things from technical presentation'}, {"active_ids": [ref("idea_idea_0")]})
self.do_vote(cr, uid, [new_id], {'active_ids': [ref('idea_idea_0')]})
- |
I can see that the Average score changed in "Average score" field with value 75
@ -99,4 +87,3 @@
-
!assert {model: idea.idea, id: idea_idea_0}:
- state == 'close'

View File

@ -71,7 +71,6 @@
<field name="name">Journal d'extourne</field>
<field name="code">JVE</field>
<field name="type">sale</field>
<field name="refund_journal">True</field>
<field name="view_id" ref="account.account_journal_view"/>
<field name="sequence_id" ref="account.sequence_journal"/>
<field name="user_id" ref="base.user_root"/>
@ -101,4 +100,4 @@
<field name="sequence_id" ref="account.sequence_journal"/>
</record>
</data>
</openerp>
</openerp>

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-10-01 07:47+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-07-07 22:54+0000\n"
"Last-Translator: Pomazan Bogdan <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 03:58+0000\n"
"X-Launchpad-Export-Date: 2010-07-08 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: membership
@ -35,7 +35,7 @@ msgstr "Уплативший член"
#. module: membership
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Недопустимое имя модели в определении действия."
#. module: membership
#: field:report.partner_member.year,currency:0
@ -91,7 +91,7 @@ msgstr ""
#. module: membership
#: constraint:account.account:0
msgid "Error ! You can not create recursive accounts."
msgstr ""
msgstr "Ошибка! Вы не можете создавать взаимно подчиненные счета."
#. module: membership
#: constraint:account.invoice:0
@ -112,7 +112,7 @@ msgstr "Партнер"
#: model:ir.actions.act_window,name:membership.action_membership_members_free
#: model:ir.ui.menu,name:membership.menu_members_free
msgid "Free members"
msgstr ""
msgstr "Свободные участники"
#. module: membership
#: model:process.transition,name:membership.process_transition_invoicetopaid0
@ -142,7 +142,7 @@ msgstr "Подтвердить"
#. module: membership
#: model:process.transition.action,name:membership.process_transition_action_create0
msgid "Create"
msgstr ""
msgstr "Создать"
#. module: membership
#: constraint:ir.ui.view:0
@ -216,6 +216,8 @@ msgstr ""
#: constraint:product.template:0
msgid "Error: UOS must be in a different category than the UOM"
msgstr ""
"Ошибка. Единицы продажи и единицы измерения должны принадлежать к разным "
"категориям."
#. module: membership
#: model:ir.ui.menu,name:membership.menu_membership_products
@ -405,7 +407,7 @@ msgstr ""
#. module: membership
#: model:ir.actions.act_window,name:membership.action_membership_members_waiting
msgid "Future members"
msgstr ""
msgstr "Будущие пользователи"
#. module: membership
#: wizard_button:wizard_invoice_membership,init,end:0

View File

@ -758,9 +758,11 @@ class mrp_production(osv.osv):
new_parent_ids.append(final_product.id)
for new_parent_id in new_parent_ids:
stock_mov_obj.write(cr, uid, [raw_product.id], {'move_history_ids': [(4,new_parent_id)]})
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production', production_id, 'button_produce_done', cr)
message = _('Manufacturing order ') + " '" + production.name + "' "+ _("is finished.")
self.log(cr, uid, production_id, message)
return True
def _costs_generate(self, cr, uid, production):
@ -926,9 +928,11 @@ class mrp_production(osv.osv):
'company_id': production.company_id.id,
})
wf_service.trg_validate(uid, 'procurement.order', proc_id, 'button_confirm', cr)
proc_ids.append(proc_id)
proc_ids.append(proc_id)
wf_service.trg_validate(uid, 'stock.picking', picking_id, 'button_confirm', cr)
self.write(cr, uid, [production.id], {'picking_id': picking_id, 'move_lines': [(6,0,moves)], 'state':'confirmed'})
message = _('Manufacturing order ') + " '" + production.name + "' "+ _("is confirmed.")
self.log(cr, uid, production.id, message)
return picking_id
def force_production(self, cr, uid, ids, *args):

View File

@ -885,22 +885,6 @@
</xpath>
</field>
</record>
<record id="view_procurement_form_inherit_property" model="ir.ui.view">
<field name="name">procurement.order.form.inherit</field>
<field name="model">procurement.order</field>
<field name="inherit_id" ref="procurement.procurement_form_view"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='close_move']" position="after">
<group colspan="4" groups="base.group_extended">
<separator colspan="4" string="Properties" />
<field colspan="4" name="property_ids" nolabel="1"/>
</group>
</xpath>
</field>
</record>
<act_window
id="action_product_bom_structure"
name="Product BoM Structure"

View File

@ -40,8 +40,11 @@ class procurement_order(osv.osv):
"""
properties = [x.id for x in procurement.property_ids]
bom_id = self.pool.get('mrp.bom')._bom_find(cr, uid, procurement.product_id.id, procurement.product_uom.id, properties)
if not bom_id:
if not bom_id:
cr.execute('update procurement_order set message=%s where id=%s', (_('No BoM defined for this product !'), procurement.id))
for (id, name) in self.name_get(cr, uid, procurement.id):
message = _('Procurement ') + " '" + name + "' "+ _("has an exception.") + _('No BoM defined for this product !')
self.log(cr, uid, id, message)
return False
return True

View File

@ -28,7 +28,3 @@
"access_report_workcenter_load","report.workcenter.load","model_report_workcenter_load","mrp.group_mrp_manager",1,0,0,0
"access_report_mrp_inout","report.mrp.inout","model_report_mrp_inout","mrp.group_mrp_manager",1,0,0,0
"access_product_product_manager","product.product manager","model_product_product","mrp.group_mrp_manager",1,1,1,1
"access_mrp_property_group","mrp.property.group","model_mrp_property_group","stock.group_stock_manager",1,1,1,1
"access_mrp_property","mrp.property","model_mrp_property","stock.group_stock_manager",1,1,1,1
"access_mrp_property_group","mrp.property.group","model_mrp_property_group","base.group_user",1,0,0,0
"access_mrp_property","mrp.property","model_mrp_property","base.group_user",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
28 access_report_workcenter_load report.workcenter.load model_report_workcenter_load mrp.group_mrp_manager 1 0 0 0
29 access_report_mrp_inout report.mrp.inout model_report_mrp_inout mrp.group_mrp_manager 1 0 0 0
30 access_product_product_manager product.product manager model_product_product mrp.group_mrp_manager 1 1 1 1
access_mrp_property_group mrp.property.group model_mrp_property_group stock.group_stock_manager 1 1 1 1
access_mrp_property mrp.property model_mrp_property stock.group_stock_manager 1 1 1 1
access_mrp_property_group mrp.property.group model_mrp_property_group base.group_user 1 0 0 0
access_mrp_property mrp.property model_mrp_property base.group_user 1 0 0 0

View File

@ -69,7 +69,7 @@
location_dest_id: stock.stock_location_customers
location_id: stock.stock_location_stock
name: Pack of 24 Beers
product_id: mrp_bom_packofbeers0
product_id: product_product_packofbeers0
product_qty: 2.0
product_uom: product.product_uom_unit
move_type: direct
@ -83,12 +83,12 @@
"active_id": ref("stock.menu_action_picking_tree"), }
)
- |
I check that my Picking of a "PAck of 24 beers" as been automatically
I check that my Picking of a "Pack of 24 beers" has been automatically
converted to a picking of 24 beers and a pack of beer, so that my
stock of beers remains exact.
-
!assert {model: stock.picking, id: picking_out}:
- len(move_ids) == 2
- move_ids[0].product_id.id <> move_ids[1].product_id.id
- move_ids[0].product_id.id in (ref('product_product_beers0'), ref('product_product_beerspack0'))
- move_ids[1].product_id.id in (ref('product_product_beers0'), ref('product_product_beerspack0'))
- len(move_lines) == 2
- move_lines[0].product_id.id <> move_lines[1].product_id.id
- move_lines[0].product_id.id in (ref('product_product_beers0'), ref('product_product_beerspack0'))
- move_lines[1].product_id.id in (ref('product_product_beers0'), ref('product_product_beerspack0'))

View File

@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-12-08 11:46+0000\n"
"PO-Revision-Date: 2010-02-08 20:23+0000\n"
"Last-Translator: Nikolay Chesnokov <chesnokov_n@msn.com>\n"
"PO-Revision-Date: 2010-07-07 22:52+0000\n"
"Last-Translator: Pomazan Bogdan <Unknown>\n"
"Language-Team: Russian <ru@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:20+0000\n"
"X-Launchpad-Export-Date: 2010-07-08 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
#: help:multi_company.default,object_id:0
msgid "Object affect by this rules"
msgstr ""
msgstr "Объект затрагивает эти правила"
#. module: multi_company
#: constraint:ir.model:0
@ -61,7 +61,7 @@ msgstr ""
#. module: multi_company
#: field:multi_company.default,company_dest_id:0
msgid "Default Company"
msgstr ""
msgstr "Компания по умолчанию"
#. module: multi_company
#: field:multi_company.default,object_id:0
@ -140,12 +140,12 @@ msgstr ""
#. module: multi_company
#: help:multi_company.default,company_id:0
msgid "Company where the user is connected"
msgstr ""
msgstr "Компании, в составе которых находиться пользователь"
#. module: multi_company
#: model:ir.actions.act_window,name:multi_company.action_inventory_form
msgid "Default Company per Object"
msgstr ""
msgstr "Компании по умолчанию для объекта"
#. module: multi_company
#: field:multi_company.default,expression:0
@ -180,7 +180,7 @@ msgstr ""
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_action_inventory_form
msgid "Default company per Object"
msgstr ""
msgstr "Компания по умолчанию для объекта"
#. module: multi_company
#: code:addons/multi_company/multi_company.py:0

View File

@ -250,7 +250,7 @@
country_id: base.in
partner_id: res_partner_microlinktechnologies0
street: Ash House, Ash Road
title: Ms.
title: base.res_partner_title_miss
-
I create product category .
-

View File

@ -24,7 +24,7 @@ from osv import osv,fields
class company(osv.osv):
_inherit = 'res.company'
_columns = {
'schedule_range': fields.float('Scheduler Range', required=True,
'schedule_range': fields.float('Scheduler Range Days', required=True,
help="This is the time frame analysed by the scheduler when "\
"computing procurements. All procurements that are not between "\
"today and today+range are skipped for futur computation."),

View File

@ -3,7 +3,7 @@
<data>
<!--
Process
Process Node from where the Procurement flow starts
-->
<record id="process_process_procurementprocess0" model="process.process">
@ -11,11 +11,6 @@
<field name="model_id" ref="procurement.model_procurement_order"/>
<field eval="1" name="active"/>
</record>
<!--
Process Node
-->
</data>
</openerp>

View File

@ -331,6 +331,8 @@ class procurement_order(osv.osv):
})
move_obj.action_confirm(cr, uid, [id], context=context)
self.write(cr, uid, [procurement.id], {'move_id': id, 'close_move': 1})
message = _('Procurement ') + " '" + procurement.name + "' "+ _("is running.")
self.log(cr, uid, procurement.id, message)
self.write(cr, uid, ids, {'state': 'confirmed', 'message': ''})
return True
@ -355,8 +357,10 @@ class procurement_order(osv.osv):
if not (procurement.move_id.state in ('done','assigned','cancel')):
ok = ok and self.pool.get('stock.move').action_assign(cr, uid, [id])
cr.execute('select count(id) from stock_warehouse_orderpoint where product_id=%s', (procurement.product_id.id,))
if not cr.fetchone()[0]:
if not cr.fetchone()[0]:
cr.execute('update procurement_order set message=%s where id=%s', (_('Not enough stock and no minimum orderpoint rule defined.'), procurement.id))
message = _('Procurement ') + " '" + procurement.name + "' "+ _("has an exception.") + _('Not enough stock and no minimum orderpoint rule defined.')
self.log(cr, uid, procurement.id, message)
return ok
def action_produce_assign_service(self, cr, uid, ids, context={}):
@ -434,6 +438,8 @@ class procurement_order(osv.osv):
if procurement.move_id:
if procurement.close_move and (procurement.move_id.state <> 'done'):
move_obj.action_done(cr, uid, [procurement.move_id.id])
message = _('Procurement ') + " '" + procurement.name + "' "+ _("is done.")
self.log(cr, uid, procurement.id, message)
res = self.write(cr, uid, ids, {'state': 'done', 'date_close': time.strftime('%Y-%m-%d')})
wf_service = netsvc.LocalService("workflow")
for id in ids:
@ -472,7 +478,7 @@ class stock_warehouse_orderpoint(osv.osv):
help="When the virtual stock goes belong the Min Quantity, Open ERP generates "\
"a procurement to bring the virtual stock to the Max Quantity."),
'product_max_qty': fields.float('Max Quantity', required=True,
help="When the virtual stock goes belong the Mix Quantity, Open ERP generates "\
help="When the virtual stock goes belong the Max Quantity, Open ERP generates "\
"a procurement to bring the virtual stock to the Max Quantity."),
'qty_multiple': fields.integer('Qty Multiple', required=True,
help="The procurement quantity will by rounded up to this multiple."),

View File

@ -67,6 +67,10 @@
<field name="move_id" groups="base.group_extended"/>
<field name="date_close"/>
<field name="close_move" groups="base.group_extended"/>
<group colspan="4" groups="base.group_extended">
<separator colspan="4" string="Properties" />
<field colspan="4" name="property_ids" nolabel="1"/>
</group>
</page>
<page string="Notes">
<separator colspan="4" string="Note" />

View File

@ -183,6 +183,8 @@
<field name="act_from" ref="act_make_done"/>
<field name="act_to" ref="act_done"/>
<field name="condition">action_check_finnished()</field>
<field name="trigger_model">stock.move</field>
<field name="trigger_expr_id">[move_id.id]</field>
</record>
<record id="trans_make_done_confirm" model="workflow.transition">
<field name="act_from" ref="act_make_done"/>

View File

@ -1,3 +1,8 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_procurement","procurement.order","model_procurement_order","base.group_user",1,0,0,0
"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint","stock.group_stock_manager",1,1,1,1
"access_mrp_property_group","mrp.property.group","model_mrp_property_group","stock.group_stock_manager",1,1,1,1
"access_mrp_property","mrp.property","model_mrp_property","stock.group_stock_manager",1,1,1,1
"access_mrp_property_group","mrp.property.group","model_mrp_property_group","base.group_user",1,0,0,0
"access_mrp_property","mrp.property","model_mrp_property","base.group_user",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_procurement procurement.order model_procurement_order base.group_user 1 0 0 0
3 access_stock_warehouse_orderpoint stock.warehouse.orderpoint model_stock_warehouse_orderpoint stock.group_stock_manager 1 1 1 1
4 access_mrp_property_group mrp.property.group model_mrp_property_group stock.group_stock_manager 1 1 1 1
5 access_mrp_property mrp.property model_mrp_property stock.group_stock_manager 1 1 1 1
6 access_mrp_property_group mrp.property.group model_mrp_property_group base.group_user 1 0 0 0
7 access_mrp_property mrp.property model_mrp_property base.group_user 1 0 0 0
8

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-06-22 10:03+0000\n"
"Last-Translator: grisha <Unknown>\n"
"PO-Revision-Date: 2010-07-07 22:48+0000\n"
"Last-Translator: Pomazan Bogdan <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-23 03:53+0000\n"
"X-Launchpad-Export-Date: 2010-07-08 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: product
@ -251,7 +251,7 @@ msgstr ""
#. module: product
#: model:process.transition,note:product.process_transition_supplierofproduct0
msgid "You can see the list of suppliers for that product."
msgstr ""
msgstr "Вы можете просмотреть список поставщиков этого изделия"
#. module: product
#: help:product.packaging,rows:0

View File

@ -71,33 +71,34 @@ class product_uom(osv.osv):
_columns = {
'name': fields.char('Name', size=64, required=True, translate=True),
'category_id': fields.many2one('product.uom.categ', 'UoM Category', required=True, ondelete='cascade',
help="Unit of Measure of a category can be converted between each others in the same category."),
help="Quantity conversions may happen automatically between Units of Measure in the same category, according to their respective ratios."),
'factor': fields.float('Ratio', digits=(12, 6), required=True,
help='The coefficient for the formula:\n' \
'1 (base unit) = coeff (this unit). Ratio = 1 / Factor.'),
help='How many times this UoM is smaller than the reference UoM in this category:\n'\
'1 * (reference unit) = ratio * (this unit)'),
'factor_inv': fields.function(_factor_inv, digits=(12, 6),
fnct_inv=_factor_inv_write,
method=True, string='Ratio',
help='The coefficient for the formula:\n' \
'coeff (base unit) = 1 (this unit). Factor = 1 / Rate.'),
help='How many times this UoM is bigger than the reference UoM in this category:\n'\
'1 * (this unit) = ratio * (reference unit)', required=True),
'rounding': fields.float('Rounding Precision', digits=(16, 3), required=True,
help="The computed quantity will be a multiple of this value. Use 1.0 for products that can not be split."),
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the unit of measure without removing it."),
'uom_factor': fields.selection([('bigger','Bigger than the default'),
('smaller','Smaller than the default'),
('default','Default UoM for the category')],'Type of Unit', required=1),
help="The computed quantity will be a multiple of this value. "\
"Use 1.0 for a UoM that cannot be further split, such as a piece."),
'active': fields.boolean('Active', help="By unchecking the active field you can disable a unit of measure without deleting it."),
'uom_type': fields.selection([('bigger','Bigger than the reference UoM'),
('reference','Reference UoM for this category (ratio=1)'),
('smaller','Smaller than the reference UoM')],'UoM Type', required=1),
}
_defaults = {
'factor': lambda *a: 1.0,
'factor_inv': lambda *a: 1.0,
'active': lambda *a: 1,
'rounding': lambda *a: 0.01,
'uom_factor': lambda *a: 'default',
'factor': 1.0,
'factor_inv': 1.0,
'active': 1,
'rounding': 0.01,
'uom_type': 'reference',
}
_sql_constraints = [
('factor_gt_zero', 'CHECK (factor!=0)', 'Value of the factor can never be 0 !'),
('factor_gt_zero', 'CHECK (factor!=0)', 'The conversion ratio for a unit of measure cannot be 0!'),
]
def _compute_qty(self, cr, uid, from_uom_id, qty, to_uom_id=False):
@ -133,8 +134,8 @@ class product_uom(osv.osv):
amount = amount / to_unit.factor
return amount
def onchange_factor(self, cursor, user, ids, value):
if value == 'default':
def onchange_type(self, cursor, user, ids, value):
if value == 'reference':
return {'value': {'factor': 1, 'factor_inv': 1}}
return {}

View File

@ -24,38 +24,55 @@
<record id="product_uom_unit" model="product.uom">
<field name="category_id" ref="product_uom_categ_unit"/>
<field name="name">PCE</field>
<field name="factor">1.0</field>
<field name="rounding">1.0</field>
<field name="factor" eval="1.0"/>
<field name="rounding" eval="1.0"/>
</record>
<record id="product_uom_kgm" model="product.uom">
<field name="category_id" ref="product_uom_categ_kgm"/>
<field name="name">KGM</field>
<field name="factor">1</field>
<field name="name">kg</field>
<field name="factor" eval="1"/>
</record>
<record id="product_uom_gram" model="product.uom">
<field name="category_id" ref="product_uom_categ_kgm"/>
<field name="name">g</field>
<field name="factor" eval="1000"/>
<field name="uom_type">smaller</field>
</record>
<record id="uom_hour" model="product.uom">
<field name="name">Hour</field>
<field name="name">hour</field>
<field eval="uom_categ_wtime" name="category_id"/>
<field name="factor">8.0</field>
<field name="factor" eval="8.0"/>
<field name="uom_type">smaller</field>
</record>
<record id="uom_day" model="product.uom">
<field name="name">Day</field>
<field name="name">day</field>
<field eval="uom_categ_wtime" name="category_id"/>
<field name="factor">1.0</field>
<field name="factor" eval="1.0"/>
</record>
<record id="product_uom_ton" model="product.uom">
<field name="category_id" ref="product_uom_categ_kgm"/>
<field name="name">TON</field>
<field name="factor">0.001</field>
<!-- 'tonne' is the most common spelling in english-speaking countries,
the alternative is 'metric ton' in the US, abbreviated as 'mt' -->
<field name="name">tonne</field>
<field name="factor" eval="0.001"/>
<field name="uom_type">bigger</field>
</record>
<record id="product_uom_meter" model="product.uom">
<field name="category_id" ref="uom_categ_length"/>
<field name="name">Meter</field>
<field name="factor">1.0</field>
<field name="name">m</field>
<field name="factor" eval="1.0"/>
</record>
<record id="product_uom_km" model="product.uom">
<field name="category_id" ref="uom_categ_length"/>
<field name="name">Kilometer</field>
<field name="factor">0.001</field>
<field name="name">km</field>
<field name="factor" eval="0.001"/>
<field name="uom_type">bigger</field>
</record>
<record id="product_uom_cm" model="product.uom">
<field name="category_id" ref="uom_categ_length"/>
<field name="name">cm</field>
<field name="factor" eval="100"/>
<field name="uom_type">smaller</field>
</record>

View File

@ -127,9 +127,9 @@
</group>
<group colspan="2" col="2" name="store">
<separator string="Storage Localisation" colspan="2"/>
<field name="loc_rack"/>
<field name="loc_row"/>
<field name="loc_case"/>
<field name="loc_rack" attrs="{'readonly':[('type','=','service')]}" />
<field name="loc_row" attrs="{'readonly':[('type','=','service')]}"/>
<field name="loc_case" attrs="{'readonly':[('type','=','service')]}"/>
</group>
<group colspan="2" col="2" name="misc" groups="base.group_extended">
@ -310,16 +310,29 @@
<field name="arch" type="xml">
<form string="Units of Measure">
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="category_id" select="1" widget="selection"/>
<field name="active"/>
<field name="uom_factor" on_change="onchange_factor(uom_factor)"/>
<group colspan="2" col="2">
<field name="factor" attrs="{'invisible':[('uom_factor','&lt;&gt;','smaller')]}"/>
<field name="factor_inv" string="Factor Data" attrs="{'invisible':[('uom_factor','&lt;&gt;','bigger')]}"/>
<group col="2" colspan="2">
<separator string="Unit of Measure Properties" colspan="4"/>
<field name="name" select="1"/>
<field name="category_id" select="1" widget="selection"/>
<field name="active"/>
</group>
<group col="4" colspan="4">
<separator string="Ratio &amp; Precision" colspan="4"/>
<group colspan="2" col="2">
<field name="uom_type" on_change="onchange_type(uom_type)"/>
<field name="rounding"/>
</group>
<group colspan="2" col="2">
<group col="2" colspan="2" attrs="{'invisible':[('uom_type','!=','smaller')]}">
<field name="factor"/>
<label colspan="2" string=" e.g: 1 * (reference unit) = ratio * (this unit)"/>
</group>
<group col="2" colspan="2" attrs="{'invisible':[('uom_type','!=','bigger')]}">
<field name="factor_inv"/>
<label colspan="2" string=" e.g: 1 * (this unit) = ratio * (reference unit)"/>
</group>
</group>
</group>
<newline/>
<field name="rounding"/>
</group>
</form>
</field>

View File

@ -174,6 +174,9 @@ class project(osv.osv):
def set_done(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state':'close'}, context=context)
for (id, name) in self.name_get(cr, uid, ids):
message = _('Project ') + " '" + name + "' "+ _("is Closed.")
self.log(cr, uid, id, message)
return True
def set_cancel(self, cr, uid, ids, context=None):
@ -190,6 +193,9 @@ class project(osv.osv):
def reset_project(self, cr, uid, ids, context=None):
res = self.setActive(cr, uid, ids, value=True, context=context)
for (id, name) in self.name_get(cr, uid, ids):
message = _('Project ') + " '" + name + "' "+ _("is Open.")
self.log(cr, uid, id, message)
return res
def copy(self, cr, uid, id, default={}, context=None):
@ -434,6 +440,8 @@ class task(osv.osv):
elif project.warn_manager:
task_id = ids[0]
mail_send = True
message = _('Task ') + " '" + task.name + "' "+ _("is Done.")
self.log(cr, uid, task.id, message)
self.write(cr, uid, [task.id], {'state': 'done', 'date_end':time.strftime('%Y-%m-%d %H:%M:%S'), 'remaining_hours': 0.0})
for parent_id in task.parent_ids:
if parent_id.state in ('pending','draft'):
@ -494,6 +502,8 @@ class task(osv.osv):
'ref_doc1': 'project.task,%d' % task.id,
'ref_doc2': 'project.project,%d' % project.id,
})
message = _('Task ') + " '" + task.name + "' "+ _("is Cancelled.")
self.log(cr, uid, task.id, message)
self.write(cr, uid, [task.id], {'state': 'cancelled', 'remaining_hours':0.0})
return True
@ -501,6 +511,8 @@ class task(osv.osv):
tasks= self.browse(cr,uid,ids)
for t in tasks:
self.write(cr, uid, [t.id], {'state': 'open'})
message = _('Task ') + " '" + t.name + "' "+ _("is Open.")
self.log(cr, uid, t.id, message)
return True
def do_draft(self, cr, uid, ids, *args):
@ -510,6 +522,9 @@ class task(osv.osv):
def do_pending(self, cr, uid, ids, *args):
self.write(cr, uid, ids, {'state': 'pending'})
for (id, name) in self.name_get(cr, uid, ids):
message = _('Task ') + " '" + name + "' "+ _("is Pending.")
self.log(cr, uid, id, message)
return True
def next_type(self, cr, uid, ids, *args):

View File

@ -142,8 +142,9 @@
<field name="type">tree</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree colors="red:date&lt;current_date and state in ('open');blue:state in ('draft','pending');grey: state in ('close','cancelled')" string="Projects">
<tree colors="red:date and (date&lt;current_date) and (state in ('open'));blue:state in ('draft','pending');grey: state in ('close','cancelled')" string="Projects">
<field name="sequence" invisible="1"/>
<field name="date" invisible="1"/>
<field name="name" string="Project Name"/>
<field name="user_id" string="Project Manager"/>
<field name="partner_id" string="Partner"/>

View File

@ -82,12 +82,13 @@ class project_task_delegate(osv.osv_memory):
'prefix': _get_prefix,
'new_task_description': _get_new_desc,
'state': 'pending',
}
}
def validate(self, cr, uid, ids, context=None):
if context is None:
context = {}
task_obj = self.pool.get('project.task')
user_obj = self.pool.get('res.users')
delegate_data = self.read(cr, uid, ids, context=context)[0]
task = task_obj.browse(cr, uid, context['active_id'], context=context)
newname = delegate_data['prefix'] or ''
@ -111,6 +112,9 @@ class project_task_delegate(osv.osv_memory):
task_obj.do_pending(cr, uid, [task.id])
else:
task_obj.do_close(cr, uid, [task.id])
delegrate_user = user_obj.browse(cr, uid, delegate_data['user_id'], context=context)
message = _('Task ') + " '" + delegate_data['name'] + "' "+ _("is Delegated to User:") +" '"+ delegrate_user.name +"' "
self.log(cr, uid, task.id, message)
return {}
project_task_delegate()

View File

@ -52,8 +52,26 @@ class project_issue(osv.osv, crm.crm_case):
res = super(project_issue, self).case_open(cr, uid, ids, *args)
self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
for (id, name) in self.name_get(cr, uid, ids):
message = _('Issue ') + " '" + name + "' "+ _("is Open.")
self.log(cr, uid, id, message)
return res
def case_close(self, cr, uid, ids, *args):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case's Ids
@param *args: Give Tuple Value
"""
res = super(project_issue, self).case_close(cr, uid, ids, *args)
for (id, name) in self.name_get(cr, uid, ids):
message = _('Issue ') + " '" + name + "' "+ _("is Closed.")
self.log(cr, uid, id, message)
return res
def _compute_day(self, cr, uid, ids, fields, args, context=None):
if context is None:
context = {}
@ -319,6 +337,8 @@ class project_issue(osv.osv, crm.crm_case):
if res:
vals.update(res)
res = self.create(cr, uid, vals, context)
message = _('An Issue created') + " '" + subject + "' " + _("from Mailgate.")
self.log(cr, uid, res, message)
self.convert_to_bug(cr, uid, [res], context=context)
attachents = msg.get('attachments', [])

View File

@ -137,6 +137,7 @@ class project_phase(osv.osv):
"""
uom_obj = self.pool.get('product.uom')
resource_obj = self.pool.get('resource.resource')
model_data_obj = self.pool.get('ir.model.data')
cal_obj = self.pool.get('resource.calendar')
calendar_id = phase.project_id.resource_calendar_id and phase.project_id.resource_calendar_id.id or False
resource_id = resource_obj.search(cr, uid, [('user_id', '=', phase.responsible_id.id)])
@ -146,7 +147,7 @@ class project_phase(osv.osv):
cal_id = res.get('calendar_id', False) and res.get('calendar_id')[0] or False
if cal_id:
calendar_id = cal_id
default_uom_id = uom_obj.search(cr, uid, [('name', '=', 'Hour')], context=context)[0]
default_uom_id = model_data_obj._get_id(cr, uid, 'product', 'uom_hour')
avg_hours = uom_obj._compute_qty(cr, uid, phase.product_uom.id, phase.duration, default_uom_id)
work_times = cal_obj.interval_min_get(cr, uid, calendar_id, date_end, avg_hours or 0.0, resource_id and resource_id[0] or False)
dt_start = work_times[0][0].strftime('%Y-%m-%d %H:%M:%S')
@ -159,6 +160,7 @@ class project_phase(osv.osv):
Check And Compute date_end of phase if change in date_end > older time.
"""
uom_obj = self.pool.get('product.uom')
model_data_obj = self.pool.get('ir.model.data')
resource_obj = self.pool.get('resource.resource')
cal_obj = self.pool.get('resource.calendar')
calendar_id = phase.project_id.resource_calendar_id and phase.project_id.resource_calendar_id.id or False
@ -169,7 +171,7 @@ class project_phase(osv.osv):
cal_id = res.get('calendar_id', False) and res.get('calendar_id')[0] or False
if cal_id:
calendar_id = cal_id
default_uom_id = uom_obj.search(cr, uid, [('name', '=', 'Hour')], context=context)[0]
default_uom_id = model_data_obj._get_id(cr, uid, 'product', 'uom_hour')
avg_hours = uom_obj._compute_qty(cr, uid, phase.product_uom.id, phase.duration, default_uom_id)
work_times = cal_obj.interval_get(cr, uid, calendar_id, date_start, avg_hours or 0.0, resource_id and resource_id[0] or False)
dt_end = work_times[-1][1].strftime('%Y-%m-%d %H:%M:%S')
@ -179,6 +181,7 @@ class project_phase(osv.osv):
resource_calendar_obj = self.pool.get('resource.calendar')
resource_obj = self.pool.get('resource.resource')
uom_obj = self.pool.get('product.uom')
model_data_obj = self.pool.get('ir.model.data')
if context is None:
context = {}
if context.get('scheduler',False):
@ -192,7 +195,7 @@ class project_phase(osv.osv):
cal_id = resource_obj.browse(cr, uid, resource_id[0], context=context).calendar_id.id
if cal_id:
calendar_id = cal_id
default_uom_id = uom_obj.search(cr, uid, [('name', '=', 'Hour')])[0]
default_uom_id = model_data_obj._get_id(cr, uid, 'product', 'uom_hour')
avg_hours = uom_obj._compute_qty(cr, uid, phase.product_uom.id, phase.duration, default_uom_id)
# Change the date_start and date_end

View File

@ -60,6 +60,7 @@ class project_compute_phases(osv.osv_memory):
phase_obj = self.pool.get('project.phase')
resource_obj = self.pool.get('resource.resource')
uom_obj = self.pool.get('product.uom')
model_data_obj = self.pool.get('ir.model.data')
phase_resource_obj = False
if context is None:
@ -81,7 +82,7 @@ class project_compute_phases(osv.osv_memory):
'vacation': tuple(leaves),
'efficiency': time_efficiency
})
default_uom_id = uom_obj.search(cr, uid, [('name','=','Hour')])[0]
default_uom_id = model_data_obj._get_id(cr, uid, 'product', 'uom_hour')
avg_hours = uom_obj._compute_qty(cr, uid, phase.product_uom.id, phase.duration, default_uom_id)
duration = str(avg_hours) + 'H'
# Create a new project for each phase

View File

@ -88,26 +88,12 @@ class report_intrastat(osv.osv):
else 0
end) as value,
sum(
case when uom.category_id != puom.category_id then pt.weight_net * inv_line.quantity
else
case when uom.factor_inv_data > 0
then
pt.weight_net * inv_line.quantity * uom.factor_inv_data
else
pt.weight_net * inv_line.quantity / uom.factor
end
end
case when uom.category_id != puom.category_id then (pt.weight_net * inv_line.quantity)
else (pt.weight_net * inv_line.quantity * uom.factor) end
) as weight,
sum(
case when uom.category_id != puom.category_id then inv_line.quantity
else
case when uom.factor_inv_data > 0
then
inv_line.quantity * uom.factor_inv_data
else
inv_line.quantity / uom.factor
end
end
else (inv_line.quantity * uom.factor) end
) as supply_units,
inv.currency_id as currency_id,

View File

@ -1,19 +1,19 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * sale
# * sale
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-06-11 16:29+0000\n"
"Last-Translator: Sios <Unknown>\n"
"PO-Revision-Date: 2010-07-07 22:47+0000\n"
"Last-Translator: Pomazan Bogdan <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:08+0000\n"
"X-Launchpad-Export-Date: 2010-07-08 03:50+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale
@ -44,12 +44,10 @@ msgstr "Долевой участник"
#. module: sale
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Недопустимое имя модели в определении действия"
msgstr "Недопустимое имя модели в определении действия."
#. module: sale
#: selection:report.sale.order.category,state:0
#: selection:report.sale.order.created,state:0
#: selection:report.sale.order.product,state:0
#: selection:sale.order,state:0
msgid "Waiting Schedule"
msgstr "В ожидании расписания"
@ -73,7 +71,8 @@ msgid "Steps To Deliver a Sale Order"
msgstr "Шаги для получения Порядка продажи"
#. module: sale
#: wizard_field:sale.advance_payment_inv,init,qtty:0 rml:sale.order:0
#: wizard_field:sale.advance_payment_inv,init,qtty:0
#: rml:sale.order:0
msgid "Quantity"
msgstr "Количество"
@ -83,9 +82,10 @@ msgid "You invoice has been successfully created !"
msgstr ""
#. module: sale
#: view:sale.order:0 view:sale.order.line:0
#: view:sale.order:0
#: view:sale.order.line:0
msgid "Automatic Declaration"
msgstr ""
msgstr "Автоматическое обьявление"
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_line_tree3
@ -99,11 +99,9 @@ msgid "Set to Draft"
msgstr "Установить в 'Черновик'"
#. module: sale
#: selection:report.sale.order.category,state:0
#: selection:report.sale.order.created,state:0
#: selection:report.sale.order.product,state:0
#: selection:sale.order,state:0
msgid "Invoice Exception"
msgstr "Исключительная ситуация счета"
msgstr ""
#. module: sale
#: help:sale.order,picking_ids:0
@ -160,7 +158,9 @@ msgid "Manual Designation"
msgstr ""
#. module: sale
#: view:sale.order:0 field:sale.order,note:0 view:sale.order.line:0
#: view:sale.order:0
#: field:sale.order,note:0
#: view:sale.order.line:0
#: field:sale.order.line,notes:0
msgid "Notes"
msgstr "Примечания"
@ -171,7 +171,8 @@ msgid "Invoice after delivery"
msgstr ""
#. module: sale
#: field:sale.order,amount_tax:0 field:sale.order.line,tax_id:0
#: field:sale.order,amount_tax:0
#: field:sale.order.line,tax_id:0
msgid "Taxes"
msgstr "Налоги"
@ -186,16 +187,15 @@ msgid "Shipping Policy"
msgstr ""
#. module: sale
#: selection:sale.order,state:0 selection:sale.order.line,state:0
#: selection:sale.order,state:0
#: selection:sale.order.line,state:0
msgid "Cancelled"
msgstr ""
#. module: sale
#: selection:report.sale.order.category,state:0
#: selection:report.sale.order.created,state:0
#: selection:report.sale.order.product,state:0
#: selection:sale.order,state:0
msgid "Shipping Exception"
msgstr "Исключительная ситуация поставки"
msgstr ""
#. module: sale
#: field:sale.order,amount_total:0
@ -233,7 +233,8 @@ msgid "Procurement is created after confirmation of sale order."
msgstr ""
#. module: sale
#: field:sale.order,project_id:0 field:sale.shop,project_id:0
#: field:sale.order,project_id:0
#: field:sale.shop,project_id:0
msgid "Analytic Account"
msgstr "Счет аналитики"
@ -319,7 +320,8 @@ msgid "Invoice Based on Sales Orders"
msgstr ""
#. module: sale
#: model:ir.model,name:sale.model_sale_shop view:sale.shop:0
#: model:ir.model,name:sale.model_sale_shop
#: view:sale.shop:0
msgid "Sale Shop"
msgstr ""
@ -334,7 +336,8 @@ msgid "Order N°"
msgstr ""
#. module: sale
#: field:sale.order,order_line:0 view:sale.order.line:0
#: field:sale.order,order_line:0
#: view:sale.order.line:0
msgid "Order Lines"
msgstr "Позиции заказа"
@ -344,7 +347,8 @@ msgid "Disc.(%)"
msgstr ""
#. module: sale
#: view:sale.order:0 view:sale.order.line:0
#: view:sale.order:0
#: view:sale.order.line:0
#: field:sale.order.line,invoice_lines:0
msgid "Invoice Lines"
msgstr "Позиции счета"
@ -437,13 +441,15 @@ msgid "Order Reference"
msgstr "Ссылка на заказ"
#. module: sale
#: selection:sale.order,state:0 view:sale.order.line:0
#: selection:sale.order,state:0
#: view:sale.order.line:0
#: selection:sale.order.line,state:0
msgid "Done"
msgstr "Выполнено"
#. module: sale
#: field:sale.order,pricelist_id:0 field:sale.shop,pricelist_id:0
#: field:sale.order,pricelist_id:0
#: field:sale.shop,pricelist_id:0
msgid "Pricelist"
msgstr "Каталог"
@ -612,7 +618,8 @@ msgid "Taxes :"
msgstr ""
#. module: sale
#: field:sale.order,invoiced_rate:0 field:sale.order.line,invoiced:0
#: field:sale.order,invoiced_rate:0
#: field:sale.order.line,invoiced:0
msgid "Invoiced"
msgstr "Выставлен счет"
@ -763,7 +770,8 @@ msgid "Direct Delivery"
msgstr ""
#. module: sale
#: view:sale.order:0 view:sale.order.line:0
#: view:sale.order:0
#: view:sale.order.line:0
#: field:sale.order.line,property_ids:0
msgid "Properties"
msgstr "Свойства"
@ -793,7 +801,8 @@ msgstr "Вычислить"
#. module: sale
#: model:ir.actions.act_window,name:sale.action_shop_form
#: model:ir.ui.menu,name:sale.menu_action_shop_form field:sale.order,shop_id:0
#: model:ir.ui.menu,name:sale.menu_action_shop_form
#: field:sale.order,shop_id:0
msgid "Shop"
msgstr "Магазин"
@ -844,7 +853,8 @@ msgid "Delivery Order Only"
msgstr ""
#. module: sale
#: view:sale.order:0 view:sale.order.line:0
#: view:sale.order:0
#: view:sale.order.line:0
msgid "Sales order lines"
msgstr "Позиции заказа"
@ -859,7 +869,8 @@ msgid "Sales"
msgstr "Продажи"
#. module: sale
#: view:sale.order:0 view:sale.order.line:0
#: view:sale.order:0
#: view:sale.order.line:0
msgid "Qty"
msgstr "Кол-во"
@ -874,7 +885,8 @@ msgid "Other data"
msgstr "Прочие данные"
#. module: sale
#: wizard_field:sale.advance_payment_inv,init,amount:0 rml:sale.order:0
#: wizard_field:sale.advance_payment_inv,init,amount:0
#: rml:sale.order:0
#: field:sale.order.line,price_unit:0
msgid "Unit Price"
msgstr "Цена за ед."
@ -900,7 +912,8 @@ msgstr "Счет"
#: model:process.transition.action,name:sale.process_transition_action_cancel1
#: model:process.transition.action,name:sale.process_transition_action_cancel2
#: wizard_button:sale.advance_payment_inv,init,end:0
#: view:sale.config.picking_policy:0 view:sale.order.line:0
#: view:sale.config.picking_policy:0
#: view:sale.order.line:0
#: wizard_button:sale.order.line.make_invoice,init,end:0
#: wizard_button:sale.order.make_invoice,init,end:0
msgid "Cancel"
@ -917,7 +930,8 @@ msgid ""
msgstr ""
#. module: sale
#: view:sale.order:0 view:sale.order.line:0
#: view:sale.order:0
#: view:sale.order.line:0
msgid "UoM"
msgstr "Ед. изм."
@ -1030,7 +1044,8 @@ msgid "Ordering Contact"
msgstr ""
#. module: sale
#: rml:sale.order:0 field:sale.order.line,name:0
#: rml:sale.order:0
#: field:sale.order.line,name:0
msgid "Description"
msgstr "Описание"
@ -1088,7 +1103,8 @@ msgstr ""
"Имя и адрес контакта, разместившего заказ или запросившего предолжение."
#. module: sale
#: field:sale.order,partner_id:0 field:sale.order.line,order_partner_id:0
#: field:sale.order,partner_id:0
#: field:sale.order.line,order_partner_id:0
msgid "Customer"
msgstr "Клиент"
@ -1100,7 +1116,8 @@ msgstr ""
#. module: sale
#: model:ir.model,name:sale.model_sale_order
#: model:process.node,name:sale.process_node_saleorder0
#: model:res.request.link,name:sale.req_link_sale_order view:sale.order:0
#: model:res.request.link,name:sale.req_link_sale_order
#: view:sale.order:0
#: field:stock.picking,sale_id:0
msgid "Sale Order"
msgstr "Заказ"
@ -1127,7 +1144,8 @@ msgid "Total amount"
msgstr "Итоговая сумма"
#. module: sale
#: rml:sale.order:0 field:sale.order,date_order:0
#: rml:sale.order:0
#: field:sale.order,date_order:0
msgid "Date Ordered"
msgstr "Дата заказа"
@ -1212,7 +1230,8 @@ msgstr ""
"позициям)."
#. module: sale
#: view:sale.order:0 view:sale.order.line:0
#: view:sale.order:0
#: view:sale.order.line:0
msgid "States"
msgstr "Cостояния"
@ -1232,7 +1251,8 @@ msgid "Error: Invalid ean code"
msgstr "Ошибка: Неправильный штрих-код"
#. module: sale
#: field:sale.order,picked_rate:0 field:sale.order,shipped:0
#: field:sale.order,picked_rate:0
#: field:sale.order,shipped:0
msgid "Picked"
msgstr ""
@ -1265,49 +1285,49 @@ msgstr "Позиция заказа"
#. module: sale
#: model:ir.module.module,shortdesc:sale.module_meta_information
msgid "Dashboard for sales"
msgstr "Панель для продаж"
msgstr ""
#. module: sale
#: model:ir.actions.act_window,name:sale.open_board_sales_manager
#: model:ir.ui.menu,name:sale.menu_board_sales_manager
msgid "Sale Dashboard"
msgstr "Панель аналитики продаж"
msgstr ""
#. module: sale
#: view:board.board:0
msgid "Sales of the month"
msgstr "Продажи месяца"
msgstr ""
#. module: sale
#: view:board.board:0
msgid "Sales manager board"
msgstr "Панель менеджера продаж"
msgstr ""
#. module: sale
#: view:board.board:0
msgid "Cases of the month"
msgstr "Случаи месяца"
msgstr ""
#. module: sale
#: view:board.board:0
msgid "My open quotations"
msgstr "Мои незакрытые предложения"
msgstr ""
#. module: sale
#: view:board.board:0
msgid "Cases statistics"
msgstr "Статистика случаев"
msgstr ""
#. module: sale
#: view:board.board:0
msgid "Top ten sales of the month"
msgstr "10 лучших продаж месяца"
msgstr ""
#. module: sale
#: field:report.sale.order.category,price_average:0
#: field:report.sale.order.product,price_average:0
msgid "Average Price"
msgstr "Средняя цена"
msgstr ""
#. module: sale
#: model:ir.model,name:sale.model_report_sale_order_created
@ -1317,7 +1337,7 @@ msgstr ""
#. module: sale
#: view:report.sale.order.category:0
msgid "Sales Orders by category"
msgstr "Клиентские заказы по категориям"
msgstr ""
#. module: sale
#: model:ir.report.custom,name:sale.ir_report_custom_6
@ -1328,7 +1348,7 @@ msgstr ""
#. module: sale
#: model:ir.model,name:sale.model_report_sale_order_product
msgid "Sales Orders by Products"
msgstr "Клиентские заказы по продукции"
msgstr ""
#. module: sale
#: model:ir.ui.menu,name:sale.ir_ui_menu1
@ -1345,30 +1365,30 @@ msgstr ""
#. module: sale
#: model:ir.ui.menu,name:sale.next_id_82
msgid "All Months"
msgstr "Все месяцы"
msgstr ""
#. module: sale
#: field:report.sale.order.category,price_total:0
#: field:report.sale.order.product,price_total:0
msgid "Total Price"
msgstr "Итоговая цена"
msgstr ""
#. module: sale
#: model:ir.model,name:sale.model_report_sale_order_category
msgid "Sales Orders by Categories"
msgstr "Клиентские заказы по категориям"
msgstr ""
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_sale_list
#: model:ir.ui.menu,name:sale.menu_report_order_sale_list
msgid "Sales of the Month"
msgstr "Продажи месяца"
msgstr ""
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_product_tree
#: model:ir.ui.menu,name:sale.menu_report_order_product
msgid "Sales by Product (this month)"
msgstr "Продужи по продуктам (тек. мес.)"
msgstr ""
#. module: sale
#: model:ir.report.custom,name:sale.ir_report_custom_4
@ -1386,7 +1406,7 @@ msgstr ""
#: model:ir.ui.menu,name:sale.menu_report_order_category_all
#: view:report.sale.order.category:0
msgid "Sales by Category of Products"
msgstr "Продажи по категриям продукции"
msgstr ""
#. module: sale
#: model:ir.ui.menu,name:sale.ir_ui_menu3
@ -1397,24 +1417,24 @@ msgstr ""
#: field:report.sale.order.category,quantity:0
#: field:report.sale.order.product,quantity:0
msgid "# of Products"
msgstr "Кол-во продукции"
msgstr ""
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_product_tree_all
#: model:ir.ui.menu,name:sale.menu_report_order_product_all
#: view:report.sale.order.product:0
msgid "Sales by Product"
msgstr "Продажи по продуктам"
msgstr ""
#. module: sale
#: model:ir.ui.menu,name:sale.next_id_81
msgid "This Month"
msgstr "Данный месяц"
msgstr ""
#. module: sale
#: field:report.sale.order.category,category_id:0
msgid "Categories"
msgstr "Категории"
msgstr ""
#. module: sale
#: model:ir.actions.act_window,name:sale.action_view_created_sale_order_dashboard
@ -1424,7 +1444,7 @@ msgstr ""
#. module: sale
#: model:ir.ui.menu,name:sale.next_id_80
msgid "Reporting"
msgstr "Отчетность"
msgstr ""
#. module: sale
#: model:ir.actions.act_window,name:sale.action_turnover_month_tree
@ -1441,13 +1461,13 @@ msgstr ""
#. module: sale
#: model:ir.ui.menu,name:sale.next_id_83
msgid "Graphs"
msgstr "Графики"
msgstr ""
#. module: sale
#: selection:report.sale.order.category,state:0
#: selection:report.sale.order.product,state:0
msgid "Manual in progress"
msgstr "Выполняется вручную"
msgstr ""
#. module: sale
#: field:report.turnover.per.month,turnover:0
@ -1465,7 +1485,7 @@ msgstr "Выполняется"
#: model:ir.actions.act_window,name:sale.action_order_category_tree
#: model:ir.ui.menu,name:sale.menu_report_order_category
msgid "Sales by Category of Product (this month)"
msgstr "Продажи по категории продукции (тек.мес.)"
msgstr ""
#. module: sale
#: model:ir.report.custom,name:sale.ir_report_custom_5
@ -1478,13 +1498,13 @@ msgstr ""
#: field:report.sale.order.product,name:0
#: field:report.turnover.per.month,name:0
msgid "Month"
msgstr "Месяц"
msgstr ""
#. module: sale
#: field:report.sale.order.category,count:0
#: field:report.sale.order.product,count:0
msgid "# of Lines"
msgstr "Кол-во позиций"
msgstr ""
#. module: sale
#: field:report.sale.order.created,create_date:0

View File

@ -23,7 +23,6 @@ import time
from osv import fields, osv
class sale_order_line(osv.osv):
_name = 'sale.order.line'
_inherit = 'sale.order.line'
_columns = {
'analytics_id':fields.many2one('account.analytic.plan.instance','Analytic Distribution'),

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<openerp>
<data>
<data>
<record model="ir.ui.view" id="view_order_form_inherit">
<field name="name">sale.order.form.inherit</field>
@ -36,5 +36,5 @@
</field>
</record>
</data>
</data>
</openerp>

View File

@ -1,47 +1,48 @@
<?xml version="1.0"?>
<openerp>
<data>
<data>
<record model="ir.ui.view" id="crm_case_form_view_oppor">
<field name="name">CRM - Opportunities - Quote Inherit</field>
<field name="model">crm.lead</field>
<field name="type">form</field>
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
<field name="arch" type="xml">
<field name="priority" position="after">
<button string="Convert to Sale" icon="gtk-go-forward" name="%(action_crm_make_sale)d" type="action"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="crm_case_form_view_oppor">
<field name="name">CRM - Opportunities - Quote Inherit</field>
<field name="model">crm.lead</field>
<field name="type">form</field>
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
<field name="arch" type="xml">
<field name="priority" position="after">
<button string="Convert to Sale" icon="gtk-go-forward" name="%(action_crm_make_sale)d" type="action"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="sale_view_inherit123">
<field name="name">sale.order.inherit</field>
<field name="model">sale.order</field>
<field name="type">form</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="section_id" widget="selection" groups="base.group_extended"/>
</field>
</field>
</record>
<record id="view_sales_order_filter_inherit" model="ir.ui.view">
<field name="name">sale.order.list.select</field>
<field name="model">sale.order</field>
<field name="type">search</field>
<field name="inherit_id" ref="sale.view_sales_order_filter"/>
<field name="arch" type="xml">
<field name="date_order" position="after">
<field name="section_id" default="context.get('section_id', False)" widget="selection" string="Sale Team" groups="base.group_extended">
<filter icon="terp-personal+"
domain="[('section_id.user_id','=',uid)]"
groups="base.group_extended"
help="My Sales Team"/>
</field>
</field>
</field>
</record>
</data>
<record model="ir.ui.view" id="sale_view_inherit123">
<field name="name">sale.order.inherit</field>
<field name="model">sale.order</field>
<field name="type">form</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="section_id" widget="selection" groups="base.group_extended"/>
</field>
</field>
</record>
<record id="view_sales_order_filter_inherit" model="ir.ui.view">
<field name="name">sale.order.list.select</field>
<field name="model">sale.order</field>
<field name="type">search</field>
<field name="inherit_id" ref="sale.view_sales_order_filter"/>
<field name="arch" type="xml">
<field name="date_order" position="after">
<field name="section_id" default="context.get('section_id', False)" widget="selection" string="Sale Team" groups="base.group_extended">
<filter icon="terp-personal+"
domain="[('section_id.user_id','=',uid)]"
groups="base.group_extended"
help="My Sales Team"/>
</field>
</field>
</field>
</record>
</data>
</openerp>

Some files were not shown because too many files have changed in this diff Show More