account_voucher is not multi company safe

Now set period_id and company_id according to the journal used.

Updated the default method for period_id and the onchange method for journal.
Hi

Ok, good points. Thanks for the review. This is my first pull request so I
have a question: How can I change the PR to take your changes into account?
Must I make a new one? Pardon my ignorance...

-Torvald


2014-10-22 11:28 GMT+02:00 Kinner Vachhani <notifications@github.com>:

> In addons/account_voucher/account_voucher.py:
>
> > @@ -608,7 +619,10 @@ def basic_onchange_partner(self, cr, uid, ids, partner_id, journal_id, ttype, co
> >          else:
> >              account_id = journal.default_credit_account_id.id or journal.default_debit_account_id.id
> >
> > +        company_id = partner.company_id
>
> @mart-e <https://github.com/mart-e> I completely agree with you. Voucher
> should use journal company instead of partner company.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/odoo/odoo/pull/3208/files#r19202478>.
>



-- 
Torvald Baade Bringsvor
Bringsvor Consulting AS - Odoo (formerly OpenERP) implementation partner