You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							79 lines
						
					
					
						
							3.5 KiB
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							79 lines
						
					
					
						
							3.5 KiB
						
					
					
				| # -*- coding: utf-8 -*- | |
| ############################################################################# | |
| # | |
| #    Cybrosys Technologies Pvt. Ltd. | |
| # | |
| #    Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) | |
| #    Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) | |
| # | |
| #    You can modify it under the terms of the GNU LESSER | |
| #    GENERAL PUBLIC LICENSE (LGPL v3), Version 3. | |
| # | |
| #    This program is distributed in the hope that it will be useful, | |
| #    but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | |
| #    GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. | |
| # | |
| #    You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE | |
| #    (LGPL v3) along with this program. | |
| #    If not, see <http://www.gnu.org/licenses/>. | |
| # | |
| ############################################################################# | |
| 
 | |
| from odoo import models, fields, api | |
| 
 | |
| 
 | |
| class AddDocumentTemplate(models.Model): | |
|     _name = "doc.layout.purchase" | |
|     _description = 'Adding the fields for customization' | |
|     _rec_name = 'name' | |
| 
 | |
|     name = fields.Char("Name") | |
| 
 | |
|     base_color = fields.Char("Base Color", | |
|                              help="Background color for the invoice") | |
| 
 | |
|     heading_text_color = fields.Char("Heading text Color", | |
|                                      help="Heading Text color") | |
| 
 | |
|     text_color = fields.Char("Text Color", help="Text color of items") | |
| 
 | |
|     customer_text_color = fields.Char("Customer Text Color", | |
|                                       help="Customer address text color") | |
| 
 | |
|     company_text_color = fields.Char("Company Text Color", | |
|                                      help="Company address Text color") | |
| 
 | |
|     logo_position = fields.Selection([('left', 'Left'), ('right', 'Right')], | |
|                                      string="Logo Position", | |
|                                      help="Company logo position") | |
| 
 | |
|     customer_position = fields.Selection( | |
|         [('left', 'Left'), ('right', 'Right')], string="Customer position", | |
|         help="Customer address position") | |
|     shipping_address = fields.Boolean('Shipping Address', default=True, | |
|                                   help="Enable shipping address if required to print on report.") | |
|     shipping_address_position = fields.Selection( | |
|         [('left', 'Left'), ('right', 'Right')], string="Shipping Address position", | |
|         help="Customer address position") | |
| 
 | |
|     company_position = fields.Selection([('left', 'Left'), ('right', 'Right')], | |
|                                         string="Company Address Position", | |
|                                         help="Company address position") | |
| 
 | |
|     purchase_rep = fields.Boolean('Purchase Representative', default=False, | |
|                                   help="Purchase Representative") | |
|     description = fields.Boolean('Description', default=False, | |
|                                  help="Description") | |
|     code = fields.Boolean('Internal Reference', default=False, help="HSN code") | |
|     tax_value = fields.Boolean('Tax', default=False, help="Tax") | |
|     reference = fields.Boolean('Order Reference', default=False, | |
|                                help="Customer Reference") | |
|     source = fields.Boolean('Source', default=False, | |
|                             help="Source Document") | |
|     address = fields.Boolean('Address', default=False, | |
|                              help="Address") | |
|     city = fields.Boolean('City', default=False, | |
|                           help="City") | |
|     country = fields.Boolean('Country', default=False, | |
|                              help="Country")
 | |
| 
 |