diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2007-04-22 19:21:02 +0000 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2007-04-22 19:21:02 +0000 |
| commit | 9f68a8b886d4d65ced1e91c0d7aa2dd113689d5d (patch) | |
| tree | 6838dbbf9b4c667bce65a724abed40becb4695e5 /addons | |
| parent | 2302e4492c84cff84e4e7731deebfe3330a1f194 (diff) | |
Improvements in invoice supplier
Description of the sale_journal module
bzr revid: fp@tinyerp.com-c0398aac7b242bc50c1424d79d4cee39d1d0c650
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/account_invoice_view.xml | 20 | ||||
| -rw-r--r-- | addons/account/invoice.py | 14 | ||||
| -rw-r--r-- | addons/sale_journal/__terp__.py | 23 |
3 files changed, 38 insertions, 19 deletions
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 37a01cf19c5..9c6de7849b3 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -126,29 +126,31 @@ <form string="Supplier invoice"> <notebook> <page string="Invoice"> - <field name="name" select="1"/> + <field name="journal_id" select="1"/> <field name="type" select="1"/> <field name="partner_id" on_change="onchange_partner_id(type,partner_id)" select="1"/> <field name="address_invoice_id" domain="[('partner_id','=',partner_id)]"/> <field name="account_id" domain="[('type','<>','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" /> <field name="date_due" select="1"/> - <field name="journal_id" select="1"/> - <field name="number" select="1"/> <field name="check_total"/> <field name="currency_id" on_change="onchange_currency_id(currency_id)" select="1"/> + <field name="name" select="1"/> + <field name="number" select="1"/> + <field name="invoice_line" nolabel="1" colspan="4"> <tree string="Invoice lines" editable="bottom"> - <field name="name"/> - + <field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id)"/> <field name="account_id" on_change="onchange_account_id(parent.partner_id,account_id)" domain="[('company_id', '=', parent.company_id),('journal_id','=',parent.journal_id)]"/> - <field name="invoice_line_tax_id"/> + <field name="invoice_line_tax_id" view_mode="2"/> <field name="account_analytic_id" domain="[('type','<>','view'), ('company_id', '=', parent.company_id)]" /> <field name="quantity"/> - <field name="price_unit"/> + <field name="price_unit"/> <!-- Removed if subtotal is set --> <field name="price_subtotal"/> + <field name="name"/> + <field name="uos_id" invisible="True"/> </tree> </field> <group col="2" colspan="2"> @@ -165,8 +167,8 @@ </group> <group col="4" colspan="2"> <field name="amount_untaxed"/> - <field name="amount_total"/> <field name="amount_tax"/> + <field name="amount_total"/> <button name="button_compute" string="Compute taxes" states="draft" type="object" colspan="2"/> <field name="state" select="1" colspan="3"/> <newline/> @@ -282,7 +284,7 @@ <menuitem name="Financial Management/Invoices/Customers Invoices" id="menu_action_invoice_tree1" action="action_invoice_tree1"/> <record model="ir.actions.act_window" id="action_invoice_tree2"> - <field name="name">account.invoice</field> + <field name="name">account.invoice.supplier</field> <field name="res_model">account.invoice</field> <field name="view_type">form</field> <field name="view_mode">form,tree</field> diff --git a/addons/account/invoice.py b/addons/account/invoice.py index bebed5bd52c..ffad23ff1ca 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -83,7 +83,7 @@ class account_invoice(osv.osv): _description = 'Invoice' _order = "number" _columns = { - 'name': fields.char('Invoice Description', size=64, required=True, select=True,readonly=True, states={'draft':[('readonly',False)]}), + 'name': fields.char('Description', size=64, select=True,readonly=True, states={'draft':[('readonly',False)]}), 'origin': fields.char('Origin', size=64), 'type': fields.selection([ ('out_invoice','Customer Invoice'), @@ -104,7 +104,6 @@ class account_invoice(osv.osv): ('cancel','Canceled') ],'State', select=True, readonly=True), - 'check_total': fields.float('Total', digits=(16,2)), 'date_invoice': fields.date('Date Invoiced', required=True, states={'open':[('readonly',True)],'close':[('readonly',True)]}), 'date_due': fields.date('Due Date', states={'open':[('readonly',True)],'close':[('readonly',True)]}), @@ -131,6 +130,8 @@ class account_invoice(osv.osv): 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'journal_id': fields.many2one('account.journal', 'Journal', required=True, relate=True,readonly=True, states={'draft':[('readonly',False)]}), 'company_id': fields.many2one('res.company', 'Company', required=True), + + 'check_total': fields.float('Total', digits=(16,2)), } _defaults = { 'type': lambda *a: 'out_invoice', @@ -262,7 +263,6 @@ class account_invoice(osv.osv): for inv in self.browse(cr, uid, ids): if inv.move_id: continue - print inv.check_amount, inv.amount_total if inv.check_total <> inv.amount_total: raise osv.except_osv('Bad total !', 'Please verify the price of the invoice !\nThe real total does not match the computed total.') @@ -315,7 +315,7 @@ class account_invoice(osv.osv): total_currency -= i['amount_currency'] or i['price'] acc_id = inv.account_id.id - name = inv['name'] + name = inv['name'] or '/' if inv.payment_term: totlines = self.pool.get('account.payment.term').compute(cr, uid, inv.payment_term.id, total) res_amount_currency = total_currency @@ -727,9 +727,3 @@ class account_invoice_tax(osv.osv): return res account_invoice_tax() -class account_invoice_supplier(osv.osv): - _inherit = 'account.invoice' - _columns = { - } -account_invoice_supplier() - diff --git a/addons/sale_journal/__terp__.py b/addons/sale_journal/__terp__.py index 5f2b633383d..4fc493ada55 100644 --- a/addons/sale_journal/__terp__.py +++ b/addons/sale_journal/__terp__.py @@ -11,6 +11,29 @@ "demo_xml" : ['sale_journal_demo.xml'], "init_xml" : ['sale_journal_data.xml'], "update_xml" : ["sale_journal_view.xml","picking_journal_view.xml","picking_journal_view_report.xml"], + "description" : """ + The sale journal modules allows you to categorize your + sales and deliveries (pickings) between different journals. + This module is very helpfull for bigger companies that + works by departments. + + You can use journal for different purposes, some examples: + * isolate sales of different departments + * journals for deliveries by truck or by UPS + + Journals have a responsible and evolves between different status: + * draft, open, cancel, done. + + Batch operations can be processed on the different journals to + confirm all sales at once, to validate or invoice pickings, ... + + It also supports batch invoicing methods that can be configured by + partners and sales orders, examples: + * daily invoicing, + * monthly invoicing, ... + + Some statistics by journals are provided. + """ "active": False, "installable": True } |
