Files
odoo_source/addons/l10n_ph/models/account_move.py
T
Tommy (tong) d958068582 [ADD] l10n_ph
- add philippines localization

task-2713149

closes odoo/odoo#105062

X-original-commit: 60b9738f7923135ec018fbdcd2cbbfa6de8c75e0
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2022-11-08 07:46:40 +01:00

20 lines
717 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import _, models
from odoo.exceptions import UserError
class AccountMove(models.Model):
_inherit = "account.move"
def action_open_l10n_ph_2307_wizard(self):
vendor_bills = self.filtered_domain([('move_type', '=', 'in_invoice')])
if vendor_bills:
wizard_action = self.env["ir.actions.act_window"]._for_xml_id("l10n_ph.view_l10n_ph_2307_wizard_act_window")
wizard_action.update({
'context': {'default_moves_to_export': vendor_bills.ids}
})
return wizard_action
else:
raise UserError(_('Only Vendor Bills are available.'))