[MERGE] merged the dev3 branch

bzr revid: qdp-launchpad@tinyerp.com-20101220111253-4vrzuc73l0fogj6b
This commit is contained in:
qdp-launchpad@tinyerp.com 2010-12-20 12:12:53 +01:00
commit 78376fc6a3
162 changed files with 1152 additions and 796 deletions

View File

@ -287,20 +287,20 @@ class account_account(osv.osv):
sums = {} sums = {}
while brs: while brs:
current = brs[0] current = brs[0]
can_compute = True # can_compute = True
for child in current.child_id: # for child in current.child_id:
if child.id not in sums: # if child.id not in sums:
can_compute = False # can_compute = False
try: # try:
brs.insert(0, brs.pop(brs.index(child))) # brs.insert(0, brs.pop(brs.index(child)))
except ValueError: # except ValueError:
brs.insert(0, child) # brs.insert(0, child)
if can_compute: # if can_compute:
brs.pop(0) brs.pop(0)
for fn in field_names: for fn in field_names:
sums.setdefault(current.id, {})[fn] = accounts.get(current.id, {}).get(fn, 0.0) sums.setdefault(current.id, {})[fn] = accounts.get(current.id, {}).get(fn, 0.0)
if current.child_id: if current.child_id:
sums[current.id][fn] += sum(sums[child.id][fn] for child in current.child_id) sums[current.id][fn] += sum(sums[child.id][fn] for child in current.child_id)
res = {} res = {}
null_result = dict((fn, 0.0) for fn in field_names) null_result = dict((fn, 0.0) for fn in field_names)
for id in ids: for id in ids:
@ -627,10 +627,13 @@ class account_journal(osv.osv):
return super(account_journal, self).copy(cr, uid, id, default, context=context) return super(account_journal, self).copy(cr, uid, id, default, context=context)
def write(self, cr, uid, ids, vals, context=None): def write(self, cr, uid, ids, vals, context=None):
if 'company_id' in vals: if context is None:
move_lines = self.pool.get('account.move.line').search(cr, uid, [('journal_id', 'in', ids)]) context = {}
if move_lines: for journal in self.browse(cr, uid, ids, context=context):
raise osv.except_osv(_('Warning !'), _('You cannot modify company of this journal as its related record exist in Entry Lines')) if 'company_id' in vals and journal.company_id.id != vals['company_id']:
move_lines = self.pool.get('account.move.line').search(cr, uid, [('journal_id', 'in', ids)])
if move_lines:
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) return super(account_journal, self).write(cr, uid, ids, vals, context=context)
def create_sequence(self, cr, uid, vals, context=None): def create_sequence(self, cr, uid, vals, context=None):
@ -722,7 +725,7 @@ class account_journal(osv.osv):
res = {} res = {}
view_id = type_map.get(type, 'general') view_id = type_map.get(type, 'account_journal_view')
user = user_pool.browse(cr, uid, uid) user = user_pool.browse(cr, uid, uid)
if type in ('cash', 'bank') and currency and user.company_id.currency_id.id != currency: if type in ('cash', 'bank') and currency and user.company_id.currency_id.id != currency:
@ -2677,7 +2680,8 @@ class wizard_multi_charts_accounts(osv.osv_memory):
tax_template_ref[tax.id] = new_tax tax_template_ref[tax.id] = new_tax
#deactivate the parent_store functionnality on account_account for rapidity purpose #deactivate the parent_store functionnality on account_account for rapidity purpose
self.pool._init = True ctx = context and context.copy() or {}
ctx['defer_parent_store_computation'] = True
children_acc_template = obj_acc_template.search(cr, uid, [('parent_id','child_of',[obj_acc_root.id]),('nocreate','!=',True)]) children_acc_template = obj_acc_template.search(cr, uid, [('parent_id','child_of',[obj_acc_root.id]),('nocreate','!=',True)])
children_acc_template.sort() children_acc_template.sort()
@ -2705,17 +2709,16 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'tax_ids': [(6,0,tax_ids)], 'tax_ids': [(6,0,tax_ids)],
'company_id': company_id, 'company_id': company_id,
} }
new_account = obj_acc.create(cr, uid, vals) new_account = obj_acc.create(cr, uid, vals, context=ctx)
acc_template_ref[account_template.id] = new_account acc_template_ref[account_template.id] = new_account
#reactivate the parent_store functionnality on account_account #reactivate the parent_store functionnality on account_account
self.pool._init = False
self.pool.get('account.account')._parent_store_compute(cr) self.pool.get('account.account')._parent_store_compute(cr)
for key,value in todo_dict.items(): for key,value in todo_dict.items():
if value['account_collected_id'] or value['account_paid_id']: if value['account_collected_id'] or value['account_paid_id']:
obj_acc_tax.write(cr, uid, [key], { obj_acc_tax.write(cr, uid, [key], {
'account_collected_id': acc_template_ref[value['account_collected_id']], 'account_collected_id': acc_template_ref.get(value['account_collected_id'], False),
'account_paid_id': acc_template_ref[value['account_paid_id']], 'account_paid_id': acc_template_ref.get(value['account_paid_id'], False),
}) })
# Creating Journals Sales and Purchase # Creating Journals Sales and Purchase
@ -2856,7 +2859,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'name': tmp, 'name': tmp,
'currency_id': line.currency_id and line.currency_id.id or False, 'currency_id': line.currency_id and line.currency_id.id or False,
'code': new_code, 'code': new_code,
'type': 'other', 'type': 'liquidity',
'user_type': account_template.user_type and account_template.user_type.id or False, 'user_type': account_template.user_type and account_template.user_type.id or False,
'reconcile': True, 'reconcile': True,
'parent_id': acc_template_ref[ref_acc_bank.id] or False, 'parent_id': acc_template_ref[ref_acc_bank.id] or False,
@ -2878,7 +2881,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
vals_journal['name']= vals['name'] vals_journal['name']= vals['name']
vals_journal['code']= _('BNK') + str(current_num) vals_journal['code']= _('BNK') + str(current_num)
vals_journal['sequence_id'] = seq_id vals_journal['sequence_id'] = seq_id
vals_journal['type'] = 'cash' vals_journal['type'] = line.account_type == 'cash' and 'cash' or 'bank'
vals_journal['company_id'] = company_id vals_journal['company_id'] = company_id
vals_journal['analytic_journal_id'] = analitical_journal_bank vals_journal['analytic_journal_id'] = analitical_journal_bank

View File

@ -31,9 +31,9 @@ class account_analytic_line(osv.osv):
_columns = { _columns = {
'product_uom_id': fields.many2one('product.uom', 'UoM'), 'product_uom_id': fields.many2one('product.uom', 'UoM'),
'product_id': fields.many2one('product.product', 'Product'), 'product_id': fields.many2one('product.product', 'Product'),
'general_account_id': fields.many2one('account.account', 'General Account', required=True, ondelete='cascade'), 'general_account_id': fields.many2one('account.account', 'General Account', required=True, ondelete='restrict'),
'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='cascade', select=True), 'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='restrict', select=True),
'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='cascade', select=True), 'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='restrict', select=True),
'code': fields.char('Code', size=8), 'code': fields.char('Code', size=8),
'ref': fields.char('Ref.', size=64), 'ref': fields.char('Ref.', size=64),
'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account currency', store=True, help="The related account currency if not equal to the company one.", readonly=True), 'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account currency', store=True, help="The related account currency if not equal to the company one.", readonly=True),

View File

