Merge lp:~julie-w/unifield-server/US-6098 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5400
Proposed branch: lp:~julie-w/unifield-server/US-6098
Merge into: lp:unifield-server
Diff against target: 40 lines (+17/-1)
2 files modified
bin/addons/register_accounting/account_bank_statement.py (+9/-0)
bin/addons/register_accounting/account_view.xml (+8/-1)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-6098
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+368465@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/register_accounting/account_bank_statement.py'
2--- bin/addons/register_accounting/account_bank_statement.py 2019-05-14 08:00:10 +0000
3+++ bin/addons/register_accounting/account_bank_statement.py 2019-06-06 13:38:54 +0000
4@@ -91,7 +91,16 @@
5 def _search_filter_third(self, cr, uid, obj, name, args, context):
6 if not context:
7 context = {}
8+ regline_obj = self.pool.get('account.bank.statement.line')
9 dom = [('type', 'in', ['cash', 'bank', 'cheque'])]
10+ if context.get('from', '') == 'regline_view' and context.get('active_id'):
11+ # get the currency and journal values for the View "Register Lines" accessible from the reg. Actions Menu
12+ reg_line = regline_obj.browse(cr, uid, context['active_id'], fields_to_fetch=['statement_id'], context=context)
13+ reg = reg_line and reg_line.statement_id
14+ if reg and not context.get('curr'):
15+ context['curr'] = reg.currency and reg.currency.id or False
16+ if reg and not context.get('journal'):
17+ context['journal'] = reg.journal_id.id
18 if not args or not context.get('curr') or not context.get('journal'):
19 return dom
20 if args[0][2]:
21
22=== modified file 'bin/addons/register_accounting/account_view.xml'
23--- bin/addons/register_accounting/account_view.xml 2019-04-25 08:45:56 +0000
24+++ bin/addons/register_accounting/account_view.xml 2019-06-06 13:38:54 +0000
25@@ -434,7 +434,14 @@
26 <field name="name" string="Description"/>
27 <field name="ref"/>
28 <field name="account_id" domain="[('restricted_area', '=', 'register_lines')]"/>
29- <field name="partner_type" context="{'search_default_active': True}"/>
30+ <field name="number_imported_invoice" invisible="1"/>
31+ <field name="from_import_cheque_id" invisible="1"/>
32+ <field name="partner_type_mandatory" invisible="1"/>
33+ <field name="partner_type"
34+ attrs="{'readonly': ['|', '|', ('number_imported_invoice', '>', 0), ('from_import_cheque_id', '!=', False), ('direct_invoice', '=', True)],
35+ 'required': [('partner_type_mandatory', '=', True)]}"
36+ domain="[('filter_for_third_party', '=', account_id)]"
37+ context="{'search_default_active': True, 'from': 'regline_view',}" />
38 <field name="partner_id" invisible="1"/>
39 <field name="employee_id" invisible="1"/>
40 <field name="transfer_journal_id" invisible="1"/>

Subscribers

People subscribed via source and target branches