# card **Repository Path**: odooer/card ## Basic Information - **Project Name**: card - **Description**: https://github.com/amadhaji/card 可在frappe v13.21下安装运行 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-03-29 - **Last Updated**: 2022-03-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Card Print multiple documents in one page. - [Installation.](#installation) - [1. Dependencies](#1-dependencies) - [2. Installation.](#2-installation) - [Use](#use) - [1. Create Card.](#1-create-card) - [2. Print Cards.](#2-print-cards) - [3. Permissions.](#3-permissions) - [4. Example:](#4-example) - [License](#license) **Card** is an application built on **frappe** framework. ## Installation. #### 1. Dependencies 1. frappe (13.X.X) (tested on _13.17.0_). #### 2. Installation. ```sh bench get-app https://github.com/amadhaji/card.git ``` ```sh bench --site install-app card ``` ## Use To access the card list, go to: > Home > Tools > Printing > Card #### 1. Create Card. When Create new Card. 1. Enter a **Name** for the Card **_(set only once)_**. 2. Select the **doctype** which documents will be of its type **_(set only once)_**. 3. Check **Fixed Width** if each card has a fixed width, **uncheck** it if prefer to enter number of cards per page width. 4. Enter **Card Width** in millimetre if Fixed Width checked, or Select number of **Cards Per Page Width** if it's unchecked. 5. Check **Fixed Height** if each card has a fixed height, **uncheck** it if prefer to be Content Height. 6. Enter **Card Height** in millimetre if Fixed Height checked. 7. Enter **Layout** of each card, It's Jinja template and can use **_`{{ doc }}`_** which represent the card document itself, and **_`{{ doc_card }}`_** which represent each selected document. * **_e.x_**: `{{ doc.card_name }}` , `{{ doc.layout }}` , `{{ doc_card. }}`. 8. Select **Border** type for card, It's aimed to be out of card and used as marker for cutting. 9. Select **Border Width**. 10. Enter **Padding** in millimetre between card border and Content. #### 2. Print Cards. After Saving the document **Print Cards** button will be shown, clicking it will show MultiSelectDialog, found in it 1. default filters, they are **In List View / In Standard Filter** doctype fields. 2. Addition Filters. 3. table for selecting documents **_(20 at most)_**. 4. **Select All** Check Box to select all documents meet your filters. 5. **print** button. Click **Print** in the dialog to go to Print View, and be sure to select **Card** As the **Print Format**. #### 3. Permissions. * **System Manager** Has All access. * **Print User** able to read and print **_(Print Cards)_**. #### 4. Example: Printing DocType Description. > Document JSON. ```json {"card_name":"Description","doctype_card":"DocType","fixed_width":0,"card_width":0,"cards_per_page_width":"2","fixed_height":1,"card_height":30,"layout":"
\n
{{ doc_card.name }}
\n
\n

{{ doc_card.description if doc_card.description else \"\"}}

\n

{{ doc_card.document if doc_card.documentation else \"\"}}

\n
\n
\n\n","border":"dashed","padding":2,"border_width":"thin","doctype":"Card"} ``` > **_hint:_** > Copy the **JSON** text and paste it anywhere in browser while browsing frappe. > to create **new doc** from the **JSON**. >

![description_doctype.png](docs/img/description_doctype.png) ************************** ![print_description_docType](docs/img/print_description_doctype.gif) ## License Apache License Version 2.0, January 2004 http://www.apache.org/licenses/