@ -432,7 +432,7 @@ class account_bank_statement_line(osv.osv):
_columns = { _columns = {
'name': fields.char('Communication', size=64, required=True), 'name': fields.char('Communication', size=64, required=True),
'date': fields.date('Date', required=True), 'date': fields.date('Date', required=True),
'amount': fields.float('Amount'), 'amount': fields.float('Amount', digits_compute=dp.get_precision('Account')),
'type': fields.selection([ 'type': fields.selection([
('supplier','Supplier'), ('supplier','Supplier'),
('customer','Customer'), ('customer','Customer'),

View File

@ -302,7 +302,7 @@
<field name="amount_total"/> <field name="amount_total"/>
<field name="state"/> <field name="state"/>
<field name="residual"/> <field name="residual"/>
<group col="7" colspan="4" groups="base.group_user"> <group col="8" colspan="4" groups="base.group_user">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/> <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" icon="terp-stock_effects-object-colorize"/> <button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
@ -310,6 +310,7 @@
<button name='%(action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="base.group_no_one"/> <button name='%(action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert" groups="base.group_no_one"/>
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-gtk-media-pause" groups="account.group_account_user"/> <button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-gtk-media-pause" groups="account.group_account_user"/>
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-go-forward"/> <button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-go-forward"/>
<button name="%(account_invoices)d" string="Print Invoice" type="action" icon="gtk-print"/>
</group> </group>
</group> </group>
</page> </page>
@ -473,7 +474,7 @@
<field name="domain">[('type','=','out_refund')]</field> <field name="domain">[('type','=','out_refund')]</field>
<field name="context">{'type':'out_refund', 'journal_type': 'sale_refund'}</field> <field name="context">{'type':'out_refund', 'journal_type': 'sale_refund'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/> <field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">Customer Refunds helps you manage the credit notes issued/to be issued for your customers. A refund invoice is a document that cancels an invoice or a part of it. You can easily generate refunds and reconcile them from the invoice form.</field> <field name="help">This menu helps you manage the credit notes issued/to be issued for your customers. A refund invoice is a document that cancels an invoice or a part of it. You can easily generate refunds and reconcile them from the invoice form.</field>
</record> </record>
<record id="action_invoice_tree3_view1" model="ir.actions.act_window.view"> <record id="action_invoice_tree3_view1" model="ir.actions.act_window.view">
@ -499,7 +500,7 @@
<field name="domain">[('type','=','in_refund')]</field> <field name="domain">[('type','=','in_refund')]</field>
<field name="context">{'type':'in_refund', 'journal_type': 'purchase_refund'}</field> <field name="context">{'type':'in_refund', 'journal_type': 'purchase_refund'}</field>
<field name="search_view_id" ref="view_account_invoice_filter"/> <field name="search_view_id" ref="view_account_invoice_filter"/>
<field name="help">A vendor refund is a credit note from your supplier indicating that he refunds part or totality of the invoice sent to you.</field> <field name="help">A supplier refund is a credit note from your supplier indicating that he refunds part or totality of the invoice sent to you.</field>
</record> </record>
<menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="menu_finance_payables"/> <menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="menu_finance_payables"/>

View File

@ -6,22 +6,23 @@
groups="group_account_user,group_account_manager,group_account_invoice" groups="group_account_user,group_account_manager,group_account_invoice"
web_icon="images/accounting.png" web_icon="images/accounting.png"
web_icon_hover="images/accounting-hover.png"/> web_icon_hover="images/accounting-hover.png"/>
<menuitem id="menu_finance_receivables" name="Customers" parent="menu_finance" sequence="1"/> <menuitem id="menu_partners" name="Partners" parent="menu_finance" sequence="1"/>
<menuitem id="menu_finance_payables" name="Suppliers" parent="menu_finance" sequence="2"/> <menuitem id="menu_finance_receivables" name="Customers" parent="menu_finance" sequence="2"/>
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="3" <menuitem id="menu_finance_payables" name="Suppliers" parent="menu_finance" sequence="3"/>
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="4"
groups="group_account_user,group_account_manager"/> groups="group_account_user,group_account_manager"/>
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user,group_account_manager"/> <menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="9" groups="group_account_user,group_account_manager"/>
<!-- This menu is used in account_code module --> <!-- This menu is used in account_code module -->
<menuitem id="menu_account_pp_statements" name="Statements" parent="menu_finance_periodical_processing" sequence="12"/> <menuitem id="menu_account_pp_statements" name="Statements" parent="menu_finance_periodical_processing" sequence="12"/>
<menuitem id="periodical_processing_journal_entries_validation" name="Draft Entries" parent="menu_finance_periodical_processing"/> <menuitem id="periodical_processing_journal_entries_validation" name="Draft Entries" parent="menu_finance_periodical_processing"/>
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/> <menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/> <menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="5"/> <menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="6"/>
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12"/> <menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="13"/>
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting" groups="group_account_user"/> <menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting" groups="group_account_user"/>
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/> <menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/> <menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="13" groups="group_account_manager"/> <menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="14" groups="group_account_manager"/>
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/> <menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration" groups="analytic.group_analytic_accounting"/> <menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration" groups="analytic.group_analytic_accounting"/>
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts" groups="analytic.group_analytic_accounting"/> <menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts" groups="analytic.group_analytic_accounting"/>
@ -29,7 +30,7 @@
<menuitem id="menu_configuration_misc" name="Miscellaneous" parent="menu_finance_configuration" sequence="30" groups="group_account_manager"/> <menuitem id="menu_configuration_misc" name="Miscellaneous" parent="menu_finance_configuration" sequence="30" groups="group_account_manager"/>
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/> <menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
<menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100"/> <menuitem id="menu_finance_generic_reporting" name="Generic Reporting" parent="menu_finance_reporting" sequence="100"/>
<menuitem id="menu_finance_entries" name="Journal Entries" parent="menu_finance" sequence="4" groups="group_account_user,group_account_manager"/> <menuitem id="menu_finance_entries" name="Journal Entries" parent="menu_finance" sequence="5" groups="group_account_user,group_account_manager"/>
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15" groups="base.group_extended,group_account_manager,group_account_user"/> <menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15" groups="base.group_extended,group_account_manager,group_account_user"/>
<menuitem id="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing" groups="group_account_manager,group_account_user" sequence="25"/> <menuitem id="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing" groups="group_account_manager,group_account_user" sequence="25"/>

View File

@ -308,7 +308,7 @@ class account_move_line(osv.osv):
FROM account_move_line l1, account_move_line l2 FROM account_move_line l1, account_move_line l2
WHERE l2.account_id = l1.account_id WHERE l2.account_id = l1.account_id
AND l1.id <= l2.id AND l1.id <= l2.id
AND l2.id IN %%s AND """ + \ AND l2.id IN %s AND """ + \
self._query_get(cr, uid, obj='l1', context=c) + \ self._query_get(cr, uid, obj='l1', context=c) + \
" GROUP BY l2.id" " GROUP BY l2.id"
@ -433,7 +433,7 @@ class account_move_line(osv.osv):
'period_id': fields.many2one('account.period', 'Period', required=True, select=2), 'period_id': fields.many2one('account.period', 'Period', required=True, select=2),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, select=1), 'journal_id': fields.many2one('account.journal', 'Journal', required=True, select=1),
'blocked': fields.boolean('Litigation', help="You can check this box to mark this journal item as a litigation with the associated partner"), 'blocked': fields.boolean('Litigation', help="You can check this box to mark this journal item as a litigation with the associated partner"),
'partner_id': fields.many2one('res.partner', 'Partner', select=1), 'partner_id': fields.many2one('res.partner', 'Partner', select=1, ondelete='restrict'),
'date_maturity': fields.date('Due date', help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line."), 'date_maturity': fields.date('Due date', help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line."),
'date': fields.related('move_id','date', string='Effective date', type='date', required=True, 'date': fields.related('move_id','date', string='Effective date', type='date', required=True,
store = { store = {
@ -763,7 +763,7 @@ class account_move_line(osv.osv):
if 'comment' in context and context['comment']: if 'comment' in context and context['comment']:
libelle = context['comment'] libelle = context['comment']
else: else:
libelle = 'Write-Off' libelle = _('Write-Off')
writeoff_lines = [ writeoff_lines = [
(0, 0, { (0, 0, {
'name': libelle, 'name': libelle,

View File

@ -18,7 +18,8 @@
rml="account/report/account_print_invoice.rml" rml="account/report/account_print_invoice.rml"
string="Invoices" string="Invoices"
attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/',''))" attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/',''))"
attachment_use="1"/> attachment_use="1"
multi="True"/>
<report id="account_transfers" model="account.transfer" name="account.transfer" string="Transfers" xml="account/report/transfer.xml" xsl="account/report/transfer.xsl"/> <report id="account_transfers" model="account.transfer" name="account.transfer" string="Transfers" xml="account/report/transfer.xml" xsl="account/report/transfer.xsl"/>
<report auto="False" id="account_intracom" menu="False" model="account.move.line" name="account.intracom" string="IntraCom"/> <report auto="False" id="account_intracom" menu="False" model="account.move.line" name="account.intracom" string="IntraCom"/>

View File

@ -76,7 +76,7 @@
<field name="name">Fiscal Years</field> <field name="name">Fiscal Years</field>
<field name="res_model">account.fiscalyear</field> <field name="res_model">account.fiscalyear</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,search</field> <field name="view_mode">tree,form</field>
<field name="help">Define your company's fiscal year depending on the period you have chosen to follow. A fiscal year is a 1 year period over which a company budgets its spending. It may run over any period of 12 months. The fiscal year is referred to by the date in which it ends. For example, if a company's fiscal year ends November 30, 2011, then everything between December 1, 2010 and November 30, 2011 would be referred to as FY 2011. Not using the actual calendar year gives many companies an advantage, allowing them to close their books at a time which is most convenient for them.</field> <field name="help">Define your company's fiscal year depending on the period you have chosen to follow. A fiscal year is a 1 year period over which a company budgets its spending. It may run over any period of 12 months. The fiscal year is referred to by the date in which it ends. For example, if a company's fiscal year ends November 30, 2011, then everything between December 1, 2010 and November 30, 2011 would be referred to as FY 2011. Not using the actual calendar year gives many companies an advantage, allowing them to close their books at a time which is most convenient for them.</field>
</record> </record>
<menuitem id="next_id_23" name="Periods" parent="account.menu_finance_accounting" sequence="8" /> <menuitem id="next_id_23" name="Periods" parent="account.menu_finance_accounting" sequence="8" />
@ -143,7 +143,7 @@
<field name="name">Periods</field> <field name="name">Periods</field>
<field name="res_model">account.period</field> <field name="res_model">account.period</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,search</field> <field name="view_mode">tree,form</field>
<field name="context">{'search_default_draft': 1}</field> <field name="context">{'search_default_draft': 1}</field>
<field name="help">Here, you can define a period, an interval of time between successive closings of the books of your company. An accounting period typically is a month or a quarter, corresponding to the tax year used by the business. Create and manage them from here and decide whether a period should be left open or closed depending on your company's activities over a specific period.</field> <field name="help">Here, you can define a period, an interval of time between successive closings of the books of your company. An accounting period typically is a month or a quarter, corresponding to the tax year used by the business. Create and manage them from here and decide whether a period should be left open or closed depending on your company's activities over a specific period.</field>
</record> </record>
@ -698,7 +698,7 @@
<field name="name">Draft statements</field> <field name="name">Draft statements</field>
<field name="res_model">account.bank.statement</field> <field name="res_model">account.bank.statement</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,search</field> <field name="view_mode">tree,form</field>
<field name="domain">[('state','=','draft')]</field> <field name="domain">[('state','=','draft')]</field>
<field name="filter" eval="True"/> <field name="filter" eval="True"/>
</record> </record>
@ -946,7 +946,14 @@
<field groups="base.group_extended" name="child_depend"/> <field groups="base.group_extended" name="child_depend"/>
<field groups="base.group_extended" name="sequence"/> <field groups="base.group_extended" name="sequence"/>
<field groups="base.group_extended" name="include_base_amount"/> <field groups="base.group_extended" name="include_base_amount"/>
<field groups="base.group_extended" colspan="4" name="child_ids"/> <field groups="base.group_extended" colspan="4" name="child_ids">
<tree string="Account Tax">
<field name="sequence"/>
<field name="name"/>
<field name="price_include" groups="base.group_extended"/>
<field name="description"/>
</tree>
</field>
</group> </group>
</page> </page>
<page groups="base.group_extended" string="Special Computation"> <page groups="base.group_extended" string="Special Computation">
@ -1163,7 +1170,7 @@
<filter icon="terp-document-new" string="Unbalanced" domain="[('state','=','draft')]" help="Unbalanced Journal Items"/> <filter icon="terp-document-new" string="Unbalanced" domain="[('state','=','draft')]" help="Unbalanced Journal Items"/>
<separator orientation="vertical"/> <separator orientation="vertical"/>
<filter icon="terp-document-new" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/> <filter icon="terp-document-new" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/>
<filter icon="terp-camera_test" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Journal Items"/> <filter name="posted" icon="terp-camera_test" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Journal Items"/>
<separator orientation="vertical"/> <separator orientation="vertical"/>
<filter <filter
icon="terp-dolar_ok!" icon="terp-dolar_ok!"
@ -1209,6 +1216,7 @@
<field name="res_model">account.move.line</field> <field name="res_model">account.move.line</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="context">{'search_default_posted': 1}</field>
<field name="search_view_id" ref="view_account_move_line_filter"/> <field name="search_view_id" ref="view_account_move_line_filter"/>
<field name="help">This view is used by accountants in order to record entries massively in OpenERP. If you want to record a supplier invoice, start by recording the line of the expense account, OpenERP will propose to you automatically the Tax related to this account and the counter-part "Account Payable".</field> <field name="help">This view is used by accountants in order to record entries massively in OpenERP. If you want to record a supplier invoice, start by recording the line of the expense account, OpenERP will propose to you automatically the Tax related to this account and the counter-part "Account Payable".</field>
</record> </record>
@ -1729,7 +1737,7 @@
<field name="name">Recurring Models</field> <field name="name">Recurring Models</field>
<field name="res_model">account.model</field> <field name="res_model">account.model</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,search</field> <field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_model_search"/> <field name="search_view_id" ref="view_model_search"/>
</record> </record>
<menuitem <menuitem
@ -2153,7 +2161,8 @@
<filter icon="terp-sale" string="Receivale Accounts" domain="[('type','=','receivable')]"/> <filter icon="terp-sale" string="Receivale Accounts" domain="[('type','=','receivable')]"/>
<filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/> <filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
<separator orientation="vertical"/> <separator orientation="vertical"/>
<field name="code"/> <field name="code"/>
<field name="name"/>
<field name="parent_id"/> <field name="parent_id"/>
<field name="type"/> <field name="type"/>
<field name="user_type"/> <field name="user_type"/>
@ -2171,7 +2180,7 @@
<field name="name">Account Templates</field> <field name="name">Account Templates</field>
<field name="res_model">account.account.template</field> <field name="res_model">account.account.template</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,search</field> <field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_account_template_search"/> <field name="search_view_id" ref="view_account_template_search"/>
</record> </record>
@ -2194,13 +2203,13 @@
<field name="tax_template_ids" colspan="4" readonly="1" nolabel="1"/> <field name="tax_template_ids" colspan="4" readonly="1" nolabel="1"/>
<separator string="Properties" colspan="4"/> <separator string="Properties" colspan="4"/>
<group> <group>
<field name="property_account_receivable"/> <field name="property_account_receivable" domain="[('id', 'child_of', [account_root_id])]"/>
<field name="property_account_payable"/> <field name="property_account_payable" domain="[('id', 'child_of', [account_root_id])]"/>
<field name="property_account_expense_categ" /> <field name="property_account_expense_categ" domain="[('id', 'child_of', [account_root_id])]"/>
<field name="property_account_income_categ"/> <field name="property_account_income_categ" domain="[('id', 'child_of', [account_root_id])]" />
<field name="property_account_expense"/> <field name="property_account_expense" domain="[('id', 'child_of', [account_root_id])]"/>
<field name="property_account_income"/> <field name="property_account_income" domain="[('id', 'child_of', [account_root_id])]"/>
<field name="property_reserve_and_surplus_account"/> <field name="property_reserve_and_surplus_account" />
</group> </group>
</form> </form>
</field> </field>
@ -2251,7 +2260,7 @@
<field name="name">Chart of Accounts Templates</field> <field name="name">Chart of Accounts Templates</field>
<field name="res_model">account.chart.template</field> <field name="res_model">account.chart.template</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,search</field> <field name="view_mode">tree,form</field>
</record> </record>
<menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts" sequence="1"/> <menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts" sequence="1"/>
@ -2406,7 +2415,7 @@
<field name="name">Tax Code Templates</field> <field name="name">Tax Code Templates</field>
<field name="res_model">account.tax.code.template</field> <field name="res_model">account.tax.code.template</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,search</field> <field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_tax_code_template_search"/> <field name="search_view_id" ref="view_tax_code_template_search"/>
</record> </record>
<menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="account_template_taxes" sequence="14"/> <menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="account_template_taxes" sequence="14"/>
@ -2437,7 +2446,7 @@
<attribute name='string'></attribute> <attribute name='string'></attribute>
</xpath> </xpath>
<group string="res_config_contents" position="replace"> <group string="res_config_contents" position="replace">
<field name="company_id" widget="selection"/> <field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name ="code_digits" groups="base.group_extended"/> <field name ="code_digits" groups="base.group_extended"/>
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)"/> <field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)"/>
<field name ="seq_journal" groups="base.group_extended"/> <field name ="seq_journal" groups="base.group_extended"/>
@ -2745,5 +2754,19 @@ action = self.pool.get('res.config').next(cr, uid, [], context)
<menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines" parent="menu_finance_bank_and_cash" <menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines" parent="menu_finance_bank_and_cash"
groups="group_account_user,group_account_manager"/> groups="group_account_user,group_account_manager"/>
<record id="action_partner_all" model="ir.actions.act_window">
<field name="name">Partners</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner</field>
<field name="view_type">form</field>
<field name="filter" eval="True"/>
</record>
<menuitem id="menu_partners_partners"
name="Partners"
parent="menu_partners"
action="action_partner_all"
sequence="1"/>
</data> </data>
</openerp> </openerp>

View File

@ -68,7 +68,7 @@
<menuitem id="menu_dashboard_acc" name="Dashboard" sequence="2" parent="account.menu_finance_reporting" groups="group_account_user,group_account_manager"/> <menuitem id="menu_dashboard_acc" name="Dashboard" sequence="2" parent="account.menu_finance_reporting" groups="group_account_user,group_account_manager"/>
<menuitem action="open_board_account" icon="terp-graph" id="menu_board_account" parent="menu_dashboard_acc" sequence="1"/> <menuitem action="open_board_account" icon="terp-graph" id="menu_board_account" parent="menu_dashboard_acc" sequence="1"/>
<menuitem icon="terp-account" id="account.menu_finance" name="Accounting" sequence="13" action="open_board_account"/> <menuitem icon="terp-account" id="account.menu_finance" name="Accounting" sequence="14" action="open_board_account"/>
</data> </data>

View File

@ -37,9 +37,10 @@ class res_company(osv.osv):
} }
_defaults = { _defaults = {
'overdue_msg': 'Would your payment have been carried \ 'overdue_msg': 'Please note that the following payments are now due. If your payment \
out after this mail was sent, please consider the present one as \ has been sent, kindly forward your payment details. If payment will be \
void. Do not hesitate to contact our accounting department' delayed further, please contact us to discuss. \
\nWould your payment have been carried out after this mail was sent, please consider the present one as void.'
} }
res_company() res_company()

View File

@ -964,11 +964,6 @@ msgstr ""
msgid "Landscape Mode" msgid "Landscape Mode"
msgstr "" msgstr ""
#. module: account
#: model:account.account.type,name:account.account_type_liability
msgid "Bilanzkonten - Passiva - Kapitalkonten"
msgstr ""
#. module: account #. module: account
#: view:board.board:0 #: view:board.board:0
msgid "Customer Invoices to Approve" msgid "Customer Invoices to Approve"
@ -1859,7 +1854,7 @@ msgstr ""
#. module: account #. module: account
#: model:ir.actions.act_window,help:account.action_invoice_tree4 #: model:ir.actions.act_window,help:account.action_invoice_tree4
msgid "A vendor refund is a credit note from your supplier indicating that he refunds part or totality of the invoice sent to you." msgid "A supplier refund is a credit note from your supplier indicating that he refunds part or totality of the invoice sent to you."
msgstr "" msgstr ""
#. module: account #. module: account
@ -2543,11 +2538,6 @@ msgstr ""
msgid "Base Code Amount" msgid "Base Code Amount"
msgstr "" msgstr ""
#. module: account
#: model:account.account.type,name:account.account_type_view
msgid "Ansicht"
msgstr ""
#. module: account #. module: account
#: field:wizard.multi.charts.accounts,sale_tax:0 #: field:wizard.multi.charts.accounts,sale_tax:0
msgid "Default Sale Tax" msgid "Default Sale Tax"

View File

@ -95,6 +95,25 @@ class account_installer(osv.osv_memory):
'bank_accounts_id': _get_default_accounts, 'bank_accounts_id': _get_default_accounts,
'charts': _get_default_charts 'charts': _get_default_charts
} }
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
res = super(account_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
configured_cmp = []
unconfigured_cmp = []
cmp_select = []
company_ids = self.pool.get('res.company').search(cr, uid, [], context=context)
cr.execute("SELECT company_id FROM account_account WHERE account_account.parent_id IS NULL")
for r in cr.fetchall():
configured_cmp.append(r[0])
unconfigured_cmp = list(set(company_ids)-set(configured_cmp))
if unconfigured_cmp:
for line in self.pool.get('res.company').browse(cr, uid, unconfigured_cmp):
cmp_select.append((line.id,line.name))
for field in res['fields']:
if field == 'company_id':
res['fields'][field]['domain'] = unconfigured_cmp
res['fields'][field]['selection'] = cmp_select
return res
def on_change_tax(self, cr, uid, id, tax): def on_change_tax(self, cr, uid, id, tax):
return {'value': {'purchase_tax': tax}} return {'value': {'purchase_tax': tax}}
@ -200,7 +219,8 @@ class account_installer(osv.osv_memory):
tax_template_ref[tax.id] = new_tax tax_template_ref[tax.id] = new_tax
#deactivate the parent_store functionnality on account_account for rapidity purpose #deactivate the parent_store functionnality on account_account for rapidity purpose
self.pool._init = True ctx = context and context.copy() or {}
ctx['defer_parent_store_computation'] = True
children_acc_template = obj_acc_template.search(cr, uid, [('parent_id', 'child_of', [obj_acc_root.id]), ('nocreate', '!=', True)], context=context) children_acc_template = obj_acc_template.search(cr, uid, [('parent_id', 'child_of', [obj_acc_root.id]), ('nocreate', '!=', True)], context=context)
children_acc_template.sort() children_acc_template.sort()
@ -229,7 +249,7 @@ class account_installer(osv.osv_memory):
'tax_ids': [(6, 0, tax_ids)], 'tax_ids': [(6, 0, tax_ids)],
'company_id': company_id.id, 'company_id': company_id.id,
} }
new_account = obj_acc.create(cr, uid, vals, context=context) new_account = obj_acc.create(cr, uid, vals, context=ctx)
acc_template_ref[account_template.id] = new_account acc_template_ref[account_template.id] = new_account
if account_template.name == 'Bank Current Account': if account_template.name == 'Bank Current Account':
b_vals = { b_vals = {
@ -243,8 +263,7 @@ class account_installer(osv.osv_memory):
'tax_ids': [(6,0,tax_ids)], 'tax_ids': [(6,0,tax_ids)],
'company_id': company_id.id, 'company_id': company_id.id,
} }
bank_account = obj_acc.create(cr, uid, b_vals, context=context) bank_account = obj_acc.create(cr, uid, b_vals, context=ctx)
view_id_cash = obj_acc_journal_view.search(cr, uid, [('name', '=', 'Bank/Cash Journal View')], context=context)[0] #why fixed name here? view_id_cash = obj_acc_journal_view.search(cr, uid, [('name', '=', 'Bank/Cash Journal View')], context=context)[0] #why fixed name here?
view_id_cur = obj_acc_journal_view.search(cr, uid, [('name', '=', 'Bank/Cash Journal (Multi-Currency) View')], context=context)[0] #Why Fixed name here? view_id_cur = obj_acc_journal_view.search(cr, uid, [('name', '=', 'Bank/Cash Journal (Multi-Currency) View')], context=context)[0] #Why Fixed name here?
@ -314,7 +333,7 @@ class account_installer(osv.osv_memory):
'parent_id': bank_account, 'parent_id': bank_account,
'company_id': company_id.id 'company_id': company_id.id
} }
child_bnk_acc = obj_acc.create(cr, uid, vals_bnk, context=context) child_bnk_acc = obj_acc.create(cr, uid, vals_bnk, context=ctx)
vals_seq_child = { vals_seq_child = {
'name': _(vals_bnk['name'] + ' ' + 'Journal'), 'name': _(vals_bnk['name'] + ' ' + 'Journal'),
'code': 'account.journal', 'code': 'account.journal',
@ -348,7 +367,6 @@ class account_installer(osv.osv_memory):
code_cnt += 1 code_cnt += 1
#reactivate the parent_store functionality on account_account #reactivate the parent_store functionality on account_account
self.pool._init = False
obj_acc._parent_store_compute(cr) obj_acc._parent_store_compute(cr)
for key, value in todo_dict.items(): for key, value in todo_dict.items():

View File

@ -268,21 +268,21 @@ class account_invoice(osv.osv):
store={ store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20), 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
'account.invoice.tax': (_get_invoice_tax, None, 20), 'account.invoice.tax': (_get_invoice_tax, None, 20),
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount'], 20), 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
}, },
multi='all'), multi='all'),
'amount_tax': fields.function(_amount_all, method=True, digits_compute=dp.get_precision('Account'), string='Tax', 'amount_tax': fields.function(_amount_all, method=True, digits_compute=dp.get_precision('Account'), string='Tax',
store={ store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20), 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
'account.invoice.tax': (_get_invoice_tax, None, 20), 'account.invoice.tax': (_get_invoice_tax, None, 20),
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount'], 20), 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
}, },
multi='all'), multi='all'),
'amount_total': fields.function(_amount_all, method=True, digits_compute=dp.get_precision('Account'), string='Total', 'amount_total': fields.function(_amount_all, method=True, digits_compute=dp.get_precision('Account'), string='Total',
store={ store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20), 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
'account.invoice.tax': (_get_invoice_tax, None, 20), 'account.invoice.tax': (_get_invoice_tax, None, 20),
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount'], 20), 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
}, },
multi='all'), multi='all'),
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
@ -302,7 +302,7 @@ class account_invoice(osv.osv):
store={ store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 50), 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 50),
'account.invoice.tax': (_get_invoice_tax, None, 50), 'account.invoice.tax': (_get_invoice_tax, None, 50),
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount'], 50), 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 50),
'account.move.line': (_get_invoice_from_line, None, 50), 'account.move.line': (_get_invoice_from_line, None, 50),
'account.move.reconcile': (_get_invoice_from_reconcile, None, 50), 'account.move.reconcile': (_get_invoice_from_reconcile, None, 50),
}, },
@ -1313,6 +1313,7 @@ class account_invoice_line(osv.osv):
if context is None: if context is None:
context = {} context = {}
company_id = context.get('company_id',False) company_id = context.get('company_id',False)
tax_obj = self.pool.get('account.tax')
if not partner_id: if not partner_id:
raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") ) raise osv.except_osv(_('No Partner Defined !'),_("You must first select a partner !") )
if not product: if not product:
@ -1396,23 +1397,20 @@ class account_invoice_line(osv.osv):
a = res.product_tmpl_id.property_account_expense.id a = res.product_tmpl_id.property_account_expense.id
if not a: if not a:
a = res.categ_id.property_account_expense_categ.id a = res.categ_id.property_account_expense_categ.id
a = fpos_obj.map_account(cr, uid, fpos, a) a = fpos_obj.map_account(cr, uid, fpos, a)
if a: if a:
result['account_id'] = a result['account_id'] = a
if type in ('out_invoice', 'out_refund'): if type in ('out_invoice', 'out_refund'):
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a).tax_ids or False) taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
else: else:
taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a).tax_ids or False) taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes) tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
if type in ('in_invoice', 'in_refund'): if type in ('in_invoice', 'in_refund'):
result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} ) result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} )
else: else:
result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id}) result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
# if not name:
result['name'] = res.partner_ref result['name'] = res.partner_ref
domain = {} domain = {}
@ -1443,11 +1441,21 @@ class account_invoice_line(osv.osv):
return res_final return res_final
def uos_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): def uos_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None):
res = self.product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context) warning = {}
res = self.product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context=context)
if 'uos_id' in res['value']: if 'uos_id' in res['value']:
del res['value']['uos_id'] del res['value']['uos_id']
if not uom: if not uom:
res['value']['price_unit'] = 0.0 res['value']['price_unit'] = 0.0
if product and uom:
prod = self.pool.get('product.product').browse(cr, uid, product, context=context)
prod_uom = self.pool.get('product.uom').browse(cr, uid, uom, context=context)
if prod.uom_id.category_id.id != prod_uom.category_id.id:
warning = {
'title': _('Warning!'),
'message': _('You selected an Unit of Measure which is not compatible with the product.')
}
return {'value': res['value'], 'warning': warning}
return res return res
def move_line_get(self, cr, uid, invoice_id, context=None): def move_line_get(self, cr, uid, invoice_id, context=None):

