diff options
| author | Quentin (OpenERP) <qdp-launchpad@openerp.com> | 2011-05-03 11:03:54 +0200 |
|---|---|---|
| committer | Quentin (OpenERP) <qdp-launchpad@openerp.com> | 2011-05-03 11:03:54 +0200 |
| commit | c5bfb5faaae8261d63ef641ac59ec8dbf9dbaae3 (patch) | |
| tree | 1985c37f4aa5ea2ea0d9c7aff45b43f514760464 /addons | |
| parent | 06444d3801fd544509ceabcb7d1350866ddf96ab (diff) | |
| parent | 05774dec14c58955dc8a45091ea7ddf25a2847a5 (diff) | |
[MERGE] lp: 767590
bzr revid: qdp-launchpad@openerp.com-20110503090354-rv0ya6drpef46fxd
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/account_invoice_view.xml | 5 | ||||
| -rw-r--r-- | addons/account/invoice.py | 23 | ||||
| -rw-r--r-- | addons/account_payment/account_payment_view.xml | 2 |
3 files changed, 22 insertions, 8 deletions
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 43f09bebc49..ed45c705674 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -123,6 +123,7 @@ <field name="date_invoice"/> <field name="number"/> <field name="partner_id" groups="base.group_user"/> + <field name="reference" invisible="1"/> <field name="name"/> <field name="journal_id" invisible="1"/> <field name="period_id" invisible="1" groups="account.group_account_user"/> @@ -377,6 +378,10 @@ <field name="period_id" select='1' string="Period"/> </group> <newline/> + <group expand="0" string="Extended Filters..." name = "extended filter" > + <field name="reference" select="1" string="Invoice Reference"/> + </group> + <newline/> <group expand="0" string="Group By..."> <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/> <filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/> diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 26906ef3308..ce33266d9bf 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -312,13 +312,20 @@ class account_invoice(osv.osv): journal_select = journal_obj._name_search(cr, uid, '', [('type', '=', type)], context=context, limit=None, name_get_uid=1) res['fields'][field]['selection'] = journal_select + doc = etree.XML(res['arch']) + if view_type == 'search': + if context.get('type', 'in_invoice') in ('out_invoice', 'out_refund'): + for node in doc.xpath("//group[@name='extended filter']"): + doc.remove(node) + res['arch'] = etree.tostring(doc) + if view_type == 'tree': - doc = etree.XML(res['arch']) - nodes = doc.xpath("//field[@name='partner_id']") partner_string = _('Customer') if context.get('type', 'out_invoice') in ('in_invoice', 'in_refund'): partner_string = _('Supplier') - for node in nodes: + for node in doc.xpath("//field[@name='reference']"): + node.set('invisible', '0') + for node in doc.xpath("//field[@name='partner_id']"): node.set('string', partner_string) res['arch'] = etree.tostring(doc) return res @@ -1609,17 +1616,17 @@ class res_partner(osv.osv): _columns = { 'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True), } - + def copy(self, cr, uid, id, default=None, context=None): if default is None: default = {} - + if context is None: - context = {} - + context = {} + default.update({'invoice_ids' : []}) return super(res_partner, self).copy(cr, uid, id, default, context) - + res_partner() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml index 6f7acc7a367..76197140b49 100644 --- a/addons/account_payment/account_payment_view.xml +++ b/addons/account_payment/account_payment_view.xml @@ -150,6 +150,7 @@ <tree string="Payment Line"> <field name="ml_inv_ref" /> <field name="partner_id" select="1"/> + <field name="communication"/> <field name="bank_id" domain="[('partner_id', '=', partner_id)]"/> <field name="ml_maturity_date"/> <field name="date"/> @@ -291,6 +292,7 @@ <field name="ml_inv_ref" /> <field name="ml_maturity_date"/> <field name="partner_id" select="1"/> + <field name="communication"/> <field name="amount" sum="Amount Total"/> <field name="amount_currency" sum="Currency Amount Total"/> <field name="currency"/> |
