← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/trunk-addons3-pso-usability into lp:~openerp-dev/openobject-addons/trunk-bugfixes-Ind

 

Priyesh (Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-addons3-pso-usability into lp:~openerp-dev/openobject-addons/trunk-bugfixes-Ind.

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

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons3-pso-usability/+merge/60912

Hello,

stock: Added company in stock journal
point_of_sale: Improved onchange to fetch salesman of partner
membership: Put attrs on free member to work accordingly associate membership
event: Corrected wrong context passed on creating of customer invoice
event: Added button for set to draft and Improved Usability
event: Renamed event dashboard menu
email_template: Renamed company account by corporate account
account_voucher: Removed confirm attribute from button
account_voucher: Fixed Integrity Error coming on validation
account_followup: Fixed keyerror of followup_id coming on followup sent menu
account: Added tooltip for fin.account in analytic items
account: Improved usability
account: Fixed problem of not creating account from account template

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons3-pso-usability/+merge/60912
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-dev/openobject-addons/trunk-addons3-pso-usability into lp:~openerp-dev/openobject-addons/trunk-bugfixes-Ind.
=== modified file 'account/account.py'
--- account/account.py	2011-05-05 14:43:40 +0000
+++ account/account.py	2011-05-13 12:49:25 +0000
@@ -2377,7 +2377,7 @@
         acc_obj = self.pool.get('account.account')
         tmpl_obj = self.pool.get('account.account.template')
         data = self.read(cr, uid, ids)
-        company_id = acc_obj.read(cr, uid, [data[0]['cparent_id']], ['company_id'])[0]['company_id'][0]
+        company_id = acc_obj.read(cr, uid, [data[0]['cparent_id'][0]], ['company_id'])[0]['company_id'][0]
         account_template = tmpl_obj.browse(cr, uid, context['tmpl_ids'])
         vals = {
             'name': account_template.name,
@@ -2388,7 +2388,7 @@
             'reconcile': account_template.reconcile,
             'shortcut': account_template.shortcut,
             'note': account_template.note,
-            'parent_id': data[0]['cparent_id'],
+            'parent_id': data[0]['cparent_id'][0],
             'company_id': company_id,
             }
         acc_obj.create(cr, uid, vals)

=== modified file 'account/account_bank_statement.py'
--- account/account_bank_statement.py	2011-04-07 15:06:57 +0000
+++ account/account_bank_statement.py	2011-05-13 12:49:25 +0000
@@ -127,7 +127,7 @@
     _name = "account.bank.statement"
     _description = "Bank Statement"
     _columns = {
-        'name': fields.char('Name', size=64, required=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself', states={'confirm': [('readonly', True)]}),
+        'name': fields.char('Name', size=64, required=True, help='If you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself', states={'confirm': [('readonly', True)]}),
         'date': fields.date('Date', required=True, states={'confirm': [('readonly', True)]}),
         'journal_id': fields.many2one('account.journal', 'Journal', required=True,
             readonly=True, states={'draft':[('readonly',False)]}),

=== modified file 'account/account_cash_statement.py'
--- account/account_cash_statement.py	2011-05-02 18:46:43 +0000
+++ account/account_cash_statement.py	2011-05-13 12:49:25 +0000
@@ -218,7 +218,7 @@
         return res
 
     _columns = {
-        'balance_end_real': fields.float('Closing Balance', digits_compute=dp.get_precision('Account'), states={'confirm': [('readonly', True)]}, help="closing balance entered by the cashbox verifier"),
+        'balance_end_real': fields.float('Closing Balance', digits_compute=dp.get_precision('Account'), states={'confirm': [('readonly', True)]}, help="Closing balance entered by the cashbox verifier"),
         'state': fields.selection(
             [('draft', 'Draft'),
             ('confirm', 'Closed'),
@@ -229,7 +229,7 @@
         'balance_end_cash': fields.function(_balance_end_cash, method=True, store=True, string='Balance', help="Closing balance based on cashBox"),
         'starting_details_ids': fields.one2many('account.cashbox.line', 'starting_id', string='Opening Cashbox'),
         'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'),
-        'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'),
+        'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='If you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'),
         'user_id': fields.many2one('res.users', 'Responsible', required=False),
     }
     _defaults = {

=== modified file 'account/project/project_view.xml'
--- account/project/project_view.xml	2011-03-10 10:16:50 +0000
+++ account/project/project_view.xml	2011-05-13 12:49:25 +0000
@@ -225,7 +225,7 @@
                         <filter string="Journal" context="{'group_by':'journal_id'}" icon="terp-folder-orange"/>
                         <filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
                         <separator orientation="vertical"/>
-                        <filter string="Fin.Account" context="{'group_by':'general_account_id'}" icon="terp-folder-green"/>
+                        <filter string="Fin.Account" context="{'group_by':'general_account_id'}" icon="terp-folder-green" help="Financial Accounts"/>
                         <separator orientation="vertical"/>
                         <filter string="Product" context="{'group_by':'product_id'}" icon="terp-accessories-archiver"/>
                     </group>

=== modified file 'account_followup/report/account_followup_report.py'
--- account_followup/report/account_followup_report.py	2011-01-14 00:11:01 +0000
+++ account_followup/report/account_followup_report.py	2011-05-13 12:49:25 +0000
@@ -68,7 +68,7 @@
         cr.execute("""
             create or replace view account_followup_stat as (
                 SELECT
-                    l.partner_id as id,
+                    l.id as id,
                     l.partner_id AS partner_id,
                     min(l.date) AS date_move,
                     max(l.date) AS date_move_last,

=== modified file 'account_voucher/account_voucher.py'
--- account_voucher/account_voucher.py	2011-04-20 06:07:17 +0000
+++ account_voucher/account_voucher.py	2011-05-13 12:49:25 +0000
@@ -633,6 +633,8 @@
         tax_obj = self.pool.get('account.tax')
         seq_obj = self.pool.get('ir.sequence')
         for inv in self.browse(cr, uid, ids, context=context):
+            if not inv.date:
+                raise osv.except_osv(_('Error !'), _('Please define a date !'))
             if inv.move_id:
                 continue
             context_multi_currency = context.copy()

=== modified file 'account_voucher/voucher_sales_purchase_view.xml'
--- account_voucher/voucher_sales_purchase_view.xml	2011-05-02 18:46:43 +0000
+++ account_voucher/voucher_sales_purchase_view.xml	2011-05-13 12:49:25 +0000
@@ -164,7 +164,7 @@
                     <group col="8" colspan="4">
                         <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 name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize"/>
                         <button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
                         <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, 'amount':amount}" type="action" string="Pay" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
@@ -284,7 +284,7 @@
                     <group col="10" colspan="4">
                         <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 name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" />
                         <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>

=== modified file 'email_template/email_template_account_view.xml'
--- email_template/email_template_account_view.xml	2011-02-07 11:32:52 +0000
+++ email_template/email_template_account_view.xml	2011-05-13 12:49:25 +0000
@@ -79,7 +79,7 @@
                     <filter icon="terp-camera_test" string="Approved" domain="[('state','=','approved')]"/>
                     <filter icon="terp-emblem-important" string="Suspended" domain="[('state','=','suspended')]"/>
                     <separator orientation="vertical"/>
-                    <filter icon="terp-go-home" string="Company Accounts" domain="[('company','=','yes')]"/>
+                    <filter icon="terp-go-home" string="Corporate Accounts" domain="[('company','=','yes')]"/>
                     <separator orientation="vertical"/>
                     <field name="user" select="1">
                         <filter icon="terp-personal" help="My Accounts" name="my" domain="[('user','=',uid)]"/>

=== modified file 'event/board_association_view.xml'
--- event/board_association_view.xml	2011-01-14 00:11:01 +0000
+++ event/board_association_view.xml	2011-05-13 12:49:25 +0000
@@ -75,7 +75,7 @@
         </record>
         <menuitem id="board_associations" name="Dashboard" parent="base.menu_report_association" sequence="0"/>
         <menuitem
-            name="Events" parent="board_associations"
+            name="Event Dashboard" parent="board_associations"
             action="open_board_associations_manager"
             sequence="1"
             id="menu_board_associations_manager"

=== modified file 'event/event.py'
--- event/event.py	2011-05-10 13:59:33 +0000
+++ event/event.py	2011-05-13 12:49:25 +0000
@@ -484,6 +484,10 @@
             }
         return True
 
+    def set_to_draft(self, cr, uid, ids, context=None):
+        self.write(cr, uid, ids, {'state': 'draft'}, context=context)
+        return True
+
     def button_reg_close(self, cr, uid, ids, context=None):
         """This Function Close Event Registration.
         """

=== modified file 'event/event_view.xml'
--- event/event_view.xml	2011-05-10 13:59:33 +0000
+++ event/event_view.xml	2011-05-13 12:49:25 +0000
@@ -34,15 +34,17 @@
         </record>
 
         <record model="ir.actions.act_window" id="action_event_type">
-            <field name="name">Types of Events</field>
+            <field name="name">Event Types</field>
             <field name="res_model">event.type</field>
             <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
         </record>
+
         <menuitem name="Configuration" id="base.menu_marketing_config_root" parent="base.marketing_menu" sequence="30" groups="base.group_extended"/>
         <menuitem name="Configuration" id="base.menu_marketing_config_association" parent="base.menu_association" sequence="30" groups="base.group_extended"/>
 
-        <menuitem name="Types of Events" id="menu_event_type" action="action_event_type" parent="base.menu_marketing_config_root" groups="base.group_extended"/>
-        <menuitem name="Types of Events" id="menu_event_type_association" action="action_event_type" parent="base.menu_marketing_config_association" groups="base.group_extended"/>
+        <menuitem name="Event Types" id="menu_event_type" action="action_event_type" parent="base.menu_marketing_config_root" groups="base.group_extended"/>
+        <menuitem name="Event Types" id="menu_event_type_association" action="action_event_type" parent="base.menu_marketing_config_association" groups="base.group_extended"/>
 
     <!-- Events Organisation/CONFIGURATION/EVENTS -->
 
@@ -356,6 +358,7 @@
                                 <button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
                                 <button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
                                 <button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
+                                <button name="set_to_draft" string="Set To Draft" states="done" type="object" icon="gtk-convert"/>
                             </group>
                         </page>
                         <page string="Extra Info">

=== modified file 'event/wizard/event_make_invoice.py'
--- event/wizard/event_make_invoice.py	2011-01-14 00:11:01 +0000
+++ event/wizard/event_make_invoice.py	2011-05-13 12:49:25 +0000
@@ -86,7 +86,7 @@
             'res_model': 'account.invoice',
             'view_id': False,
             'views': [(tree_res, 'tree'), (form_res, 'form')],
-            'context': "{'type':'out_refund'}",
+            'context': "{'type': 'out_invoice'}",
             'type': 'ir.actions.act_window',
         }
 

=== modified file 'membership/membership_view.xml'
--- membership/membership_view.xml	2011-03-22 12:15:12 +0000
+++ membership/membership_view.xml	2011-05-13 12:49:25 +0000
@@ -231,7 +231,7 @@
                     <page string="Membership">
                         <group colspan="2" col="2">
                             <group colspan="4" col="3">
-                            <field name="free_member"/>
+                            <field name="free_member" attrs="{'readonly':[('associate_member','!=',False)]}"/>
                             <button name="%(action_membership_invoice_view)d" type="action" string="Join Membership" attrs="{'readonly':[('free_member','=',True)]}" icon="gtk-apply"/>
                             <field colspan="4" name="associate_member" attrs="{'readonly':[('membership_state','!=', 'none')]}"/>
                             <field colspan="4" name="membership_state"/>

=== modified file 'point_of_sale/point_of_sale.py'
--- point_of_sale/point_of_sale.py	2011-05-12 05:47:29 +0000
+++ point_of_sale/point_of_sale.py	2011-05-13 12:49:25 +0000
@@ -74,8 +74,9 @@
         """ Changed price list on_change of partner_id"""
         if not part:
             return {'value': {}}
-        pricelist = self.pool.get('res.partner').browse(cr, uid, part, context=context).property_product_pricelist.id
-        return {'value': {'pricelist_id': pricelist}}
+        partner = self.pool.get('res.partner').browse(cr, uid, part, context=context)
+        return {'value': {'pricelist_id': partner.property_product_pricelist.id,
+                          'user_id': partner.user_id.id}}
 
     def _amount_total(self, cr, uid, ids, field_name, arg, context=None):
         """ Calculates amount_tax of order line
@@ -135,7 +136,6 @@
             date_p = date_p and date_p[0] or None
             if date_p:
                 res[order.id] = date_p
-                return res
             discount_allowed = order.company_id.company_discount
             for line in order.lines:
                 if line.discount > discount_allowed:

=== modified file 'stock/stock.py'
--- stock/stock.py	2011-05-10 13:05:31 +0000
+++ stock/stock.py	2011-05-13 12:49:25 +0000
@@ -55,9 +55,11 @@
     _columns = {
         'name': fields.char('Stock Journal', size=32, required=True),
         'user_id': fields.many2one('res.users', 'Responsible'),
+        'company_id': fields.many2one('res.company', 'Company')
     }
     _defaults = {
-        'user_id': lambda s, c, u, ctx: u
+        'user_id': lambda s, c, u, ctx: u,
+        'company_id': lambda self, cr, uid, context: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.journal', context=context),
     }
 
 stock_journal()

=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml	2011-05-02 18:46:43 +0000
+++ stock/stock_view.xml	2011-05-13 12:49:25 +0000
@@ -1924,6 +1924,7 @@
                 <search string="Stock Journal">
                     <field name="name"/>
                     <field name="user_id"/>
+                    <field name="company_id" widget="selection"/>
                 </search>
             </field>
         </record>
@@ -1935,6 +1936,7 @@
                 <tree string="Stock Journal">
                     <field name="name"/>
                     <field name="user_id"/>
+                    <field name="company_id" />
                 </tree>
             </field>
         </record>
@@ -1946,6 +1948,7 @@
                 <form string="Stock Journal">
                     <field name="name"/>
                     <field name="user_id"/>
+                    <field name="company_id" widget="selection"/>
                 </form>
             </field>
         </record>


Follow ups