View File

@ -337,7 +337,7 @@
<field name="name">Analytic Journals</field> <field name="name">Analytic Journals</field>
<field name="res_model">account.analytic.journal</field> <field name="res_model">account.analytic.journal</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,search</field> <field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_analytic_journal_search" /> <field name="search_view_id" ref="view_analytic_journal_search" />
</record> </record>
<menuitem groups="analytic.group_analytic_accounting,group_account_manager" action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" sequence="5"/> <menuitem groups="analytic.group_analytic_accounting,group_account_manager" action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" sequence="5"/>

View File

@ -84,11 +84,12 @@ class account_balance(report_sxw.rml_parse, common_report_header):
} }
self.sum_debit += account_rec['debit'] self.sum_debit += account_rec['debit']
self.sum_credit += account_rec['credit'] self.sum_credit += account_rec['credit']
acc_digit = self.pool.get('decimal.precision').precision_get(self.cr, 1, 'Account')
if disp_acc == 'bal_movement': if disp_acc == 'bal_movement':
if res['credit'] > 0 or res['debit'] > 0 or res['balance'] > 0: if round(res['credit'], acc_digit) > 0 or round(res['debit'], acc_digit) > 0 or round(res['balance'], acc_digit) != 0:
self.result_acc.append(res) self.result_acc.append(res)
elif disp_acc == 'bal_solde': elif disp_acc == 'bal_solde':
if res['balance'] != 0: if round(res['balance'], acc_digit) != 0:
self.result_acc.append(res) self.result_acc.append(res)
else: else:
self.result_acc.append(res) self.result_acc.append(res)

View File

@ -136,15 +136,16 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header)
'level': account.level, 'level': account.level,
'balance':account.balance, 'balance':account.balance,
} }
acc_digit = self.pool.get('decimal.precision').precision_get(self.cr, 1, 'Account')
if typ == 'liability' and account.type <> 'view' and (account.debit <> account.credit): if typ == 'liability' and account.type <> 'view' and (account.debit <> account.credit):
self.result_sum_dr += account.balance self.result_sum_dr += account.balance
if typ == 'asset' and account.type <> 'view' and (account.debit <> account.credit): if typ == 'asset' and account.type <> 'view' and (account.debit <> account.credit):
self.result_sum_cr += account.balance self.result_sum_cr += account.balance
if data['form']['display_account'] == 'bal_movement': if data['form']['display_account'] == 'bal_movement':
if account.credit > 0 or account.debit > 0 or account.balance > 0: if round(account.credit, acc_digit) > 0 or round(account.debit, acc_digit) > 0 or round(account.balance, acc_digit) != 0:
accounts_temp.append(account_dict) accounts_temp.append(account_dict)
elif data['form']['display_account'] == 'bal_solde': elif data['form']['display_account'] == 'bal_solde':
if account.balance != 0: if round(account.balance, acc_digit) != 0:
accounts_temp.append(account_dict) accounts_temp.append(account_dict)
else: else:
accounts_temp.append(account_dict) accounts_temp.append(account_dict)

View File

@ -78,7 +78,7 @@
domain="['|', ('type','=','out_invoice'),('type','=','out_refund')]" domain="['|', ('type','=','out_invoice'),('type','=','out_refund')]"
help="Customer Invoices And Refunds"/> help="Customer Invoices And Refunds"/>
<filter icon="terp-personal" <filter icon="terp-personal"
string="supplier" string="Supplier"
separator="1" separator="1"
domain="['|', ('type','=','in_invoice'),('type','=','in_refund')]" domain="['|', ('type','=','in_invoice'),('type','=','in_refund')]"
help="Supplier Invoices And Refunds"/> help="Supplier Invoices And Refunds"/>

View File

@ -157,7 +157,6 @@
<para style="terp_default_9"> <para style="terp_default_9">
<font color="white"> </font> <font color="white"> </font>
</para> </para>
<para style="terp_default_9">Exception made of a mistake of our side, it seems that the following bills stay unpaid. Please, take appropriate measures in order to carry out this payment in the next 8 days.</para>
<para style="terp_default_9"> <para style="terp_default_9">
<font color="white"> </font> <font color="white"> </font>
</para> </para>

View File

@ -106,15 +106,16 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
accounts_temp = [] accounts_temp = []
for account in accounts: for account in accounts:
if (account.user_type.report_type) and (account.user_type.report_type == typ): if (account.user_type.report_type) and (account.user_type.report_type == typ):
acc_digit = self.pool.get('decimal.precision').precision_get(self.cr, 1, 'Account')
if typ == 'expense' and account.type <> 'view' and (account.debit <> account.credit): if typ == 'expense' and account.type <> 'view' and (account.debit <> account.credit):
self.result_sum_dr += abs(account.debit - account.credit) self.result_sum_dr += abs(account.debit - account.credit)
if typ == 'income' and account.type <> 'view' and (account.debit <> account.credit): if typ == 'income' and account.type <> 'view' and (account.debit <> account.credit):
self.result_sum_cr += abs(account.debit - account.credit) self.result_sum_cr += abs(account.debit - account.credit)
if data['form']['display_account'] == 'bal_movement': if data['form']['display_account'] == 'bal_movement':
if account.credit > 0 or account.debit > 0 or account.balance > 0: if round(account.credit, acc_digit) > 0 or round(account.debit, acc_digit) > 0 or round(account.balance, acc_digit) != 0:
accounts_temp.append(account) accounts_temp.append(account)
elif data['form']['display_account'] == 'bal_solde': elif data['form']['display_account'] == 'bal_solde':
if account.balance != 0: if round(account.balance, acc_digit) != 0:
accounts_temp.append(account) accounts_temp.append(account)
else: else:
accounts_temp.append(account) accounts_temp.append(account)

View File

@ -79,7 +79,7 @@
<field name="name">Tax multi-company</field> <field name="name">Tax multi-company</field>
<field model="ir.model" name="model_id" ref="model_account_tax"/> <field model="ir.model" name="model_id" ref="model_account_tax"/>
<field eval="True" name="global"/> <field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> <field name="domain_force">['|',('company_id','=',False),('company_id','=',user.company_id.id)]</field>
</record> </record>
<record id="tax_code_comp_rule" model="ir.rule"> <record id="tax_code_comp_rule" model="ir.rule">

View File

@ -72,8 +72,8 @@
"access_account_account_product_manager","account.account product manager","model_account_account","product.group_product_manager",1,0,0,0 "access_account_account_product_manager","account.account product manager","model_account_account","product.group_product_manager",1,0,0,0
"access_account_journal_product_manager","account.journal product manager","model_account_journal","product.group_product_manager",1,0,0,0 "access_account_journal_product_manager","account.journal product manager","model_account_journal","product.group_product_manager",1,0,0,0
"access_account_fiscal_position_product_manager","account.fiscal.position account.manager","model_account_fiscal_position","account.group_account_manager",1,1,1,1 "access_account_fiscal_position_product_manager","account.fiscal.position account.manager","model_account_fiscal_position","account.group_account_manager",1,1,1,1
"access_account_fiscal_position_tax_product_manager","account.fiscal.position.tax account.manager","model_account_fiscal_position_tax","account.group_account_manager",1,0,0,0 "access_account_fiscal_position_tax_product_manager","account.fiscal.position.tax account.manager","model_account_fiscal_position_tax","account.group_account_manager",1,1,1,1
"access_account_fiscal_position_account_product_manager","account.fiscal.position account.manager","model_account_fiscal_position_account","account.group_account_manager",1,0,0,0 "access_account_fiscal_position_account_product_manager","account.fiscal.position account.manager","model_account_fiscal_position_account","account.group_account_manager",1,1,1,1
"access_account_fiscal_position","account.fiscal.position all","model_account_fiscal_position","base.group_user",1,0,0,0 "access_account_fiscal_position","account.fiscal.position all","model_account_fiscal_position","base.group_user",1,0,0,0
"access_account_fiscal_position_tax","account.fiscal.position.tax all","model_account_fiscal_position_tax","base.group_user",1,0,0,0 "access_account_fiscal_position_tax","account.fiscal.position.tax all","model_account_fiscal_position_tax","base.group_user",1,0,0,0
"access_account_fiscal_position_account","account.fiscal.position all","model_account_fiscal_position_account","base.group_user",1,0,0,0 "access_account_fiscal_position_account","account.fiscal.position all","model_account_fiscal_position_account","base.group_user",1,0,0,0
@ -116,3 +116,5 @@
"access_report_account_receivable_invoice","report.account.receivable.invoice","model_report_account_receivable","account.group_account_invoice",1,1,1,1 "access_report_account_receivable_invoice","report.account.receivable.invoice","model_report_account_receivable","account.group_account_invoice",1,1,1,1
"access_report_account_receivable_user","report.account.receivable.user","model_report_account_receivable","account.group_account_user",1,1,1,1 "access_report_account_receivable_user","report.account.receivable.user","model_report_account_receivable","account.group_account_user",1,1,1,1
"access_account_sequence_fiscal_year_invoice","account.sequence.fiscalyear invoice","model_account_sequence_fiscalyear","account.group_account_invoice",1,1,1,1 "access_account_sequence_fiscal_year_invoice","account.sequence.fiscalyear invoice","model_account_sequence_fiscalyear","account.group_account_invoice",1,1,1,1
"access_account_sequence_fiscal_year_sale_user","account.sequence.fiscalyear.sale.user","model_account_sequence_fiscalyear","base.group_sale_salesman",1,1,1,0
"access_account_sequence_fiscal_year_sale_manager","account.sequence.fiscalyear.sale.manager","model_account_sequence_fiscalyear","base.group_sale_manager",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
72 access_account_account_product_manager account.account product manager model_account_account product.group_product_manager 1 0 0 0
73 access_account_journal_product_manager account.journal product manager model_account_journal product.group_product_manager 1 0 0 0
74 access_account_fiscal_position_product_manager account.fiscal.position account.manager model_account_fiscal_position account.group_account_manager 1 1 1 1
75 access_account_fiscal_position_tax_product_manager account.fiscal.position.tax account.manager model_account_fiscal_position_tax account.group_account_manager 1 0 1 0 1 0 1
76 access_account_fiscal_position_account_product_manager account.fiscal.position account.manager model_account_fiscal_position_account account.group_account_manager 1 0 1 0 1 0 1
77 access_account_fiscal_position account.fiscal.position all model_account_fiscal_position base.group_user 1 0 0 0
78 access_account_fiscal_position_tax account.fiscal.position.tax all model_account_fiscal_position_tax base.group_user 1 0 0 0
79 access_account_fiscal_position_account account.fiscal.position all model_account_fiscal_position_account base.group_user 1 0 0 0
116 access_report_account_receivable_invoice report.account.receivable.invoice model_report_account_receivable account.group_account_invoice 1 1 1 1
117 access_report_account_receivable_user report.account.receivable.user model_report_account_receivable account.group_account_user 1 1 1 1
118 access_account_sequence_fiscal_year_invoice account.sequence.fiscalyear invoice model_account_sequence_fiscalyear account.group_account_invoice 1 1 1 1
119 access_account_sequence_fiscal_year_sale_user account.sequence.fiscalyear.sale.user model_account_sequence_fiscalyear base.group_sale_salesman 1 1 1 0
120 access_account_sequence_fiscal_year_sale_manager account.sequence.fiscalyear.sale.manager model_account_sequence_fiscalyear base.group_sale_manager 1 1 1 1

