add petty invoice base
This commit is contained in:
parent
05d3290bfd
commit
aa52f2fcf3
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
from odoo import api, fields, models, _
|
||||
|
||||
import cairo
|
||||
# import cairo
|
||||
|
||||
import base64
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from . import models
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "Project Petty Invoice",
|
||||
'summary': """Project/Account""",
|
||||
'category': 'Odex25-Project/Odex25-Project',
|
||||
'description': """
|
||||
Mark invoice as created from petty project
|
||||
""",
|
||||
'version': '0.1',
|
||||
'depends': ['petty_invoice','project_base'],
|
||||
'data': [
|
||||
'views/project_invoice_view.xml',
|
||||
],
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * project_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: project_petty_invoice
|
||||
#: model:ir.model.fields,field_description:project_petty_invoice.field_project_invoice__is_petty_paid
|
||||
#: model_terms:ir.ui.view,arch_db:project_petty_invoice.view_project_invoice_filter
|
||||
msgid "Paid by Petty Cash"
|
||||
msgstr "منصرفه من العهد"
|
||||
|
||||
#. module: project_petty_invoice
|
||||
#: model:ir.model,name:project_petty_invoice.model_project_invoice
|
||||
msgid "Project Invoice Request"
|
||||
msgstr "طلب فاتورة"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import project_invoice
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class ProjectInvoice(models.Model):
|
||||
_inherit = "project.invoice"
|
||||
is_petty_paid = fields.Boolean(string='Paid by Petty Cash', default=False)
|
||||
|
||||
def create_invoice(self):
|
||||
res = super(ProjectInvoice, self).create_invoice()
|
||||
self.invoice_id.is_petty_paid = self.is_petty_paid
|
||||
return res
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="project_invoice_form_view" model="ir.ui.view">
|
||||
<field name="name">project.invoice.paid.petty.inherit.form</field>
|
||||
<field name="model">project.invoice</field>
|
||||
<field name="inherit_id" ref="project_base.project_invoice_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='plan_date']" position="after">
|
||||
<field name="is_petty_paid"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_project_invoice_filter" model="ir.ui.view">
|
||||
<field name="name">project.invoice.paid.petty.inherit.search</field>
|
||||
<field name="model">project.invoice</field>
|
||||
<field name="inherit_id" ref="project_base.view_project_invoice_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='plan_date']" position="after">
|
||||
<field name="is_petty_paid"/>
|
||||
<filter name="is_petty_paid" string="Paid by Petty Cash"
|
||||
domain="[('is_petty_paid', '=',True)]"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Reference in New Issue