← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3

 

psi (OpenERP) has proposed merging lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.

Requested reviews:
  OpenERP R&D Team (openerp-dev)


Vendor Payments:  
 * rename everywhere vendor into supplier: Vendor Payment -> Supplier Payment
 * Improve the way the system allocates the amount on the different "Outstanding Invoices" lines. The current behaviour is good (assign to oldest invoice). But, if one invoice has exacly the same Open Balance than the payment, assign the payment to this invoice in priority (even if it's not the oldest invoice)
 * There is two reports on the voucher object; voucher and Voucher print. Keep only the one without debit/credit) -> no need signature
 * New voucher -> "pay bill" button in a draft form is useless => remove this "Pay Bill" button when the invoice is still draft. Show only when it's posted. (button pay bill should only appears in confirmed state)
 
account: 
 * in accounting application : add a menu "Partners". as in purchase and sales. This Partners menu has a submenu: Partners (without filtering)
-- 
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2/+merge/42813
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-psi2 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
=== modified file 'account/account_invoice_view.xml'
--- account/account_invoice_view.xml	2010-10-26 11:15:11 +0000
+++ account/account_invoice_view.xml	2010-12-06 07:18:56 +0000
@@ -497,7 +497,7 @@
             <field name="domain">[('type','=','in_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="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>
         <menuitem action="action_invoice_tree4" id="menu_action_invoice_tree4" parent="menu_finance_payables"/>
 

=== modified file 'account/account_menuitem.xml'
--- account/account_menuitem.xml	2010-11-23 10:55:42 +0000
+++ account/account_menuitem.xml	2010-12-06 07:18:56 +0000
@@ -4,22 +4,23 @@
 
         <menuitem icon="terp-account" id="menu_finance" name="Accounting" sequence="13"
             groups="group_account_user,group_account_manager,group_account_invoice"/>
-        <menuitem id="menu_finance_receivables" name="Customers" parent="menu_finance" sequence="1"/>
-        <menuitem id="menu_finance_payables" name="Suppliers" parent="menu_finance" sequence="2"/>
-        <menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="3"
+        <menuitem id="menu_partners" name="Partners" parent="menu_finance" sequence="1"/>
+        <menuitem id="menu_finance_receivables" name="Customers" parent="menu_finance" sequence="2"/>
+        <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"/>
-        <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 -->
         <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_reconciliation" name="Reconciliation" 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_reporting" name="Reporting" parent="account.menu_finance" sequence="12"/>
+        <menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="6"/>
+        <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_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_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_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"/>
@@ -27,7 +28,7 @@
         <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="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="menu_account_end_year_treatments" name="End of Period" parent="menu_finance_periodical_processing" groups="group_account_manager,group_account_user" sequence="25"/>

=== modified file 'account/account_view.xml'
--- account/account_view.xml	2010-11-26 15:14:46 +0000
+++ account/account_view.xml	2010-12-06 07:18:56 +0000
@@ -2745,5 +2745,19 @@
         <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"/>
 
+        <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>
 </openerp>

=== modified file 'account/board_account_view.xml'
--- account/board_account_view.xml	2010-11-15 12:37:32 +0000
+++ account/board_account_view.xml	2010-12-06 07:18:56 +0000
@@ -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 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>

=== modified file 'account_budget/account_budget_view.xml'
--- account_budget/account_budget_view.xml	2010-11-02 07:04:55 +0000
+++ account_budget/account_budget_view.xml	2010-12-06 07:18:56 +0000
@@ -45,7 +45,7 @@
             <field name="view_id" ref="view_budget_post_tree"/>
             <field name="search_view_id" ref="view_budget_post_search"/>
         </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 action="open_budget_post_form" id="menu_budget_post_form" parent="next_id_pos" sequence="20"/>
 

=== modified file 'account_payment/account_payment_view.xml'
--- account_payment/account_payment_view.xml	2010-11-02 07:04:55 +0000
+++ account_payment/account_payment_view.xml	2010-12-06 07:18:56 +0000
@@ -39,7 +39,7 @@
             </field>
         </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">
             <field name="name">payment.mode.search</field>

=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py	2010-11-24 12:13:47 +0000
+++ account_voucher/account_voucher.py	2010-12-06 07:18:56 +0000
@@ -443,6 +443,18 @@
         ids.reverse()
         moves = move_line_pool.browse(cr, uid, ids)
 
+        priority_moves = []
+        for line in moves:
+            original_amount = line.credit or line.debit or 0.0
+            if original_amount == price:
+                priority_moves.append(line)
+
+        if priority_moves:
+            for line in moves:
+                if line not in priority_moves:
+                    priority_moves.append(line)
+            moves = priority_moves
+
         company_currency = journal.company_id.currency_id.id
         if company_currency != currency_id and ttype == 'payment':
             total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit)
@@ -463,13 +475,13 @@
             if line.debit and line.reconcile_partial_id and ttype == 'payment':
                 continue
 
-            orignal_amount = line.credit or line.debit or 0.0
+            original_amount = line.credit or line.debit or 0.0
             rs = {
                 'name':line.move_id.name,
                 'type': line.credit and 'dr' or 'cr',
                 'move_line_id':line.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_due':line.date_maturity,
                 'amount_unreconciled':currency_pool.compute(cr, uid, company_currency, currency_id, line.amount_unreconciled)
@@ -493,7 +505,6 @@
                 default['value']['pre_line'] = 1
             elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
                 default['value']['pre_line'] = 1
-
         return default
 
     def onchange_date(self, cr, user, ids, date, context={}):

=== modified file 'account_voucher/account_voucher_report.xml'
--- account_voucher/account_voucher_report.xml	2010-10-15 06:01:40 +0000
+++ account_voucher/account_voucher_report.xml	2010-12-06 07:18:56 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <openerp>
     <data>
-        <report id="report_account_voucher"
+   <!--     <report id="report_account_voucher"
             string="Voucher"
             model="account.voucher"
             name="voucher.cash_receipt.drcr"
@@ -9,7 +9,7 @@
             groups="base.group_extended"
             auto="False"
             header = "False"
-            menu="True"/>
+            menu="True"/> -->
 
         <report id="report_account_voucher_print"
             string="Voucher Print"

=== modified file 'account_voucher/report/account_voucher_print.rml'
--- account_voucher/report/account_voucher_print.rml	2010-11-15 08:43:20 +0000
+++ account_voucher/report/account_voucher_print.rml	2010-12-06 07:18:56 +0000
@@ -327,56 +327,5 @@
         </td>
       </tr>
     </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>
 </document>

=== modified file 'account_voucher/report/account_voucher_print.sxw'
Binary files account_voucher/report/account_voucher_print.sxw	2010-10-15 13:02:29 +0000 and account_voucher/report/account_voucher_print.sxw	2010-12-06 07:18:56 +0000 differ
=== modified file 'account_voucher/voucher_payment_receipt_view.xml'
--- account_voucher/voucher_payment_receipt_view.xml	2010-11-24 10:18:29 +0000
+++ account_voucher/voucher_payment_receipt_view.xml	2010-12-06 07:18:56 +0000
@@ -88,7 +88,7 @@
             <field name="arch" type="xml">
                 <form string="Bill Payment">
                     <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"
                             domain="[('type','in',['bank', 'cash'])]"
                             widget="selection" select="1"
@@ -106,7 +106,7 @@
                     <notebook colspan="4">
                         <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">
-                                <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}"
                                         on_change="onchange_move_line_id(move_line_id)"
                                         domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
@@ -151,7 +151,7 @@
             <field name="arch" type="xml">
                 <form string="Bill Payment">
                     <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"
                             domain="[('type','in',['bank', 'cash'])]"
                             widget="selection" select="1"
@@ -169,7 +169,7 @@
                     <notebook colspan="4">
                         <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">
-                                <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}"
                                         on_change="onchange_move_line_id(move_line_id)"
                                         domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
@@ -243,7 +243,7 @@
         </record>
 
         <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="view_type">form</field>
             <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment')]</field>

=== modified file 'account_voucher/voucher_sales_purchase_view.xml'
--- account_voucher/voucher_sales_purchase_view.xml	2010-10-27 11:08:06 +0000
+++ account_voucher/voucher_sales_purchase_view.xml	2010-12-06 07:18:56 +0000
@@ -259,7 +259,9 @@
                         <field name="state"/>
                         <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 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="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
                     </group>