View File

@ -33,8 +33,9 @@ class account_chart(osv.osv_memory):
help = 'Keep empty for all open fiscal years'), help = 'Keep empty for all open fiscal years'),
'period_from': fields.many2one('account.period', 'Start period'), 'period_from': fields.many2one('account.period', 'Start period'),
'period_to': fields.many2one('account.period', 'End period'), 'period_to': fields.many2one('account.period', 'End period'),
'target_move': fields.selection([('all', 'All Entries'), 'target_move': fields.selection([('posted', 'All Posted Entries'),
('posted', 'All Posted Entries')], 'Target Moves', required = True), ('all', 'All Entries'),
], 'Target Moves', required = True),
} }
def onchange_fiscalyear(self, cr, uid, ids, fiscalyear_id=False, context=None): def onchange_fiscalyear(self, cr, uid, ids, fiscalyear_id=False, context=None):
@ -92,7 +93,7 @@ class account_chart(osv.osv_memory):
return result return result
_defaults = { _defaults = {
'target_move': 'all' 'target_move': 'posted'
} }
account_chart() account_chart()

View File

@ -21,7 +21,7 @@
from lxml import etree from lxml import etree
from osv import osv from osv import osv, fields
from tools.translate import _ from tools.translate import _
import tools import tools
@ -29,7 +29,16 @@ class account_move_journal(osv.osv_memory):
_name = "account.move.journal" _name = "account.move.journal"
_description = "Move journal" _description = "Move journal"
def _get_period(self, cr, uid, context=None): _columns = {
'target_move': fields.selection([('posted', 'All Posted Entries'),
('all', 'All Entries'),
], 'Target Moves', required=True),
}
_defaults = {
'target_move': 'posted'
}
def _get_period(self, cr, uid, context={}):
""" """
Return default account period value Return default account period value
""" """
@ -93,6 +102,8 @@ class account_move_journal(osv.osv_memory):
view = """<?xml version="1.0" encoding="utf-8"?> view = """<?xml version="1.0" encoding="utf-8"?>
<form string="Standard entries"> <form string="Standard entries">
<separator string="Open Journal Items !" colspan="4"/> <separator string="Open Journal Items !" colspan="4"/>
<field name="target_move" />
<newline/>
<group colspan="4" > <group colspan="4" >
<label width="300" string="Journal: %s"/> <label width="300" string="Journal: %s"/>
<newline/> <newline/>
@ -132,6 +143,7 @@ class account_move_journal(osv.osv_memory):
journal_id = self._get_journal(cr, uid, context) journal_id = self._get_journal(cr, uid, context)
period_id = self._get_period(cr, uid, context) period_id = self._get_period(cr, uid, context)
target_move = self.read(cr, uid, ids, [])[0]['target_move']
name = _("Journal Items") name = _("Journal Items")
if journal_id: if journal_id:
@ -156,23 +168,26 @@ class account_move_journal(osv.osv_memory):
} }
period_pool.create(cr, uid, res,context=context) period_pool.create(cr, uid, res,context=context)
ids = period_pool.search(cr, uid, [('journal_id', '=', journal_id), ('period_id', '=', period_id)],context=context) ids = period_pool.search(cr, uid, [('journal_id', '=', journal_id), ('period_id', '=', period_id)], context=context)
period = period_pool.browse(cr, uid, ids[0], context=context) period = period_pool.browse(cr, uid, ids[0], context=context)
name = (period.journal_id.code or '') + ':' + (period.period_id.code or '') name = (period.journal_id.code or '') + ':' + (period.period_id.code or '')
result = data_pool.get_object_reference(cr, uid, 'account', 'view_account_move_line_filter') result = data_pool.get_object_reference(cr, uid, 'account', 'view_account_move_line_filter')
res_id = result and result[1] or False res_id = result and result[1] or False
move = 0
if target_move == 'posted':
move = 1
return { return {
'name': name, 'name': name,
'view_type': 'form', 'view_type': 'form',
'view_mode': 'tree,graph,form', 'view_mode': 'tree,graph,form',
'res_model': 'account.move.line', 'res_model': 'account.move.line',
'view_id': False, 'view_id': False,
'context': "{'visible_id':%s, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (journal_id, journal_id, period_id), 'context': "{'search_default_posted': %d, 'visible_id':%s, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (move, journal_id, journal_id, period_id),
'type': 'ir.actions.act_window', 'type': 'ir.actions.act_window',
'search_view_id': res_id 'search_view_id': res_id
} }
account_move_journal() account_move_journal()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -38,8 +38,9 @@ class account_common_report(osv.osv_memory):
'journal_ids': fields.many2many('account.journal', 'account_common_journal_rel', 'account_id', 'journal_id', 'Journals', required=True), 'journal_ids': fields.many2many('account.journal', 'account_common_journal_rel', 'account_id', 'journal_id', 'Journals', required=True),
'date_from': fields.date("Start Date"), 'date_from': fields.date("Start Date"),
'date_to': fields.date("End Date"), 'date_to': fields.date("End Date"),
'target_move': fields.selection([('all', 'All Entries'), 'target_move': fields.selection([('posted', 'All Posted Entries'),
('posted', 'All Posted Entries')], 'Target Moves', required=True), ('all', 'All Entries'),
], 'Target Moves', required=True),
} }
@ -101,7 +102,7 @@ class account_common_report(osv.osv_memory):
'journal_ids': _get_all_journal, 'journal_ids': _get_all_journal,
'filter': 'filter_no', 'filter': 'filter_no',
'chart_account_id': _get_account, 'chart_account_id': _get_account,
'target_move': 'all', 'target_move': 'posted',
} }
def _build_contexts(self, cr, uid, ids, data, context=None): def _build_contexts(self, cr, uid, ids, data, context=None):

View File

@ -31,8 +31,9 @@ class account_tax_chart(osv.osv_memory):
'period_id': fields.many2one('account.period', \ 'period_id': fields.many2one('account.period', \
'Period', \ 'Period', \
), ),
'target_move': fields.selection([('all', 'All Entries'), 'target_move': fields.selection([('posted', 'All Posted Entries'),
('posted', 'All Posted Entries')], 'Target Moves', required=True), ('all', 'All Entries'),
], 'Target Moves', required=True),
} }
def _get_period(self, cr, uid, context=None): def _get_period(self, cr, uid, context=None):
@ -72,7 +73,7 @@ class account_tax_chart(osv.osv_memory):
_defaults = { _defaults = {
'period_id': _get_period, 'period_id': _get_period,
'target_move': 'all' 'target_move': 'posted'
} }
account_tax_chart() account_tax_chart()

View File

