Pārlūkot izejas kodu

Agregar en la vista lista y formulario el campo de la ciudad del cliente

sebas 2 gadi atpakaļ
revīzija
d85db21837

+ 1 - 0
__init__.py

@@ -0,0 +1 @@
+import models

BIN
__init__.pyc


+ 25 - 0
__openerp__.py

@@ -0,0 +1,25 @@
+{
+    'name': 'Partner data in Sale View',
+    'version': '1.0',
+    'category': 'sale',
+    'sequence': 6,
+    'summary': "Partner data in Sale View",
+    'author': 'EIRU',
+    'company': 'Eiru Software',
+    'website': 'http://www.eiru.com.py',
+
+    'description': """
+
+Partner data in Sale View
+=======================
+Partner data in Sale View
+""",
+    'depends': ['sale', 'base'],
+    'data': [
+        'views/sale_view.xml'
+    ],
+    'demo': [
+    ],
+    'installable': True,
+    'auto_install': False,
+}

+ 32 - 0
__openerp__.py~

@@ -0,0 +1,32 @@
+{
+    'name': 'Sale Discount on Total Amount',
+    'version': '1.0',
+    'category': 'sale',
+    'sequence': 6,
+    'summary': "A module meant to provide discount for total amount and Discount limit with approval in sales",
+    'author': 'Cybrosys Techno Solutions',
+    'company': 'Cybrosys Techno Solutions',
+    'website': 'http://www.cybrosys.com',
+
+    'description': """
+
+Sale Discount for Total Amount
+=======================
+Module to manage discount on total amount in Sale.
+        as an specific amount or percentage
+""",
+    'depends': ['sale', 'base', 'stock'],
+    'data': [
+        'views/sale_view.xml',
+        'views/account_invoice_view.xml',
+        'views/invoice_report.xml',
+        'views/sale_order_report.xml',
+        'views/sale_discount_approval_view.xml',
+        'views/sale_discount_approval_workflow.xml'
+
+    ],
+    'demo': [
+    ],
+    'installable': True,
+    'auto_install': False,
+}

+ 1 - 0
models/__init__.py

@@ -0,0 +1 @@
+import sale

BIN
models/__init__.pyc


+ 11 - 0
models/sale.py

@@ -0,0 +1,11 @@
+from openerp.osv import fields, osv
+from openerp import api
+import openerp.addons.decimal_precision as dp
+
+
+class SaleOrder(osv.Model):
+    _inherit = 'sale.order'
+
+    _columns = {
+        'city' : fields.char('Ciudad', related='partner_id.city',store=True),
+    }

BIN
models/sale.pyc


BIN
static/description/Disc_appr_conf.png


BIN
static/description/Disc_appr_wrkfl.png


BIN
static/description/Discount_inv_amnt.png


BIN
static/description/Discount_so_perc.png


BIN
static/description/icon.png


+ 39 - 0
static/description/index.html

@@ -0,0 +1,39 @@
+<section class="oe_container">
+    <div class="oe_row">
+        <h2 class="oe_slogan">Discount On Total in Sale and Invoice</h2>
+        <!--<h3 class="oe_slogan">It Fits Your Sales Approach</h3>-->
+        <div>
+            <p>
+                This module allows you to mention discount on Total of sale order and Total of Customer Invoice in two ways
+            </p>
+            <hr>
+            <p>
+                1. As percentage<br>
+                    Select 'Percentage' from Discount type and give discount percentage as Discount rate.
+                    System will update the value of Discount and Total
+            </p>
+            <div class="oe_row_img oe_centered oe_mt32">
+                <img class="oe_picture oe_screenshot" src="Discount_so_perc.png">
+            </div>
+            <hr>
+            <p>
+                2. As amount<br>
+                Select 'Amount' from Discount type and give discount amount as Discount rate.
+                System will update the value of Discount and Total
+            </p>
+            <div class="oe_row_img oe_centered oe_mt32">
+                <img class="oe_picture oe_screenshot" src="Discount_inv_amnt.png">
+            </div>
+            <hr>
+            <p>
+                And the module also allows you to set a limit for total discount in percentage. Exceeding this limit
+                will require approval.
+            </p>
+            <div class="oe_row_img oe_centered oe_mt32">
+                <img class="oe_picture oe_screenshot" src="Disc_appr_conf.png"><hr>
+                <img class="oe_picture oe_screenshot" src="Disc_appr_wrkfl.png">
+            </div>
+        </div>
+
+    </div>
+</section>

+ 39 - 0
static/description/index.html~

@@ -0,0 +1,39 @@
+<section class="oe_container">
+    <div class="oe_row">
+        <h2 class="oe_slogan">Discount On Sale</h2>
+        <!--<h3 class="oe_slogan">It Fits Your Sales Approach</h3>-->
+        <div>
+            <p>
+                This module allows you to mention discount on Total of sale order and Total of Customer Invoice in two ways
+            </p>
+            <hr>
+            <p>
+                1. As percentage<br>
+                    Select 'Percentage' from Discount type and give discount percentage as Discount rate.
+                    System will update the value of Discount and Total
+            </p>
+            <div class="oe_row_img oe_centered oe_mt32">
+                <img class="oe_picture oe_screenshot" src="Discount_so_perc.png">
+            </div>
+            <hr>
+            <p>
+                2. As amount<br>
+                Select 'Amount' from Discount type and give discount amount as Discount rate.
+                System will update the value of Discount and Total
+            </p>
+            <div class="oe_row_img oe_centered oe_mt32">
+                <img class="oe_picture oe_screenshot" src="Discount_inv_amnt.png">
+            </div>
+            <hr>
+            <p>
+                And the module also allows you to set a limit for total discount in percentage. Exceeding this limit
+                will require approval.
+            </p>
+            <div class="oe_row_img oe_centered oe_mt32">
+                <img class="oe_picture oe_screenshot" src="Disc_appr_conf.png"><hr>
+                <img class="oe_picture oe_screenshot" src="Disc_appr_wrkfl.png">
+            </div>
+        </div>
+
+    </div>
+</section>

+ 43 - 0
views/sale_view.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+
+      <record id="view_sale_orderfiltercity_view" model="ir.ui.view">
+            <field name="name">sale.order.filtercity.views</field>
+            <field name="model">sale.order</field>
+            <field name="inherit_id" ref="sale.view_order_form" />
+            <field name="arch" type="xml">
+               <xpath expr="//field[@name='partner_id']" position="after">
+                   <field name="city" string="Ciudad"/>
+               </xpath>
+            </field>
+        </record>
+
+        <record id="sale_order_tree" model="ir.ui.view">
+            <field name="name">sale_order_tree</field>
+            <field name="model">sale.order</field>
+            <field name="inherit_id" ref="sale.view_order_tree"/>
+            <field name="arch" type="xml">
+                <field name="partner_id" position="after">
+                    <field name="city"></field>
+                </field>
+            </field>
+         </record>
+
+
+      <record id="view_sale_orderfiltercity_search" model="ir.ui.view">
+            <field name="name">sale.order.filtercity.search1</field>
+            <field name="model">sale.order</field>
+            <field name="inherit_id" ref="sale.view_sales_order_filter" />
+            <field name="arch" type="xml">
+              <search>
+                  <separator/>
+                  <group string="">
+                      <filter string="Por Ciudad" context="{'group_by':'city'}"/>
+                  </group>
+               </search>
+            </field>
+        </record>
+
+    </data>
+</openerp>