Merge pull request #1624 from expsa/pla-454454-base-petty-invoice

add petty invoice base
This commit is contained in:
Mostafa Abdo 2024-10-26 21:25:50 -07:00 committed by GitHub
commit fa6e3d8259
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 96 additions and 0 deletions

View File

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import models

View File

@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
{
'name': "Petty Invoice",
'summary': """Accounting""",
'category': 'Odex25-Project/Odex25-Project',
'description': """
Mark invoice as petty cash one
""",
'version': '0.1',
'depends': ['account'],
'data': [
'views/account_move_view.xml',
],
}

View File

@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * petty_invoice
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-27 03:55+0000\n"
"PO-Revision-Date: 2024-10-27 03:55+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: petty_invoice
#: model_terms:ir.ui.view,arch_db:petty_invoice.view_account_invoice_filter
msgid "Created By"
msgstr "تم الإنشاء بواسطة"
#. module: petty_invoice
#: model:ir.model,name:petty_invoice.model_account_move
msgid "Journal Entry"
msgstr "قيد اليومية"
#. module: petty_invoice
#: model:ir.model.fields,field_description:petty_invoice.field_account_bank_statement_line__is_petty_paid
#: model:ir.model.fields,field_description:petty_invoice.field_account_move__is_petty_paid
#: model:ir.model.fields,field_description:petty_invoice.field_account_payment__is_petty_paid
#: model_terms:ir.ui.view,arch_db:petty_invoice.view_account_invoice_filter
msgid "Paid by Petty Cash"
msgstr "منصرفه من العهد"

View File

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import account_move

View File

@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
from odoo import models, fields
class AccountMove(models.Model):
_inherit = 'account.move'
is_petty_paid = fields.Boolean(string='Paid by Petty Cash', default=False)

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_account_invoice_filter" model="ir.ui.view">
<field name="name">account.move.paid.petty.inherit.select</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='date']" position="after">
<field name="is_petty_paid"/>
<filter name="is_petty_paid" string="Paid by Petty Cash"
domain="[('is_petty_paid', '=',True)]"/>
</xpath>
<xpath expr="//group" position="inside">
<filter name="group_by_created_by" string="Created By" context="{'group_by':'create_uid'}"/>
</xpath>
</field>
</record>
<record id="view_move_form" model="ir.ui.view">
<field name="name">account.move.paid.petty.inherit.form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='invoice_date']" position="after">
<field name="is_petty_paid" readonly="1"/>
</xpath>
</field>
</record>
</odoo>