@ -59,6 +59,7 @@ of distribution models.
'depends' : ['account', 'account_analytic_default'], 'depends' : ['account', 'account_analytic_default'],
'init_xml' : [], 'init_xml' : [],
'update_xml': [ 'update_xml': [
'security/account_analytic_plan_security.xml',
'security/ir.model.access.csv', 'security/ir.model.access.csv',
'account_analytic_plans_view.xml', 'account_analytic_plans_view.xml',
'account_analytic_plans_report.xml', 'account_analytic_plans_report.xml',

View File

@ -244,7 +244,7 @@ class account_analytic_plan_instance_line(osv.osv):
_description = "Analytic Instance Line" _description = "Analytic Instance Line"
_columns = { _columns = {
'plan_id': fields.many2one('account.analytic.plan.instance', 'Plan Id'), 'plan_id': fields.many2one('account.analytic.plan.instance', 'Plan Id'),
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True), 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, domain=[('type','<>','view')]),
'rate': fields.float('Rate (%)', required=True), 'rate': fields.float('Rate (%)', required=True),
} }
_defaults = { _defaults = {

View File

@ -97,19 +97,21 @@ class crossovered_analytic(report_sxw.rml_parse):
self.final_list = children_list self.final_list = children_list
selected_ids = line_pool.search(self.cr, self.uid, [('account_id', 'in' ,self.final_list)]) selected_ids = line_pool.search(self.cr, self.uid, [('account_id', 'in' ,self.final_list)])
res['ref_qty'] = 0.0
res['ref_amt'] = 0.0
self.base_amount = 0.0
if selected_ids: if selected_ids:
query = "SELECT SUM(aal.amount) AS amt, SUM(aal.unit_amount) AS qty FROM account_analytic_line AS aal, account_analytic_account AS aaa \ query = "SELECT SUM(aal.amount) AS amt, SUM(aal.unit_amount) AS qty FROM account_analytic_line AS aal, account_analytic_account AS aaa \
WHERE aal.account_id = aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'" WHERE aal.account_id = aaa.id AND aal.id IN ("+','.join(map(str,selected_ids))+") AND (aal.journal_id " + journal +") AND aal.date>='"+ str(form['date1']) +"'"" AND aal.date<='" + str(form['date2']) + "'"
self.cr.execute(query) self.cr.execute(query)
info=self.cr.dictfetchall() info=self.cr.dictfetchall()
res['ref_qty'] = info[0]['qty'] res['ref_qty'] = info[0]['qty']
res['ref_amt'] = info[0]['amt'] res['ref_amt'] = info[0]['amt']
self.base_amount = info[0]['amt'] self.base_amount = info[0]['amt']
res['ref_qty'] = 0.0
res['ref_amt'] = 0.0
self.base_amount = 0.0
result.append(res) result.append(res)
return result return result

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="base.user_root" model="res.users">
<field name="groups_id" eval="[(4, ref('analytic.group_analytic_accounting'))]"/>
</record>
</data>
</openerp>

View File

@ -31,7 +31,7 @@ class account_crossovered_analytic(osv.osv_memory):
'date1': fields.date('Start Date', required=True), 'date1': fields.date('Start Date', required=True),
'date2': fields.date('End Date', required=True), 'date2': fields.date('End Date', required=True),
'journal_ids': fields.many2many('account.analytic.journal', 'crossovered_journal_rel', 'crossover_id', 'journal_id', 'Analytic Journal'), 'journal_ids': fields.many2many('account.analytic.journal', 'crossovered_journal_rel', 'crossover_id', 'journal_id', 'Analytic Journal'),
'ref': fields.many2one('account.analytic.account', 'Analytic Account Reference', required=False), 'ref': fields.many2one('account.analytic.account', 'Analytic Account Reference', required=True),
'empty_line': fields.boolean('Dont show empty lines'), 'empty_line': fields.boolean('Dont show empty lines'),
} }
_defaults = { _defaults = {

View File

@ -181,7 +181,7 @@ class crossovered_budget_lines(osv.osv):
res = {} res = {}
for line in self.browse(cr, uid, ids, context=context): for line in self.browse(cr, uid, ids, context=context):
if line.theoritical_amount <> 0.00: if line.theoritical_amount <> 0.00:
res[line.id] = float(line.practical_amount or 0.0 / line.theoritical_amount) * 100 res[line.id] = float((line.practical_amount or 0.0) / line.theoritical_amount) * 100
else: else:
res[line.id] = 0.00 res[line.id] = 0.00
return res return res

View File

@ -45,7 +45,7 @@
<field name="view_id" ref="view_budget_post_tree"/> <field name="view_id" ref="view_budget_post_tree"/>
<field name="search_view_id" ref="view_budget_post_search"/> <field name="search_view_id" ref="view_budget_post_search"/>
</record> </record>
<menuitem id="next_id_31" name="Budgets" parent="account.menu_finance" sequence="5"/> <menuitem id="next_id_31" name="Budgets" parent="account.menu_finance" sequence="6"/>
<menuitem id="next_id_pos" name="Budgets" parent="account.menu_finance_configuration" sequence="20"/> <menuitem id="next_id_pos" name="Budgets" parent="account.menu_finance_configuration" sequence="20"/>
<menuitem action="open_budget_post_form" id="menu_budget_post_form" parent="next_id_pos" sequence="20"/> <menuitem action="open_budget_post_form" id="menu_budget_post_form" parent="next_id_pos" sequence="20"/>
@ -131,7 +131,6 @@
<field name="date_to"/> <field name="date_to"/>
<field name="paid_date" select="1"/> <field name="paid_date" select="1"/>
<field name="planned_amount" select="1"/> <field name="planned_amount" select="1"/>
<field name="analytic_account_id"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/> <field name="company_id" widget="selection" groups="base.group_multi_company"/>
</form> </form>
</field> </field>

View File

@ -39,7 +39,7 @@
</field> </field>
</record> </record>
<menuitem id="menu_main_payment" name="Payment" parent="account.menu_finance" sequence="6"/> <menuitem id="menu_main_payment" name="Payment" parent="account.menu_finance" sequence="7"/>
<record id="view_payment_mode_search" model="ir.ui.view"> <record id="view_payment_mode_search" model="ir.ui.view">
<field name="name">payment.mode.search</field> <field name="name">payment.mode.search</field>
@ -88,7 +88,7 @@
<field name="name">Payment Mode</field> <field name="name">Payment Mode</field>
<field name="res_model">payment.mode</field> <field name="res_model">payment.mode</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form,search</field> <field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_payment_mode_search"/> <field name="search_view_id" ref="view_payment_mode_search"/>
</record> </record>

View File

@ -37,10 +37,12 @@ class account_payment_populate_statement(osv.osv_memory):
res = super(account_payment_populate_statement, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False) res = super(account_payment_populate_statement, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
line_ids = line_obj.search(cr, uid, [ line_ids = line_obj.search(cr, uid, [
('move_line_id.reconcile_id', '=', False), ('move_line_id.reconcile_id', '=', False),
('bank_statement_line_id', '=', False),]) ('bank_statement_line_id', '=', False),
('move_line_id.state','=','valid')])
line_ids.extend(line_obj.search(cr, uid, [ line_ids.extend(line_obj.search(cr, uid, [
('move_line_id.reconcile_id', '=', False), ('move_line_id.reconcile_id', '=', False),
('order_id.mode', '=', False)])) ('order_id.mode', '=', False),
('move_line_id.state','=','valid')]))
domain = '[("id", "in", '+ str(line_ids)+')]' domain = '[("id", "in", '+ str(line_ids)+')]'
doc = etree.XML(res['arch']) doc = etree.XML(res['arch'])
nodes = doc.xpath("//field[@name='lines']") nodes = doc.xpath("//field[@name='lines']")

View File

@ -23,8 +23,8 @@ import time
from lxml import etree from lxml import etree
import netsvc import netsvc
from osv import fields from osv import osv, fields
from osv import osv import decimal_precision as dp
from tools.translate import _ from tools.translate import _
class account_move_line(osv.osv): class account_move_line(osv.osv):
@ -117,6 +117,11 @@ class account_voucher(osv.osv):
if context is None: context = {} if context is None: context = {}
return context.get('narration', False) return context.get('narration', False)
def _get_amount(self, cr, uid, context=None):
if context is None:
context= {}
return context.get('amount', 0.0)
def name_get(self, cr, uid, ids, context=None): def name_get(self, cr, uid, ids, context=None):
if not ids: if not ids:
return [] return []
@ -150,18 +155,29 @@ class account_voucher(osv.osv):
res['arch'] = etree.tostring(doc) res['arch'] = etree.tostring(doc)
return res return res
def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount):
debit = credit = 0.0
for l in line_dr_ids:
debit += l['amount']
for l in line_cr_ids:
credit += l['amount']
return abs(amount - abs(credit - debit))
def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount):
line_dr_ids = [x[2] for x in line_dr_ids]
line_cr_ids = [x[2] for x in line_cr_ids]
return {'value': {'writeoff_amount': self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount)}}
def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None): def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None):
if not ids: return {} if not ids: return {}
res = {} res = {}
debit = credit = 0.0
for voucher in self.browse(cr, uid, ids, context=context): for voucher in self.browse(cr, uid, ids, context=context):
debit= credit = 0.0 for l in voucher.line_dr_ids:
if voucher.line_dr_ids: debit += l.amount
for line in voucher.line_dr_ids: for l in voucher.line_cr_ids:
debit += line.amount_unreconciled credit += l.amount
if voucher.line_cr_ids: res[voucher.id] = abs(voucher.amount - abs(credit - debit))
for line in voucher.line_cr_ids:
credit += line.amount_unreconciled
res[voucher.id] = abs(voucher.amount - abs(credit - debit))
return res return res
_name = 'account.voucher' _name = 'account.voucher'
@ -199,8 +215,8 @@ class account_voucher(osv.osv):
\n* The \'Pro-forma\' when voucher is in Pro-forma state,voucher does not have an voucher number. \ \n* The \'Pro-forma\' when voucher is in Pro-forma state,voucher does not have an voucher number. \
\n* The \'Posted\' state is used when user create voucher,a voucher number is generated and voucher entries are created in account \ \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.'), \n* The \'Cancelled\' state is used when user cancel voucher.'),
'amount': fields.float('Total', digits=(16, 2), required=True, readonly=True, states={'draft':[('readonly',False)]}), 'amount': fields.float('Total', digits_compute=dp.get_precision('Account'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
'tax_amount':fields.float('Tax Amount', digits=(14,2), readonly=True, states={'draft':[('readonly',False)]}), 'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}),
'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."), 'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."),
'number': fields.char('Number', size=32, readonly=True,), 'number': fields.char('Number', size=32, readonly=True,),
'move_id':fields.many2one('account.move', 'Account Entry'), 'move_id':fields.many2one('account.move', 'Account Entry'),
@ -215,14 +231,13 @@ class account_voucher(osv.osv):
'pre_line':fields.boolean('Previous Payments ?', required=False), 'pre_line':fields.boolean('Previous Payments ?', required=False),
'date_due': fields.date('Due Date', readonly=True, states={'draft':[('readonly',False)]}), 'date_due': fields.date('Due Date', readonly=True, states={'draft':[('readonly',False)]}),
'payment_option':fields.selection([ 'payment_option':fields.selection([
('without_writeoff', 'Without Write-off'), ('without_writeoff', 'Keep Open'),
('with_writeoff', 'With Write-off'), ('with_writeoff', 'Reconcile with Write-Off'),
], 'Payment Option', required=True, readonly=True, states={'draft': [('readonly', False)]}), ], 'Payment Difference', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'writeoff_acc_id': fields.many2one('account.account', 'Write-Off account', readonly=True, states={'draft': [('readonly', False)]}), 'writeoff_acc_id': fields.many2one('account.account', 'Write-Off account', readonly=True, states={'draft': [('readonly', False)]}),
'writeoff_journal_id': fields.many2one('account.journal', 'Write-Off journal', readonly=True, states={'draft': [('readonly', False)]}), 'comment': fields.char('Write-Off Comment', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}),
'comment': fields.char('Comment', size=64, readonly=True, states={'draft': [('readonly', False)]}), 'analytic_id': fields.many2one('account.analytic.account','Write-Off Analytic Account', readonly=True, states={'draft': [('readonly', False)]}),
'analytic_id': fields.many2one('account.analytic.account','Analytic Account', readonly=True, states={'draft': [('readonly', False)]}), 'writeoff_amount': fields.function(_get_writeoff_amount, method=True, string='Write-Off Amount', type='float', readonly=True),
'writeoff_amount': fields.function(_get_writeoff_amount, method=True, string='Writeoff Amount', type='float', readonly=True),
} }
_defaults = { _defaults = {
'period_id': _get_period, 'period_id': _get_period,
@ -231,6 +246,7 @@ class account_voucher(osv.osv):
'currency_id': _get_currency, 'currency_id': _get_currency,
'reference': _get_reference, 'reference': _get_reference,
'narration':_get_narration, 'narration':_get_narration,
'amount': _get_amount,
'type':_get_type, 'type':_get_type,
'state': 'draft', 'state': 'draft',
'pay_now': 'pay_later', 'pay_now': 'pay_later',
@ -239,7 +255,7 @@ class account_voucher(osv.osv):
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher',context=c), 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher',context=c),
'tax_id': _get_tax, 'tax_id': _get_tax,
'payment_option': 'without_writeoff', 'payment_option': 'without_writeoff',
'comment': 'Write-Off', 'comment': _('Write-Off'),
} }
def compute_tax(self, cr, uid, ids, context=None): def compute_tax(self, cr, uid, ids, context=None):
@ -395,13 +411,17 @@ class account_voucher(osv.osv):
@return: Returns a dict which contains new values, and context @return: Returns a dict which contains new values, and context
""" """
if context is None:
context = {}
if not journal_id: if not journal_id:
return {} return {}
if context is None:
context = {}
currency_pool = self.pool.get('res.currency')
line_pool = self.pool.get('account.voucher.line') line_pool = self.pool.get('account.voucher.line')
line_ids = ids and line_pool.search(cr, uid, [('voucher_id', '=', ids[0])]) or False
if line_ids:
line_pool.unlink(cr, uid, line_ids)
currency_pool = self.pool.get('res.currency')
move_line_pool = self.pool.get('account.move.line') move_line_pool = self.pool.get('account.move.line')
partner_pool = self.pool.get('res.partner') partner_pool = self.pool.get('res.partner')
journal_pool = self.pool.get('account.journal') journal_pool = self.pool.get('account.journal')
@ -474,13 +494,13 @@ class account_voucher(osv.osv):
if line.debit and line.reconcile_partial_id and ttype == 'payment': if line.debit and line.reconcile_partial_id and ttype == 'payment':
continue continue
orignal_amount = line.credit or line.debit or 0.0 original_amount = line.credit or line.debit or 0.0
rs = { rs = {
'name':line.move_id.name, 'name':line.move_id.name,
'type': line.credit and 'dr' or 'cr', 'type': line.credit and 'dr' or 'cr',
'move_line_id':line.id, 'move_line_id':line.id,
'account_id':line.account_id.id, 'account_id':line.account_id.id,
'amount_original':currency_pool.compute(cr, uid, company_currency, currency_id, orignal_amount), 'amount_original':currency_pool.compute(cr, uid, company_currency, currency_id, original_amount),
'date_original':line.date, 'date_original':line.date,
'date_due':line.date_maturity, 'date_due':line.date_maturity,
'amount_unreconciled':currency_pool.compute(cr, uid, company_currency, currency_id, line.amount_unreconciled) 'amount_unreconciled':currency_pool.compute(cr, uid, company_currency, currency_id, line.amount_unreconciled)
@ -504,6 +524,7 @@ class account_voucher(osv.osv):
default['value']['pre_line'] = 1 default['value']['pre_line'] = 1
elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0: elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
default['value']['pre_line'] = 1 default['value']['pre_line'] = 1
default['value']['writeoff_amount'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price)
return default return default
@ -687,7 +708,7 @@ class account_voucher(osv.osv):
for line in inv.line_ids: for line in inv.line_ids:
if not line.amount: if not line.amount:
continue continue
amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.amount) amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount)
move_line = { move_line = {
'journal_id': inv.journal_id.id, 'journal_id': inv.journal_id.id,
'period_id': inv.period_id.id, 'period_id': inv.period_id.id,
@ -730,16 +751,20 @@ class account_voucher(osv.osv):
if line.move_line_id.id: if line.move_line_id.id:
rec_ids = [master_line, line.move_line_id.id] rec_ids = [master_line, line.move_line_id.id]
rec_list_ids.append(rec_ids) rec_list_ids.append(rec_ids)
writeoff_account_id = False
writeoff_journal_id = False
writeoff_period_id = inv.period_id.id,
comment = False
if not currency_pool.is_zero(cr, uid, inv.currency_id, line_total): if not currency_pool.is_zero(cr, uid, inv.currency_id, line_total):
diff = line_total diff = line_total
account_id = False
if inv.payment_option == 'with_writeoff':
account_id = inv.writeoff_acc_id.id
elif inv.type in ('sale', 'receipt'):
# if inv.journal_id.type in ('sale','sale_refund', 'cash', 'bank'):
account_id = inv.partner_id.property_account_receivable.id
else:
account_id = inv.partner_id.property_account_payable.id
move_line = { move_line = {
'name': name, 'name': name,
'account_id': False, 'account_id': account_id,
'move_id': move_id, 'move_id': move_id,
'partner_id': inv.partner_id.id, 'partner_id': inv.partner_id.id,
'date': inv.date, 'date': inv.date,
@ -748,24 +773,8 @@ class account_voucher(osv.osv):
'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1) or 0.0, 'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1) or 0.0,
'currency_id': company_currency <> current_currency and current_currency or False, 'currency_id': company_currency <> current_currency and current_currency or False,
} }
account_id = False
if inv.type in ('sale', 'receipt'):
# if inv.journal_id.type in ('sale','sale_refund', 'cash', 'bank'):
account_id = inv.partner_id.property_account_receivable.id
else:
account_id = inv.partner_id.property_account_payable.id
move_line['account_id'] = account_id
move_line_pool.create(cr, uid, move_line) move_line_pool.create(cr, uid, move_line)
for rec_ids in rec_list_ids:
if len(rec_ids) >= 2:
if inv.payment_option == 'with_writeoff':
writeoff_account_id = inv.writeoff_acc_id.id
writeoff_journal_id = inv.writeoff_journal_id.id
comment = inv.comment
move_line_pool.reconcile(cr, uid, rec_ids, 'manual', writeoff_account_id, writeoff_period_id, writeoff_journal_id, context)
else:
move_line_pool.reconcile_partial(cr, uid, rec_ids)
self.write(cr, uid, [inv.id], { self.write(cr, uid, [inv.id], {
'move_id': move_id, 'move_id': move_id,
@ -773,6 +782,9 @@ class account_voucher(osv.osv):
'number': name, 'number': name,
}) })
move_pool.post(cr, uid, [move_id], context={}) move_pool.post(cr, uid, [move_id], context={})
for rec_ids in rec_list_ids:
if len(rec_ids) >= 2:
move_line_pool.reconcile_partial(cr, uid, rec_ids)
return True return True
def copy(self, cr, uid, id, default={}, context=None): def copy(self, cr, uid, id, default={}, context=None):
@ -824,7 +836,7 @@ class account_voucher_line(osv.osv):
'account_id':fields.many2one('account.account','Account', required=True), 'account_id':fields.many2one('account.account','Account', required=True),
'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'), 'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'),
'untax_amount':fields.float('Untax Amount'), 'untax_amount':fields.float('Untax Amount'),
'amount':fields.float('Amount', digits=(14,2)), 'amount':fields.float('Amount', digits_compute=dp.get_precision('Account')),
'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Cr/Dr'), 'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Cr/Dr'),
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'), 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
'move_line_id': fields.many2one('account.move.line', 'Journal Item'), 'move_line_id': fields.many2one('account.move.line', 'Journal Item'),
@ -832,7 +844,7 @@ class account_voucher_line(osv.osv):
'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1), 'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1),
'amount_original': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Originial Amount', store=True), 'amount_original': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Originial Amount', store=True),
'amount_unreconciled': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Open Balance', store=True), 'amount_unreconciled': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Open Balance', store=True),
'company_id': fields.related('voucher_id','company_id', relation='res.company', string='Company', store=True), 'company_id': fields.related('voucher_id','company_id', relation='res.company', type='many2one', string='Company', store=True),
} }
_defaults = { _defaults = {
'name': '' 'name': ''
@ -873,7 +885,7 @@ class account_voucher_line(osv.osv):
@return: Returns a dict that contains default values for fields @return: Returns a dict that contains default values for fields
""" """
if context is None: if context is None:
context = {} context = {}
journal_id = context.get('journal_id', False) journal_id = context.get('journal_id', False)
partner_id = context.get('partner_id', False) partner_id = context.get('partner_id', False)
@ -962,6 +974,17 @@ class account_bank_statement_line(osv.osv):
res[line.id] = 0.0 res[line.id] = 0.0
return res return res
def _check_amount(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
if obj.voucher_id:
if not (obj.amount == obj.voucher_id.amount):
return False
return True
_constraints = [
(_check_amount, 'The amount of the voucher must be the same amount as the one on the statement line', ['amount']),
]
_columns = { _columns = {
'amount_reconciled': fields.function(_amount_reconciled, 'amount_reconciled': fields.function(_amount_reconciled,
string='Amount reconciled', method=True, type='float'), string='Amount reconciled', method=True, type='float'),
@ -981,4 +1004,4 @@ class account_bank_statement_line(osv.osv):
account_bank_statement_line() account_bank_statement_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<openerp> <openerp>
<data> <data>
<report id="report_account_voucher" <!-- <report id="report_account_voucher"
string="Voucher" string="Voucher"
model="account.voucher" model="account.voucher"
name="voucher.cash_receipt.drcr" name="voucher.cash_receipt.drcr"
@ -9,7 +9,7 @@
groups="base.group_extended" groups="base.group_extended"
auto="False" auto="False"
header = "False" header = "False"
menu="True"/> menu="True"/> -->
<report id="report_account_voucher_print" <report id="report_account_voucher_print"
string="Voucher Print" string="Voucher Print"

View File

@ -70,8 +70,21 @@
<field name="period_id"/> <field name="period_id"/>
<field name="audit"/> <field name="audit"/>
</group> </group>
<separator string="Journal Items" colspan="4"/> <field name="move_ids" colspan="4" nolabel="1" readonly="1">
<field name="move_ids" colspan="4" nolabel="1" readonly="1"/> <tree string="Journal Items">
<field name="move_id"/>
<field name="ref"/>
<field name="date"/>
<field name="statement_id"/>
<field name="partner_id"/>
<field name="account_id"/>
<field name="name"/>
<field name="debit"/>
<field name="credit"/>
<field name="state"/>
<field name="reconcile_id"/>
</tree>
</field>
</page> </page>
</notebook> </notebook>
<group col="10" colspan="4"> <group col="10" colspan="4">

View File

@ -406,7 +406,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -520,7 +520,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -657,7 +657,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -750,7 +750,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor Invoices and Outstanding transactions" msgid "supplier Invoices and Outstanding transactions"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -421,7 +421,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "supplier Payment"
msgstr "Πληρωμή Πωλητή" msgstr "Πληρωμή Πωλητή"
#. module: account_voucher #. module: account_voucher
@ -539,8 +539,8 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "Πωλητής" msgstr "προμηθευτής"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
@ -676,7 +676,7 @@ msgstr "Πληροφορίες Πώλησης"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -433,8 +433,8 @@ msgstr "Romper conciliación"
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "Pago del vendedor" msgstr "Pago del Proveedor"
#. module: account_voucher #. module: account_voucher
#: view:account.invoice:0 #: view:account.invoice:0
@ -551,8 +551,8 @@ msgstr "¿Auditoría completa?"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "Vendedor" msgstr "Proveedor"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
@ -688,8 +688,8 @@ msgstr "Información de ventas"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "Abrir entradas diario de vendedores" msgstr "Abrir entradas diario de Proveedors"
#. module: account_voucher #. module: account_voucher
#: field:account.voucher.line,voucher_id:0 #: field:account.voucher.line,voucher_id:0
@ -781,8 +781,8 @@ msgstr "Cancelado"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor Invoices and Outstanding transactions" msgid "Supplier Invoices and Outstanding transactions"
msgstr "Facturas de vendedor y transacciones de salida" msgstr "Facturas de Proveedor y transacciones de salida"
#. module: account_voucher #. module: account_voucher
#: field:account.statement.from.invoice,journal_ids:0 #: field:account.statement.from.invoice,journal_ids:0

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -439,7 +439,7 @@ msgstr "Romper conciliación"
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "Pago a Proveedor" msgstr "Pago a Proveedor"
#. module: account_voucher #. module: account_voucher
@ -561,7 +561,7 @@ msgstr "Revisión Completa ?"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "Proveedor" msgstr "Proveedor"
#. module: account_voucher #. module: account_voucher
@ -698,7 +698,7 @@ msgstr "Información de Ventas"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "Abrir asientos de diario de proveedor" msgstr "Abrir asientos de diario de proveedor"
#. module: account_voucher #. module: account_voucher
@ -791,7 +791,7 @@ msgstr "Cancelado"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor Invoices and Outstanding transactions" msgid "Supplier Invoices and Outstanding transactions"
msgstr "Facturas de Proveedor y transacciones pendientes" msgstr "Facturas de Proveedor y transacciones pendientes"
#. module: account_voucher #. module: account_voucher

View File

@ -435,7 +435,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -553,7 +553,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -690,7 +690,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -421,7 +421,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -539,7 +539,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -676,7 +676,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -769,7 +769,7 @@ msgstr "Annulé"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor Invoices and Outstanding transactions" msgid "Supplier Invoices and Outstanding transactions"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -421,7 +421,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "Pagamenti fornitori" msgstr "Pagamenti fornitori"
#. module: account_voucher #. module: account_voucher
@ -539,7 +539,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -676,7 +676,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -421,7 +421,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -539,7 +539,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -676,7 +676,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -421,7 +421,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -539,7 +539,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -676,7 +676,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,8 +538,8 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "Vendedor" msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
@ -675,7 +675,7 @@ msgstr "Informação de vendas"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -865,6 +865,11 @@ msgid ""
"that are linked to those transactions because they will not be disable" "that are linked to those transactions because they will not be disable"
msgstr "" msgstr ""
#. module: account_voucher
#: view:account.voucher:0
msgid "Supplier Invoices and Outstanding transactions"
msgstr ""
#. module: account_voucher #. module: account_voucher
#: field:account.voucher.line,untax_amount:0 #: field:account.voucher.line,untax_amount:0
msgid "Untax Amount" msgid "Untax Amount"

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr "Отмена сверки"
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr "Информация о продажах"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -768,7 +768,11 @@ msgstr "Отменено"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
<<<<<<< TREE
msgid "Supplier Invoices and Outstanding transactions"
=======
msgid "Vendor Invoices and Outstanding transactions" msgid "Vendor Invoices and Outstanding transactions"
>>>>>>> MERGE-SOURCE
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -421,7 +421,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -539,7 +539,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -676,7 +676,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -427,7 +427,7 @@ msgstr "Poništavanje zatvaranja"
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "Placanja Proizvodjaca" msgstr "Placanja Proizvodjaca"
#. module: account_voucher #. module: account_voucher
@ -545,7 +545,7 @@ msgstr "Pregled KOmpletan?"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "proizvođač" msgstr "proizvođač"
#. module: account_voucher #. module: account_voucher
@ -682,7 +682,7 @@ msgstr "Informacije Prodaje"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "Otvori Dnevnik Proizvodjaca" msgstr "Otvori Dnevnik Proizvodjaca"
#. module: account_voucher #. module: account_voucher

View File

@ -539,8 +539,8 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr "proizvođač"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
@ -676,8 +676,8 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr "Otvori Dnevnik Proizvodjaca"
#. module: account_voucher #. module: account_voucher
#: field:account.voucher.line,voucher_id:0 #: field:account.voucher.line,voucher_id:0

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -421,7 +421,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -539,7 +539,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -676,7 +676,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -420,7 +420,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: model:ir.actions.act_window,name:account_voucher.action_vendor_payment #: model:ir.actions.act_window,name:account_voucher.action_vendor_payment
#: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment #: model:ir.ui.menu,name:account_voucher.menu_action_vendor_payment
msgid "Vendor Payment" msgid "Supplier Payment"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -538,7 +538,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Vendor" msgid "Supplier"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher
@ -675,7 +675,7 @@ msgstr ""
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 #: view:account.voucher:0
msgid "Open Vendor Journal Entries" msgid "Open Supplier Journal Entries"
msgstr "" msgstr ""
#. module: account_voucher #. module: account_voucher

View File

@ -327,56 +327,5 @@
</td> </td>
</tr> </tr>
</blockTable> </blockTable>
<para style="terp_default_1">
<font color="white"> </font>
</para>
<blockTable colWidths="154.0,108.0,118.0,144.0" style="Table5">
<tr>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9">Receiver's Signature</para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_Right_9">Authorised Signatory</para>
</td>
</tr>
</blockTable>
<para style="P1">
<font color="white"> </font>
</para>
</story> </story>
</document> </document>

View File

@ -88,7 +88,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Bill Payment"> <form string="Bill Payment">
<group col="6" colspan="4"> <group col="6" colspan="4">
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type)" context="{'invoice_currency':currency_id}" string="Vendor"/> <field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type)" context="{'invoice_currency':currency_id}" string="Supplier"/>
<field name="journal_id" <field name="journal_id"
domain="[('type','in',['bank', 'cash'])]" domain="[('type','in',['bank', 'cash'])]"
widget="selection" select="1" widget="selection" select="1"
@ -105,8 +105,8 @@
</group> </group>
<notebook colspan="4"> <notebook colspan="4">
<page string="Payment Information"> <page string="Payment Information">
<field name="line_dr_ids" attrs="{'invisible': [('type', '=', 'receipt')]}" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140"> <field name="line_dr_ids" attrs="{'invisible': [('type', '=', 'receipt')]}" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount)">
<tree string="Open Vendor Journal Entries" editable="bottom"> <tree string="Open Supplier Journal Entries" editable="bottom">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}" <field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)" on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]" domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
@ -119,7 +119,7 @@
<field name="amount" sum="Payment"/> <field name="amount" sum="Payment"/>
</tree> </tree>
</field> </field>
<field name="line_cr_ids" colspan="4" nolabel="1" attrs="{'invisible': [('type', '=', 'payment')]}" default_get="{'journal_id':journal_id, 'partner_id':partner_id}"> <field name="line_cr_ids" colspan="4" nolabel="1" attrs="{'invisible': [('type', '=', 'payment')]}" default_get="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount)">
<tree string="Open Customer Journal Entries" editable="bottom"> <tree string="Open Customer Journal Entries" editable="bottom">
<field name="move_line_id"/> <field name="move_line_id"/>
<field name="account_id" groups="base.group_extended" domain="[('type','=','receivable')]"/> <field name="account_id" groups="base.group_extended" domain="[('type','=','receivable')]"/>
@ -151,7 +151,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Bill Payment"> <form string="Bill Payment">
<group col="6" colspan="4"> <group col="6" colspan="4">
<field name="partner_id" domain="[('supplier','=',True)]" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type)" context="{'invoice_currency':currency_id}" string="Vendor"/> <field name="partner_id" domain="[('supplier','=',True)]" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type)" context="{'invoice_currency':currency_id}" string="Supplier"/>
<field name="journal_id" <field name="journal_id"
domain="[('type','in',['bank', 'cash'])]" domain="[('type','in',['bank', 'cash'])]"
widget="selection" select="1" widget="selection" select="1"
@ -169,7 +169,7 @@
<notebook colspan="4"> <notebook colspan="4">
<page string="Payment Information"> <page string="Payment Information">
<field name="line_dr_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140"> <field name="line_dr_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140">
<tree string="Vendor Invoices and Outstanding transactions" editable="bottom"> <tree string="Supplier Invoices and Outstanding transactions" editable="bottom">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}" <field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)" on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]" domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
@ -198,22 +198,18 @@
<group col="2" colspan="1"> <group col="2" colspan="1">
<group col="2" colspan="1"> <group col="2" colspan="1">
<separator string="Payment Options" colspan="2"/> <separator string="Payment Options" colspan="2"/>
<field name="payment_option" required="1"/>
<field name="writeoff_amount" <field name="writeoff_amount"
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/> attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
<field name="payment_option" required="1"/>
<field name="writeoff_acc_id" <field name="writeoff_acc_id"
attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}" attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}"
domain="[('type','=','liquidity')]"/> domain="[('type','=','other')]"/>
<!-- should select income accounts only. Or use the journal for this ? -->
<field name="writeoff_journal_id"
attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}"/>
<field name="comment" <field name="comment"
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/> attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
<field name="analytic_id" <field name="analytic_id"
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}" attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"
groups="analytic.group_analytic_accounting"/> groups="analytic.group_analytic_accounting"/>
</group> </group>
<separator string="Other Information" colspan="2"/>
<group col="4" colspan="1"> <group col="4" colspan="1">
<field name="date" select="1" on_change="onchange_date(date)"/> <field name="date" select="1" on_change="onchange_date(date)"/>
<field name="currency_id" invisible="True"/> <field name="currency_id" invisible="True"/>
@ -227,8 +223,21 @@
<field name="period_id"/> <field name="period_id"/>
<field name="audit"/> <field name="audit"/>
</group> </group>
<separator string="Journal Items" colspan="4"/> <field name="move_ids" colspan="4" nolabel="1" readonly="1">
<field name="move_ids" colspan="4" nolabel="1" readonly="1"/> <tree string="Journal Items">
<field name="move_id"/>
<field name="ref"/>
<field name="date"/>
<field name="statement_id"/>
<field name="partner_id"/>
<field name="account_id"/>
<field name="name"/>
<field name="debit"/>
<field name="credit"/>
<field name="state"/>
<field name="reconcile_id"/>
</tree>
</field>
</page> </page>
</notebook> </notebook>
<group col="10" colspan="4"> <group col="10" colspan="4">
@ -243,7 +252,7 @@
</record> </record>
<record id="action_vendor_payment" model="ir.actions.act_window"> <record id="action_vendor_payment" model="ir.actions.act_window">
<field name="name">Vendor Payment</field> <field name="name">Supplier Payment</field>
<field name="res_model">account.voucher</field> <field name="res_model">account.voucher</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment')]</field> <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment')]</field>
@ -295,7 +304,7 @@
</group> </group>
<notebook colspan="4"> <notebook colspan="4">
<page string="Payment Information"> <page string="Payment Information">
<field name="line_cr_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140"> <field name="line_cr_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount)">
<tree string="Invoices and outstanding transactions" editable="bottom"> <tree string="Invoices and outstanding transactions" editable="bottom">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}" <field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)" on_change="onchange_move_line_id(move_line_id)"
@ -309,7 +318,7 @@
<field name="amount" sum="Payment"/> <field name="amount" sum="Payment"/>
</tree> </tree>
</field> </field>
<field name="line_dr_ids" colspan="4" nolabel="1" attrs="{'invisible': [('pre_line','=',False)]}" default_get="{'journal_id':journal_id, 'partner_id':partner_id}"> <field name="line_dr_ids" colspan="4" nolabel="1" attrs="{'invisible': [('pre_line','=',False)]}" default_get="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount)">
<tree string="Credits" editable="bottom"> <tree string="Credits" editable="bottom">
<field name="move_line_id"/> <field name="move_line_id"/>
<field name="account_id" groups="base.group_extended" domain="[('type','=','receivable')]"/> <field name="account_id" groups="base.group_extended" domain="[('type','=','receivable')]"/>
@ -330,10 +339,7 @@
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/> attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
<field name="writeoff_acc_id" <field name="writeoff_acc_id"
attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}" attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}"
domain="[('type','=','liquidity')]"/> domain="[('type','=','other')]"/>
<!-- should select income accounts only. Or use the journal for this ? -->
<field name="writeoff_journal_id"
attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}"/>
<field name="comment" <field name="comment"
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/> attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
<field name="analytic_id" <field name="analytic_id"
@ -354,8 +360,21 @@
<field name="period_id"/> <field name="period_id"/>
<field name="audit"/> <field name="audit"/>
</group> </group>
<separator string="Journal Items" colspan="4"/> <field name="move_ids" colspan="4" nolabel="1" readonly="1">
<field name="move_ids" colspan="4" nolabel="1" readonly="1"/> <tree string="Journal Items">
<field name="move_id"/>
<field name="ref"/>
<field name="date"/>
<field name="statement_id"/>
<field name="partner_id"/>
<field name="account_id"/>
<field name="name"/>
<field name="debit"/>
<field name="credit"/>
<field name="state"/>
<field name="reconcile_id"/>
</tree>
</field>
</page> </page>
</notebook> </notebook>
<group col="10" colspan="4"> <group col="10" colspan="4">

View File

@ -86,7 +86,7 @@
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt'), ('partner_id','=',partner_id)]</field> <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt'), ('partner_id','=',partner_id)]</field>
<field name="context">{'type':'receipt', 'partner_id': partner_id, 'default_reference':reference}</field> <field name="context">{'type':'receipt', 'partner_id': partner_id, 'default_reference':reference}</field>
<field name="view_id" ref="view_vendor_receipt_form"/> <field name="view_id" ref="view_vendor_receipt_form"/>
<field name="target">new</field> <field name="target">current</field>
</record> </record>
<record model="ir.ui.view" id="view_sale_receipt_form"> <record model="ir.ui.view" id="view_sale_receipt_form">
@ -133,7 +133,7 @@
</group> </group>
<group col="4" colspan="1"> <group col="4" colspan="1">
<separator string="Total" colspan="4"/> <separator string="Total" colspan="4"/>
<field name="tax_id" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('sale','all'))]"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" groups="base.group_extended" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/> <field name="tax_id" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" groups="base.group_extended" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
<label string="" colspan="1"/><field name="amount" string="Total"/> <label string="" colspan="1"/><field name="amount" string="Total"/>
</group> </group>
</group> </group>
@ -144,8 +144,21 @@
<field name="period_id"/> <field name="period_id"/>
<field name="audit"/> <field name="audit"/>
</group> </group>
<separator string="Journal Items" colspan="4"/> <field name="move_ids" colspan="4" nolabel="1" readonly="1">
<field name="move_ids" colspan="4" nolabel="1" readonly="1"/> <tree string="Journal Items">
<field name="move_id"/>
<field name="ref"/>
<field name="date"/>
<field name="statement_id"/>
<field name="partner_id"/>
<field name="account_id"/>
<field name="name"/>
<field name="debit"/>
<field name="credit"/>
<field name="state"/>
<field name="reconcile_id"/>
</tree>
</field>
</page> </page>
</notebook> </notebook>
<group col="8" colspan="4"> <group col="8" colspan="4">
@ -154,7 +167,7 @@
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/> <button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/> <button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
<group attrs="{'invisible':[('state','!=','posted')]}"> <group attrs="{'invisible':[('state','!=','posted')]}">
<button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay" attrs="{'invisible':[('pay_now','!=','pay_now')]}"/> <button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id':partner_id, 'reference':reference, 'amount':amount}" type="action" string="Pay" attrs="{'invisible':[('pay_now','!=','pay_now')]}"/>
</group> </group>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/> <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
</group> </group>
@ -200,7 +213,7 @@
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment'), ('partner_id','=',partner_id)]</field> <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment'), ('partner_id','=',partner_id)]</field>
<field name="context">{'type':'payment', 'partner_id': partner_id, 'default_reference':reference}</field> <field name="context">{'type':'payment', 'partner_id': partner_id, 'default_reference':reference}</field>
<field name="view_id" ref="view_vendor_payment_form"/> <field name="view_id" ref="view_vendor_payment_form"/>
<field name="target">new</field> <field name="target">current</field>
</record> </record>
<record model="ir.ui.view" id="view_purchase_receipt_form"> <record model="ir.ui.view" id="view_purchase_receipt_form">
<field name="name">account.voucher.purchase.form</field> <field name="name">account.voucher.purchase.form</field>
@ -240,7 +253,7 @@
</group> </group>
<group col="4" colspan="1"> <group col="4" colspan="1">
<separator string="Total" colspan="4"/> <separator string="Total" colspan="4"/>
<field name="tax_id" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('purchase','all'))]"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax" groups="base.group_extended" attrs="{'invisible': [('state','!=','draft')]}"/> <field name="tax_id" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" widget="selection" domain="[('type_tax_use','in',('purchase','all')), ('parent_id', '=', False)]"/><field name="tax_amount" nolabel="1"/><button type="object" icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax" groups="base.group_extended" attrs="{'invisible': [('state','!=','draft')]}"/>
<label string="" colspan="1"/><field name="amount" string="Total"/> <label string="" colspan="1"/><field name="amount" string="Total"/>
</group> </group>
</group> </group>
@ -251,15 +264,30 @@
<field name="period_id"/> <field name="period_id"/>
<field name="audit"/> <field name="audit"/>
</group> </group>
<separator string="Journal Items" colspan="4"/> <field name="move_ids" colspan="4" nolabel="1" readonly="1">
<field name="move_ids" colspan="4" nolabel="1" readonly="1"/> <tree string="Journal Items">
<field name="move_id"/>
<field name="ref"/>
<field name="date"/>
<field name="statement_id"/>
<field name="partner_id"/>
<field name="account_id"/>
<field name="name"/>
<field name="debit"/>
<field name="credit"/>
<field name="state"/>
<field name="reconcile_id"/>
</tree>
</field>
</page> </page>
</notebook> </notebook>
<group col="10" colspan="4"> <group col="10" colspan="4">
<field name="state"/> <field name="state"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/> <button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/> <button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<button icon="terp-dolar_ok!" name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':[('pay_now','!=','pay_now'), ('state','!=','posted')]}"/> <group attrs="{'invisible':[('state','!=','posted')]}">
<button icon="terp-dolar_ok!" name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':[('pay_now','!=','pay_now')]}"/>
</group>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/> <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/> <button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
</group> </group>

View File

@ -38,7 +38,7 @@
<form string="Import Entries"> <form string="Import Entries">
<group colspan="4" expand="1"> <group colspan="4" expand="1">
<separator string="Payable and Receivables" colspan="4"/> <separator string="Payable and Receivables" colspan="4"/>
<field height="300" width="700" name="line_ids" colspan="4" nolabel="1" domain="[('account_id.type','in',['receivable','payable']),('reconcile_id','=',False), ('reconcile_partial_id','=',False)]"/> <field height="300" width="700" name="line_ids" colspan="4" nolabel="1" domain="[('account_id.type','in',['receivable','payable']),('reconcile_id','=',False), ('reconcile_partial_id','=',False), ('state', '=', 'valid')]"/>
</group> </group>
<group colspan="4" col="6"> <group colspan="4" col="6">
<label string ="" colspan="2"/> <label string ="" colspan="2"/>

View File

@ -206,7 +206,7 @@ class account_analytic_line(osv.osv):
'date': fields.date('Date', required=True, select=1), 'date': fields.date('Date', required=True, select=1),
'amount': fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')), 'amount': fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')),
'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'), 'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),
'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True), 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True, domain=[('type','<>','view')]),
'user_id': fields.many2one('res.users', 'User'), 'user_id': fields.many2one('res.users', 'User'),
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True), 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),

View File

@ -1028,7 +1028,7 @@ class res_partner(osv.osv):
if len(vat) not in(9, 10): if len(vat) not in(9, 10):
return False return False
if int(vat[0:2]) == 0 and len(vat) == 10: if int(vat[0:2]) in (0, 10, 20) and len(vat) == 10:
return True return True
if len(vat) == 10: if len(vat) == 10:

View File

@ -536,7 +536,7 @@ class crm_case_section(osv.osv):
'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by OpenERP about cases in this sales team"), 'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by OpenERP about cases in this sales team"),
'parent_id': fields.many2one('crm.case.section', 'Parent Team'), 'parent_id': fields.many2one('crm.case.section', 'Parent Team'),
'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Teams'), 'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Teams'),
'resource_calendar_id': fields.many2one('resource.calendar', "Resource's Calendar"), 'resource_calendar_id': fields.many2one('resource.calendar', "Working Time"),
'note': fields.text('Description'), 'note': fields.text('Description'),
'working_hours': fields.float('Working Hours', digits=(16,2 )), 'working_hours': fields.float('Working Hours', digits=(16,2 )),
'stage_ids': fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'), 'stage_ids': fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),

View File

@ -133,7 +133,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<group name="logistics" position="inside"> <group name="logistics" position="inside">
<field name="id" invisible="True"/> <field name="id" invisible="True"/>
<field name="carrier_id" context="{'order_id':active_id}"/> <field name="carrier_id" context="{'order_id':active_id or False}"/>
</group> </group>
</field> </field>
</record> </record>

View File

@ -26,7 +26,7 @@ from osv import fields,osv
class sale_order(osv.osv): class sale_order(osv.osv):
_inherit = 'sale.order' _inherit = 'sale.order'
_columns = { _columns = {
'carrier_id':fields.many2one("delivery.carrier","Delivery method", help="Complete this field if you plan to invoice the shipping based on picking."), 'carrier_id':fields.many2one("delivery.carrier", "Delivery Method", help="Complete this field if you plan to invoice the shipping based on picking."),
'id': fields.integer('ID', readonly=True,invisible=True), 'id': fields.integer('ID', readonly=True,invisible=True),
} }

View File

@ -149,8 +149,8 @@ class hr_employee(osv.osv):
'address_home_id': fields.many2one('res.partner.address', 'Home Address'), 'address_home_id': fields.many2one('res.partner.address', 'Home Address'),
'partner_id': fields.related('address_home_id', 'partner_id', type='many2one', relation='res.partner', readonly=True, help="Partner that is related to the current employee. Accounting transaction will be written on this partner belongs to employee."), 'partner_id': fields.related('address_home_id', 'partner_id', type='many2one', relation='res.partner', readonly=True, help="Partner that is related to the current employee. Accounting transaction will be written on this partner belongs to employee."),
'bank_account_id':fields.many2one('res.partner.bank', 'Bank Account', domain="[('partner_id','=',partner_id)]", help="Employee bank salary account"), 'bank_account_id':fields.many2one('res.partner.bank', 'Bank Account', domain="[('partner_id','=',partner_id)]", help="Employee bank salary account"),
'work_phone': fields.related('address_id', 'phone', type='char', size=32, string='Work Phone', readonly=True), 'work_phone': fields.char('Work Phone', size=32, readonly=False),
'work_email': fields.related('address_id', 'email', type='char', size=240, string='Work E-mail'), 'work_email': fields.char('Work E-mail', size=240),
'work_location': fields.char('Office Location', size=32), 'work_location': fields.char('Office Location', size=32),
'notes': fields.text('Notes'), 'notes': fields.text('Notes'),
'parent_id': fields.related('department_id', 'manager_id', relation='hr.employee', string='Manager', type='many2one', store=True, select=True, readonly=True, help="It is linked with manager of Department"), 'parent_id': fields.related('department_id', 'manager_id', relation='hr.employee', string='Manager', type='many2one', store=True, select=True, readonly=True, help="It is linked with manager of Department"),
@ -160,9 +160,15 @@ class hr_employee(osv.osv):
'coach_id': fields.many2one('hr.employee', 'Coach'), 'coach_id': fields.many2one('hr.employee', 'Coach'),
'job_id': fields.many2one('hr.job', 'Job'), 'job_id': fields.many2one('hr.job', 'Job'),
'photo': fields.binary('Photo'), 'photo': fields.binary('Photo'),
'passport_id':fields.char('Passport', size=64) 'passport_id':fields.char('Passport No', size=64)
} }
def onchange_address_id(self, cr, uid, ids, address, context=None):
if address:
address = self.pool.get('res.partner.address').browse(cr, uid, address, context=context)
return {'value': {'work_email': address.email, 'work_phone': address.phone}}
return {'value': {}}
def onchange_company(self, cr, uid, ids, company, context=None): def onchange_company(self, cr, uid, ids, company, context=None):
address_id = False address_id = False
if company: if company:

View File

@ -56,7 +56,7 @@
<separator string="Contact Information" colspan="2"/> <separator string="Contact Information" colspan="2"/>
<field name="address_home_id" colspan="2"/> <field name="address_home_id" colspan="2"/>
<field name="partner_id" invisible="1" /> <field name="partner_id" invisible="1" />
<field name="address_id" colspan="2" domain="[('partner_id', '=', partner_id)]"/> <field name="address_id" colspan="2" on_change="onchange_address_id(address_id)" domain="[('partner_id', '=', partner_id)]"/>
<field name="work_phone"/> <field name="work_phone"/>
<field name="work_email" widget="email" /> <field name="work_email" widget="email" />
<field name="work_location"/> <field name="work_location"/>
@ -340,7 +340,7 @@
<field name="requirements" colspan="4" nolabel="1"/> <field name="requirements" colspan="4" nolabel="1"/>
</page> </page>
<page string="Employee"> <page string="Employee">
<field name="employee_ids" colspan='4' nolabel="1" mode="tree,form"/> <field name="employee_ids" colspan='4' nolabel="1" widget="many2many" mode="tree,form"/>
</page> </page>
</notebook> </notebook>
<group col="6" colspan="4"> <group col="6" colspan="4">

View File

@ -34,8 +34,8 @@ class hr_evaluation_plan(osv.osv):
'name': fields.char("Evaluation Plan", size=64, required=True), 'name': fields.char("Evaluation Plan", size=64, required=True),
'company_id': fields.many2one('res.company', 'Company', required=True), 'company_id': fields.many2one('res.company', 'Company', required=True),
'phase_ids': fields.one2many('hr_evaluation.plan.phase', 'plan_id', 'Evaluation Phases'), 'phase_ids': fields.one2many('hr_evaluation.plan.phase', 'plan_id', 'Evaluation Phases'),
'month_first': fields.integer('Next Evaluation After'), 'month_first': fields.integer('First Evaluation in (months)', help="This number of months will be used to schedule the first evaluation date of the employee when selecting an evaluation plan. "),
'month_next': fields.integer('After the Date of Start'), 'month_next': fields.integer('Periodicity of Evaluations (months)', help="The number of month that depicts the delay between each evaluation of this plan (after the first one)."),
'active': fields.boolean('Active') 'active': fields.boolean('Active')
} }
_defaults = { _defaults = {
@ -101,7 +101,7 @@ class hr_employee(osv.osv):
_inherit="hr.employee" _inherit="hr.employee"
_columns = { _columns = {
'evaluation_plan_id': fields.many2one('hr_evaluation.plan', 'Evaluation Plan'), 'evaluation_plan_id': fields.many2one('hr_evaluation.plan', 'Evaluation Plan'),
'evaluation_date': fields.date('Next Evaluation', help="Date of the next evaluation"), 'evaluation_date': fields.date('Next Evaluation Date', help="The date of the next evaluation is computed by the evaluation plan's dates (first evaluation + periodicity)."),
} }
def run_employee_evaluation(self, cr, uid, automatic=False, use_new_cursor=False, context=None): def run_employee_evaluation(self, cr, uid, automatic=False, use_new_cursor=False, context=None):

View File

@ -154,23 +154,23 @@ class hr_expense_expense(osv.osv):
'invoice_line_tax_id': tax_id and [(6, 0, tax_id)] or False, 'invoice_line_tax_id': tax_id and [(6, 0, tax_id)] or False,
'account_analytic_id': l.analytic_account.id, 'account_analytic_id': l.analytic_account.id,
})) }))
if not exp.employee_id.address_id: if not exp.employee_id.address_home_id:
raise osv.except_osv(_('Error !'), _('The employee must have a working address')) raise osv.except_osv(_('Error !'), _('The employee must have a Home address'))
acc = exp.employee_id.address_id.partner_id.property_account_payable.id acc = exp.employee_id.address_home_id.partner_id.property_account_payable.id
payment_term_id = exp.employee_id.address_id.partner_id.property_payment_term.id payment_term_id = exp.employee_id.address_home_id.partner_id.property_payment_term.id
inv = { inv = {
'name': exp.name, 'name': exp.name,
'reference': sequence_obj.get(cr, uid, 'hr.expense.invoice'), 'reference': sequence_obj.get(cr, uid, 'hr.expense.invoice'),
'account_id': acc, 'account_id': acc,
'type': 'in_invoice', 'type': 'in_invoice',
'partner_id': exp.employee_id.address_id.partner_id.id, 'partner_id': exp.employee_id.address_home_id.partner_id.id,
'address_invoice_id': exp.employee_id.address_id.id, 'address_invoice_id': exp.employee_id.address_home_id.id,
'address_contact_id': exp.employee_id.address_id.id, 'address_contact_id': exp.employee_id.address_home_id.id,
'origin': exp.name, 'origin': exp.name,
'invoice_line': lines, 'invoice_line': lines,
'currency_id': exp.currency_id.id, 'currency_id': exp.currency_id.id,
'payment_term': payment_term_id, 'payment_term': payment_term_id,
'fiscal_position': exp.employee_id.address_id.partner_id.property_account_position.id 'fiscal_position': exp.employee_id.address_home_id.partner_id.property_account_position.id
} }
if payment_term_id: if payment_term_id:
to_update = invoice_obj.onchange_payment_term_date_invoice(cr, uid, [], payment_term_id, None) to_update = invoice_obj.onchange_payment_term_date_invoice(cr, uid, [], payment_term_id, None)
@ -240,13 +240,19 @@ class hr_expense_line(osv.osv):
_order = "sequence, date_value desc" _order = "sequence, date_value desc"
def onchange_product_id(self, cr, uid, ids, product_id, uom_id, employee_id, context=None): def onchange_product_id(self, cr, uid, ids, product_id, uom_id, employee_id, context=None):
if context is None:
ctx = {}
else:
# we only want to update it locally
ctx = context.copy()
res = {} res = {}
if product_id: if product_id:
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context) product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
res['name'] = product.name res['name'] = product.name
# Compute based on pricetype of employee company # Compute based on pricetype of employee company
context['currency_id'] = self.pool.get('hr.employee').browse(cr, uid, employee_id, context=context).user_id.company_id.currency_id.id ctx['currency_id'] = self.pool.get('hr.employee').browse(cr, uid, employee_id, context=context).user_id.company_id.currency_id.id
amount_unit = product.price_get('standard_price', context)[product.id] amount_unit = product.price_get('standard_price', ctx)[product.id]
res['unit_amount'] = amount_unit res['unit_amount'] = amount_unit
if not uom_id: if not uom_id:
res['uom_id'] = product.uom_id.id res['uom_id'] = product.uom_id.id

View File

@ -230,6 +230,7 @@ class hr_holidays(osv.osv):
list_ids = [ lr.id for lr in record.linked_request_ids] list_ids = [ lr.id for lr in record.linked_request_ids]
self.holidays_cancel(cr, uid, list_ids) self.holidays_cancel(cr, uid, list_ids)
self.unlink(cr, uid, list_ids) self.unlink(cr, uid, list_ids)
return True
def _check_date(self, cr, uid, ids, context=None): def _check_date(self, cr, uid, ids, context=None):
for rec in self.read(cr, uid, ids, ['number_of_days_temp', 'date_from','date_to', 'type']): for rec in self.read(cr, uid, ids, ['number_of_days_temp', 'date_from','date_to', 'type']):
@ -289,17 +290,23 @@ class hr_holidays(osv.osv):
return True return True
def holidays_validate2(self, cr, uid, ids, *args): def holidays_validate2(self, cr, uid, ids, *args):
obj_emp = self.pool.get('hr.employee')
wf_service = netsvc.LocalService("workflow")
vals = {'state':'validate1'} vals = {'state':'validate1'}
self.check_holidays(cr, uid, ids) self.check_holidays(cr, uid, ids)
ids2 = self.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)]) ids2 = obj_emp.search(cr, uid, [('user_id', '=', uid)])
if ids2: if ids2:
vals['manager_id'] = ids2[0] vals['manager_id'] = ids2[0]
else: else:
raise osv.except_osv(_('Warning !'),_('No user related to the selected employee.')) raise osv.except_osv(_('Warning !'),_('No user related to the selected employee.'))
# Second Time Validate all the leave requests of the category
for leave_id in self._get_category_leave_ids(cr, uid, ids):
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'second_validate', cr)
return self.write(cr, uid, ids, vals) return self.write(cr, uid, ids, vals)
def holidays_validate(self, cr, uid, ids, *args): def holidays_validate(self, cr, uid, ids, *args):
obj_emp = self.pool.get('hr.employee') obj_emp = self.pool.get('hr.employee')
wf_service = netsvc.LocalService("workflow")
data_holiday = self.browse(cr, uid, ids) data_holiday = self.browse(cr, uid, ids)
self.check_holidays(cr, uid, ids) self.check_holidays(cr, uid, ids)
vals = {'state':'validate'} vals = {'state':'validate'}
@ -324,19 +331,28 @@ class hr_holidays(osv.osv):
'holiday_id': record.id 'holiday_id': record.id
} }
self._create_resource_leave(cr, uid, vals) self._create_resource_leave(cr, uid, vals)
elif record.holiday_type == 'category' and record.type == 'remove': elif record.holiday_type == 'category':
# Create leave/allocation request for employees in the category
emp_ids = obj_emp.search(cr, uid, [('category_ids', '=', record.category_id.id)]) emp_ids = obj_emp.search(cr, uid, [('category_ids', '=', record.category_id.id)])
leave_ids = []
for emp in obj_emp.browse(cr, uid, emp_ids): for emp in obj_emp.browse(cr, uid, emp_ids):
vals = { vals = {
'name': record.name, 'name': record.name,
'date_from': record.date_from, 'type': record.type,
'date_to': record.date_to, 'holiday_type': 'employee',
'calendar_id': emp.calendar_id.id, 'holiday_status_id': record.holiday_status_id.id,
'company_id': emp.company_id.id, 'date_from': record.date_from,
'resource_id': emp.resource_id.id, 'date_to': record.date_to,
'holiday_id':record.id 'notes': record.notes,
} 'number_of_days_temp': record.number_of_days_temp,
self._create_resource_leave(cr, uid, vals) 'parent_id': record.id,
'employee_id': emp.id
}
leave_ids.append(self.create(cr, uid, vals, context=None))
# Confirm and validate all the leave requests of the category
for leave_id in leave_ids:
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'confirm', cr)
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'validate', cr)
return True return True
def holidays_confirm(self, cr, uid, ids, *args): def holidays_confirm(self, cr, uid, ids, *args):
@ -362,14 +378,19 @@ class hr_holidays(osv.osv):
if record.holiday_type == 'employee' and record.employee_id: if record.holiday_type == 'employee' and record.employee_id:
user_id = record.employee_id.user_id and record.employee_id.user_id.id or uid user_id = record.employee_id.user_id and record.employee_id.user_id.id or uid
self.write(cr, uid, [record.id], {'state':'confirm', 'number_of_days': nb, 'user_id': user_id }) self.write(cr, uid, [record.id], {'state':'confirm', 'number_of_days': nb, 'user_id': user_id})
return True return True
def holidays_refuse(self, cr, uid, ids, *args): def holidays_refuse(self, cr, uid, ids, *args):
obj_emp = self.pool.get('hr.employee')
wf_service = netsvc.LocalService("workflow")
vals = {'state': 'refuse'} vals = {'state': 'refuse'}
ids2 = self.pool.get('hr.employee').search(cr, uid, [('user_id','=', uid)]) ids2 = obj_emp.search(cr, uid, [('user_id','=', uid)])
if ids2: if ids2:
vals['manager_id'] = ids2[0] vals['manager_id'] = ids2[0]
# Refuse all the leave requests of the category
for leave_id in self._get_category_leave_ids(cr, uid, ids):
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'refuse', cr)
self.write(cr, uid, ids, vals) self.write(cr, uid, ids, vals)
return True return True
@ -380,6 +401,9 @@ class hr_holidays(osv.osv):
return True return True
def holidays_draft(self, cr, uid, ids, *args): def holidays_draft(self, cr, uid, ids, *args):
wf_service = netsvc.LocalService("workflow")
for leave_id in self._get_category_leave_ids(cr, uid, ids):
wf_service.trg_validate(uid, 'hr.holidays', leave_id, 'draft', cr)
return self.write(cr, uid, ids, {'state': 'draft'}) return self.write(cr, uid, ids, {'state': 'draft'})
def check_holidays(self, cr, uid, ids): def check_holidays(self, cr, uid, ids):

View File

@ -38,7 +38,8 @@
'depends': [ 'depends': [
'hr', 'hr',
'hr_contract', 'hr_contract',
'hr_holidays' 'hr_holidays',
'decimal_precision',
], ],
'init_xml': [ 'init_xml': [
], ],

View File

@ -312,7 +312,7 @@ class hr_contract(osv.osv):
_description = 'Employee Contract' _description = 'Employee Contract'
_columns = { _columns = {
'permit_no': fields.char('Work Permit No', size=256, required=False, readonly=False), 'permit_no': fields.char('Work Permit No', size=256, required=False, readonly=False),
'passport_id': fields.many2one('hr.passport', 'Passport', required=False), 'passport_id': fields.many2one('hr.passport', 'Passport No', required=False),
'visa_no': fields.char('Visa No', size=64, required=False, readonly=False), 'visa_no': fields.char('Visa No', size=64, required=False, readonly=False),
'visa_expire': fields.date('Visa Expire Date'), 'visa_expire': fields.date('Visa Expire Date'),
'struct_id': fields.many2one('hr.payroll.structure', 'Salary Structure'), 'struct_id': fields.many2one('hr.payroll.structure', 'Salary Structure'),
@ -1430,7 +1430,7 @@ class hr_employee(osv.osv):
return vals return vals
_columns = { _columns = {
'passport_id':fields.many2one('hr.passport', 'Passport', required=False, domain="[('employee_id','=',active_id), ('address_id','=',address_home_id)]", help="Employee Passport Information"), 'passport_id':fields.many2one('hr.passport', 'Passport No', required=False, domain="[('employee_id','=',active_id), ('address_id','=',address_home_id)]", help="Employee Passport Information"),
'line_ids':fields.one2many('hr.payslip.line', 'employee_id', 'Salary Structure', required=False), 'line_ids':fields.one2many('hr.payslip.line', 'employee_id', 'Salary Structure', required=False),
'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True), 'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True),
'otherid': fields.char('Other Id', size=64), 'otherid': fields.char('Other Id', size=64),

View File

@ -87,18 +87,6 @@
<!-- End Passport Views --> <!-- End Passport Views -->
<!-- Employee View --> <!-- Employee View -->
<record id="view_employee_bank_form" model="ir.ui.view">
<field name="name">res.partner.bank.form</field>
<field name="model">res.partner.bank</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_bank_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="replace">
<field name="partner_id" invisible="context.get('display_partner', False)"/>
</field>
</field>
</record>
<record id="hr_contract.hr_hr_employee_view_form2" model="ir.ui.view"> <record id="hr_contract.hr_hr_employee_view_form2" model="ir.ui.view">
<field name="name">hr.hr.employee.view.form2</field> <field name="name">hr.hr.employee.view.form2</field>
<field name="model">hr.employee</field> <field name="model">hr.employee</field>
@ -251,9 +239,9 @@
</field> </field>
</field> </field>
</record> </record>
<!-- End Employee View --> <!-- End Employee View -->
<!-- Contract View --> <!-- Contract View -->
<record id="hr_contract.hr_contract_view_form" model="ir.ui.view"> <record id="hr_contract.hr_contract_view_form" model="ir.ui.view">
<field name="name">hr.contract.view.form</field> <field name="name">hr.contract.view.form</field>
@ -407,12 +395,12 @@
<separator string="Validation" colspan="2"/> <separator string="Validation" colspan="2"/>
<newline/> <newline/>
<field name="active" /> <field name="active" />
<newline/> <newline/>
<field name="double_validation"/> <field name="double_validation"/>
<newline/> <newline/>
<field name="limit"/> <field name="limit"/>
</group> </group>
<group colspan="2"> <group colspan="2">
<separator colspan="2" string="Payroll Configurtion"/><newline/> <separator colspan="2" string="Payroll Configurtion"/><newline/>
<field name="type"/><newline/> <field name="type"/><newline/>
<field name="head_id"/><newline/> <field name="head_id"/><newline/>
@ -1088,7 +1076,7 @@
</form> </form>
</field> </field>
</record> </record>
<!-- Shortcuts --> <!-- Shortcuts -->
<act_window name="Payslips" <act_window name="Payslips"
domain="[('employee_id', '=', active_id)]" domain="[('employee_id', '=', active_id)]"

View File

@ -7,21 +7,5 @@
<field name="type">general</field> <field name="type">general</field>
</record> </record>
<record id="product_consultant" model="product.product">
<field name="list_price">75.0</field>
<field name="standard_price">30.0</field>
<field name="uom_id" ref="product.uom_hour"/>
<field name="uom_po_id" ref="product.uom_hour"/>
<field name="name">Service on Timesheet</field>
<field name="categ_id" ref="product.cat0"/>
<field name="type">service</field>
<field eval="False" name="purchase_ok"/>
</record>
<record id="hr.employee" model="hr.employee">
<field name="product_id" ref="product_consultant"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -2,6 +2,21 @@
<openerp> <openerp>
<data noupdate="1"> <data noupdate="1">
<record id="product_consultant" model="product.product">
<field name="list_price">75.0</field>
<field name="standard_price">30.0</field>
<field name="uom_id" ref="product.uom_hour"/>
<field name="uom_po_id" ref="product.uom_hour"/>
<field name="name">Service on Timesheet</field>
<field name="categ_id" ref="product.cat0"/>
<field name="type">service</field>
<field eval="False" name="purchase_ok"/>
</record>
<record id="hr.employee" model="hr.employee">
<field name="product_id" ref="product_consultant"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
<!-- complete our example employee --> <!-- complete our example employee -->
<record id="hr.employee1" model="hr.employee"> <record id="hr.employee1" model="hr.employee">
<field name="product_id" ref="product_consultant"/> <field name="product_id" ref="product_consultant"/>

View File

@ -23,6 +23,7 @@ import time
from osv import osv, fields from osv import osv, fields
from tools.translate import _ from tools.translate import _
# #
# Create an final invoice based on selected timesheet lines # Create an final invoice based on selected timesheet lines
# #
@ -79,7 +80,7 @@ class final_invoice_create(osv.osv_memory):
date_due = pterm_list[-1] date_due = pterm_list[-1]
curr_invoice = { curr_invoice = {
'name': time.strftime('%D')+' - '+account.name, 'name': time.strftime('%d/%m/%Y')+' - '+account.name,
'partner_id': account.partner_id.id, 'partner_id': account.partner_id.id,
'address_contact_id': res_partner_obj.address_get(cr, uid, [account.partner_id.id], adr_pref=['contact'])['contact'], 'address_contact_id': res_partner_obj.address_get(cr, uid, [account.partner_id.id], adr_pref=['contact'])['contact'],
'address_invoice_id': res_partner_obj.address_get(cr, uid, [account.partner_id.id], adr_pref=['invoice'])['invoice'], 'address_invoice_id': res_partner_obj.address_get(cr, uid, [account.partner_id.id], adr_pref=['invoice'])['invoice'],

View File

@ -92,7 +92,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
date_due = pterm_list[-1] date_due = pterm_list[-1]
curr_invoice = { curr_invoice = {
'name': time.strftime('%D')+' - '+account.name, 'name': time.strftime('%d/%m/%Y')+' - '+account.name,
'partner_id': account.partner_id.id, 'partner_id': account.partner_id.id,
'address_contact_id': res_partner_obj.address_get(cr, uid, 'address_contact_id': res_partner_obj.address_get(cr, uid,
[account.partner_id.id], adr_pref=['contact'])['contact'], [account.partner_id.id], adr_pref=['contact'])['contact'],

View File

@ -273,7 +273,7 @@ class hr_timesheet_sheet(osv.osv):
'draft': [('readonly', False)], 'draft': [('readonly', False)],
'new': [('readonly', False)]} 'new': [('readonly', False)]}
), ),
'attendances_ids' : one2many_mod2('hr.attendance', 'sheet_id', 'Attendances', readonly=True, states={'draft':[('readonly',False)],'new':[('readonly',False)]}), 'attendances_ids' : one2many_mod2('hr.attendance', 'sheet_id', 'Attendances', readonly=True,),
'state' : fields.selection([ 'state' : fields.selection([
('new', 'New'), ('new', 'New'),
('draft','Draft'), ('draft','Draft'),

View File

@ -132,8 +132,8 @@
<field name="state"/> <field name="state"/>
<button name="button_confirm" states="draft" string="Confirm" type="object" icon="terp-check"/> <button name="button_confirm" states="draft" string="Confirm" type="object" icon="terp-check"/>
<button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/> <button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-cancel"/> <button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
<button name="done" states="confirm" string="Approve" type="workflow" icon="terp-camera_test"/> <button name="done" states="confirm" string="Approve" type="workflow" icon="terp-camera_test" groups="base.group_hr_manager"/>
</group> </group>
</form> </form>
</field> </field>

File diff suppressed because it is too large Load Diff

View File

@ -276,6 +276,11 @@ msgstr ""
msgid "Max Discount(%)" msgid "Max Discount(%)"
msgstr "" msgstr ""
#. module: point_of_sale
#: view:pos.box.out:0
msgid "Output Operation"
msgstr ""
#. module: point_of_sale #. module: point_of_sale
#: model:ir.ui.menu,name:point_of_sale.menu_point_open_config #: model:ir.ui.menu,name:point_of_sale.menu_point_open_config
msgid "Cash register management" msgid "Cash register management"

View File

@ -276,6 +276,11 @@ msgstr ""
msgid "Max Discount(%)" msgid "Max Discount(%)"
msgstr "" msgstr ""
#. module: point_of_sale
#: view:pos.box.out:0
msgid "Output Operation"
msgstr ""
#. module: point_of_sale #. module: point_of_sale
#: model:ir.ui.menu,name:point_of_sale.menu_point_open_config #: model:ir.ui.menu,name:point_of_sale.menu_point_open_config
msgid "Cash register management" msgid "Cash register management"

View File

@ -276,6 +276,11 @@ msgstr ""
msgid "Max Discount(%)" msgid "Max Discount(%)"
msgstr "" msgstr ""
#. module: point_of_sale
#: view:pos.box.out:0
msgid "Output Operation"
msgstr ""
#. module: point_of_sale #. module: point_of_sale
#: model:ir.ui.menu,name:point_of_sale.menu_point_open_config #: model:ir.ui.menu,name:point_of_sale.menu_point_open_config
msgid "Cash register management" msgid "Cash register management"

View File

@ -276,6 +276,11 @@ msgstr ""
msgid "Max Discount(%)" msgid "Max Discount(%)"
msgstr "" msgstr ""
#. module: point_of_sale
#: view:pos.box.out:0
msgid "Output Operation"
msgstr ""
#. module: point_of_sale #. module: point_of_sale
#: model:ir.ui.menu,name:point_of_sale.menu_point_open_config #: model:ir.ui.menu,name:point_of_sale.menu_point_open_config
msgid "Cash register management" msgid "Cash register management"

View File

@ -276,6 +276,11 @@ msgstr ""
msgid "Max Discount(%)" msgid "Max Discount(%)"
msgstr "" msgstr ""
#. module: point_of_sale
#: view:pos.box.out:0
msgid "Output Operation"
msgstr ""
#. module: point_of_sale #. module: point_of_sale
#: model:ir.ui.menu,name:point_of_sale.menu_point_open_config #: model:ir.ui.menu,name:point_of_sale.menu_point_open_config
msgid "Cash register management" msgid "Cash register management"

View File

@ -277,6 +277,11 @@ msgstr ""
msgid "Max Discount(%)" msgid "Max Discount(%)"
msgstr "" msgstr ""
#. module: point_of_sale
#: view:pos.box.out:0
msgid "Output Operation"
msgstr ""
#. module: point_of_sale #. module: point_of_sale
#: model:ir.ui.menu,name:point_of_sale.menu_point_open_config #: model:ir.ui.menu,name:point_of_sale.menu_point_open_config
msgid "Cash register management" msgid "Cash register management"

View File

@ -277,6 +277,11 @@ msgstr ""
msgid "Max Discount(%)" msgid "Max Discount(%)"
msgstr "" msgstr ""
#. module: point_of_sale
#: view:pos.box.out:0
msgid "Output Operation"
msgstr ""
#. module: point_of_sale #. module: point_of_sale
#: model:ir.ui.menu,name:point_of_sale.menu_point_open_config #: model:ir.ui.menu,name:point_of_sale.menu_point_open_config
msgid "Cash register management" msgid "Cash register management"

View File

@ -1266,7 +1266,7 @@ msgstr "Pago punto de venta"
#. module: point_of_sale #. module: point_of_sale
#: view:pos.box.out:0 #: view:pos.box.out:0
msgid "Sortie de caisse" msgid "Output Operation"
msgstr "Salidas de caja" msgstr "Salidas de caja"
#. module: point_of_sale #. module: point_of_sale

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